A useful (possibly) utility for generating Yandex-tank ammo.
- Create venv for your project.
- Activate venv and install project requirements.
pip install -r requirements.txt
- Go to the end of main.py and edit configuration dicts.
if __name__ == "__main__":
ldap_configuration = {
"url": "ldaps://192.168.14.167",
"username": "secret",
"password": "secret",
"users_file": "created_users.json",
}
tank_configuration = {
"host": "192.168.7.178",
"api_url": "/api/auth",
"yapam_config": "config.json",
"method": "POST",
"port": 443,
"case": "LDAP_TANK_AUTH",
}
create_users_configuration = {
"password": "secret!",
"ldap_domain": "secret.domain",
"count": 5,
}
veil_configuration = {
"url": "https://192.168.7.178/api/auth",
"users_file": "created_users.json",
"method": "POST",
"port": 443,
"ldap": True,
}
- Run (see examples below)
Create temporary users on MS AD via LDAP.
venv/bin/python main.py --mode=create
In a result you`ll get 3 files:
config.json
- a temporary file just for extra debugging.ammo
- ammo for a yandex tank shooting.created_users.json
- users created on a ldap server.
Delete previously created users from MS AD via LDAP.
venv/bin/python main.py --mode=delete
Note, that your MS AD server should have ssl configuration.
Create ammo with authentication tokens from your api.
venv/bin/python main.py --mode=auth