Vault
Delete static LDAP roles
Vault does not rotate passwords when you delete a static role. We recommend manually rotating the mapped credentials before deleting the role or revoking access to the static role.
Even for delete requests, the plugin expects all required parameters. You can use the existing configuration file (if you created one) or create a minimal version for the delete request.
{ "role_name": "<vault_role_name>", "username": "<existing_ldap_username>" "rotation_period": "<credential_rotation_frequency>" }For example:
{ "role_name": "hashicorp", "username": "vault" "rotation_period": "24h" }Update the role.
Use
vault writewith the/{mount_path}/static-rolepath and your static role configuration,ldap-role.json, to create a new static role:$ vault write <mount_path>/static-role @ldap-role.jsonFor example:
$ vault write devcreds/static-role @ldap-role.jsonConfirm the role deletion by requesting credentials from the plugin:
Use
vault readwith the/{mount_path}/static-cred/{role_name}path to fetch the credential information for the given role:$ vault read <mount_path>/static-role/<role_name>For example:
$ vault read devcreds/static-role/hashicorp