Last active
November 8, 2023 20:54
-
-
Save MichaelDrogalis/6d75219afa606ef7a8308123a7c1f6ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"generators": [ | |
{ | |
"topic": "passwordResetFlow", | |
"vars": { | |
"username": { | |
"_gen": "oneOf", | |
"choices": [ | |
{ "_gen" : "string", "expr" : "#{Name.username}" }, | |
{ | |
"_gen": "lookup", | |
"topic": "passwordResetFlow", | |
"path": [ "value", "username" ] | |
} | |
] | |
} | |
}, | |
"value": { | |
"username": { "_gen" : "var", "var" : "username" } | |
}, | |
"stateMachine": { | |
"_gen": "stateMachine", | |
"for" : { | |
"_gen" : "var", | |
"var" : "username" | |
}, | |
"initial": "passwordReset", | |
"transitions": { | |
"passwordReset": { | |
"_gen": "weightedOneOf", | |
"choices": [ | |
{ "weight": 1, "value": "loginSuccessful" }, | |
{ "weight": 3, "value": "passwordReset" } | |
] | |
} | |
}, | |
"states": { | |
"passwordReset": { | |
"value": { | |
"action": "resetRequested" | |
} | |
}, | |
"loginSuccessful": { | |
"value": { | |
"action": "loggedIn", | |
"captchaAttempts": { | |
"_gen": "integer", | |
"n": { | |
"_gen": "normalDistribution", | |
"mean": 2, | |
"sd": 5 | |
} | |
} | |
} | |
} | |
} | |
}, | |
"localConfigs": { | |
"throttle": { | |
"ms": { | |
"_gen": "normalDistribution", | |
"mean": 500, | |
"sd": 50 | |
} | |
} | |
} | |
} | |
], | |
"connections": { | |
"kafka": { | |
"kind": "kafka", | |
"producerConfigs": { | |
"bootstrap.servers": "localhost:9092", | |
"key.serializer": "io.shadowtraffic.kafka.serdes.JsonSerializer", | |
"value.serializer": "io.shadowtraffic.kafka.serdes.JsonSerializer" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment