passwordSecurity

Mock Jutsu HOW-TO | UK

In the realm of modern software development and quality assurance, generating secure and realistic mock data is a fundamental requirement for building robust authentication systems. The mock-jutsu library addresses this need through its dedicated Security category, featuring a sophisticated password generation function. This tool allows developers to programmatically create strong, random strings that mimic real-world user credentials, ensuring that test environments remain both functional and secure without the risks associated with using sensitive or repetitive information.

Each password produced by mock-jutsu is engineered to meet high-entropy standards, typically ranging between 12 and 20 characters in length. To ensure maximum complexity and compliance with modern security policies, the underlying algorithm guarantees the inclusion of a diverse character set, including uppercase and lowercase letters, numerical digits, and special symbols. This structural variety is essential for bypassing strict validation logic and testing the efficacy of password strength meters during the development phase. By adhering to these rigorous standards, the library provides reliable test data that reflects the complexity required by contemporary security protocols and enterprise-grade applications.

Integration is seamless across various technical workflows, whether you are working directly in a Python environment or conducting large-scale load testing. Developers can easily invoke the function using jutsu.generate('password') within their application code or utilise the command-line interface with the command mockjutsu generate password for quick prototyping and script automation. Furthermore, for performance engineers, the JMeter integration via the syntax ${__mockjutsu(password,)} allows for the dynamic injection of unique credentials during high-concurrency stress tests, making it a versatile asset for any DevOps toolkit.

Utilising mock-jutsu for password generation offers significant benefits beyond simple automation. it eliminates the common pitfall of using "leaked" or predictable data during the development lifecycle, which can lead to security vulnerabilities. Moreover, it streamlines the creation of massive datasets for database seeding and automated UI testing. By providing a consistent and customisable source of mock data, mock-jutsu empowers engineering teams to focus on building core features while maintaining a high standard of security testing throughout the continuous integration and deployment pipeline.

CLI Usage
mockjutsu generate passwordmockjutsu bulk password --count 10mockjutsu export password --count 10 --format jsonmockjutsu export password --count 10 --format csvmockjutsu export password --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate password --maskmockjutsu bulk password --count 5 --mask
Python API
from mockjutsu import jutsujutsu.generate('password')jutsu.bulk('password', count=10)jutsu.template(['password'], count=5)# mask=True: regulation-compliant outputjutsu.generate('password', mask=True)jutsu.bulk('password', count=5, mask=True)
JMeter
${__mockjutsu_security(password)}# JMeter Function: __mockjutsu_security# Parameter 1: password# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_security(password,mask)}
REST API
GET /generate/password# → {"type":"password","result":"...","status":"ok"}GET /bulk/password?count=10POST /template {"types":["password"],"count":1}# mask=true: regulation-compliant outputGET /generate/password?mask=trueGET /bulk/password?count=5&mask=true

Parameters

Parameter Values Description
--mask true | false Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…)

Other Languages