You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I am using the database backend with the MSSQL plugin and observed the following issue. When a database role is deleted from Vault, it does not delete logins and users that were created under that role. Later when the logins expire, Vault tries to delete them, but it fails with error "could not find role". As a result the users and logins stay active in the database forever.
Check the Vault audit log for the following error message:
[ERROR] expiration: failed to revoke lease: lease_id=mssql/creds/testuser/7e2b66a3-1caf-7ba2-a8f2-18c522636b39 error="failed to revoke entry: resp: (*logical.Response)(nil) err: error during revoke: could not find role with name "testuser""
Check SQL Server. The database user and the login still exist and are active.
Expected Behaviour
When the database role is deleted from Vault, all users and logins created under it should be removed from SQL Server immediately.
The text was updated successfully, but these errors were encountered:
Since the database role got deleted, Vault is not able to determine the connection information or revocation statement required to expire the lease. The backend is not responsible for the lease itself (that is handled in Vault's core), so it's not possible for the backend to expire leases. You can, however, remove all of the role's associated leases via prefix-based revocation before the role gets deleted. We will add this suggestion to the documentation, thanks for reporting!
* Add create/update distinction for connection config
* Add create/update distinction for role config
* Add db name and revocation statements to leases to give revocation a
shot at working if the role has been deleted
Fixes#3544Fixes#4782
* Database updates
* Add create/update distinction for connection config
* Add create/update distinction for role config
* Add db name and revocation statements to leases to give revocation a
shot at working if the role has been deleted
Fixes#3544Fixes#4782
* Add create/update info to docs
Description
I am using the database backend with the MSSQL plugin and observed the following issue. When a database role is deleted from Vault, it does not delete logins and users that were created under that role. Later when the logins expire, Vault tries to delete them, but it fails with error "could not find role". As a result the users and logins stay active in the database forever.
Steps to reproduce
Wait a minute until the login expires.
Check the Vault audit log for the following error message:
Expected Behaviour
When the database role is deleted from Vault, all users and logins created under it should be removed from SQL Server immediately.
The text was updated successfully, but these errors were encountered: