The 3ds_cavv function within the mock-jutsu library is a specialised tool designed for developers and QA engineers working in the fintech sector. It generates a mock Cardholder Authentication Verification Value (CAVV), a critical security component used in the 3D Secure 2.0 (3DS2) protocol. In real-world environments, this value is a cryptographic proof generated by the issuing bank to confirm that a cardholder has been successfully authenticated during an online transaction. By providing high-quality mock data, mock-jutsu allows teams to simulate these complex financial handshakes without needing access to live banking infrastructure or sensitive production environments.
Technically, the 3ds_cavv function produces a value that typically represents a 20-byte or 28-byte binary string, rendered as a Base64-encoded sequence. This adheres to the EMVCo specifications for 3D Secure protocols, ensuring that the generated test data is structurally valid for integration testing. Whether you are utilising the Python API via jutsu.generate('3ds_cavv') or executing the CLI command, the library ensures that the output mimics the exact format expected by payment gateways and merchant servers. This level of realism is essential for verifying that downstream systems can correctly parse, pass, and store authentication tokens throughout the transaction lifecycle.
Utilising mock-jutsu for generating 3ds_cavv strings is particularly beneficial for testing diverse scenarios in payment processing workflows. Developers can use this test data to validate fraud detection algorithms, merchant plug-in (MPI) responses, and transaction authorisation requests. For performance testing, the JMeter integration allows for the seamless injection of dynamic authentication values into high-concurrency load tests. This ensures that the system under test handles authentication data correctly even under heavy traffic, without the security risks or financial costs associated with using genuine financial credentials.
Beyond technical accuracy, the primary benefit of using mock-jutsu is the significant acceleration of the development lifecycle. It removes the dependency on external 3DS Access Control Servers (ACS) during early-stage development and unit testing. By integrating 3ds_cavv generation into automated CI/CD pipelines, teams can maintain a robust testing posture while ensuring compliance with data privacy regulations. This makes it an indispensable tool for building secure, reliable, and PCI-DSS compliant financial applications, providing a seamless bridge between local development and production-ready code.
mockjutsu generate 3ds_cavvmockjutsu bulk 3ds_cavv --count 10mockjutsu export 3ds_cavv --count 10 --format jsonmockjutsu export 3ds_cavv --count 10 --format csvmockjutsu export 3ds_cavv --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate 3ds_cavv --maskmockjutsu bulk 3ds_cavv --count 5 --maskfrom mockjutsu import jutsujutsu.generate('3ds_cavv')jutsu.bulk('3ds_cavv', count=10)jutsu.template(['3ds_cavv'], count=5)# mask=True: regulation-compliant outputjutsu.generate('3ds_cavv', mask=True)jutsu.bulk('3ds_cavv', count=5, mask=True)${__mockjutsu_financial(3ds_cavv)}# JMeter Function: __mockjutsu_financial# Parameter 1: 3ds_cavv# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_financial(3ds_cavv,mask)}GET /generate/3ds_cavv# → {"type":"3ds_cavv","result":"...","status":"ok"}GET /bulk/3ds_cavv?count=10POST /template {"types":["3ds_cavv"],"count":1}# mask=true: regulation-compliant outputGET /generate/3ds_cavv?mask=trueGET /bulk/3ds_cavv?count=5&mask=true| Parameter | Values | Description |
|---|---|---|
| --mask | true | false | Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…) |