Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lease Revoke does not happen #45

Open
andrefcpimentel2 opened this issue Nov 17, 2020 · 4 comments
Open

Lease Revoke does not happen #45

andrefcpimentel2 opened this issue Nov 17, 2020 · 4 comments
Labels

Comments

@andrefcpimentel2
Copy link

andrefcpimentel2 commented Nov 17, 2020

I'm using Vault 1.6.0 with Oracle SE2 (AWS RDS), and I successfully set up the plugin successfully.
My role:
vault write database/roles/my-role db_name=oracle creation_statements="CREATE USER {{name}} IDENTIFIED BY {{password}};GRANT SELECT ON session_privs TO {{name}};" default_ttl="1h" max_ttl="24h"
But when Revoking the lease either through the UI or using the CLI (vault lease revoke), nothing happens. Also after the TTL, nothing happens. The user is still listed in sqlplus.
Screenshot 2020-11-17 at 16 05 36

@pcman312
Copy link
Contributor

Hi @andrefcpimentel2! Thanks for bringing up this issue.

Unfortunately this plugin doesn't work well with AWS RDS. Before dropping a user, Oracle requires that there are no open connections from that user. In order to enforce this, it has a system table that we can query to list all open connections. We then use that list to forcibly disconnect that user from the database before dropping the user. RDS has unfortunately made it so that we cannot query that table and instead has a stored procedure for the operation. We don't have a workaround for this at the moment :(

@pcman312 pcman312 added the bug label Nov 18, 2020
@pcman312
Copy link
Contributor

Apologies, I meant to comment without closing. I would like to keep the issue open for visibility into RDS.

@pcman312 pcman312 reopened this Nov 18, 2020
@nouseforaname
Copy link

Finding this ticket just solved out Issue.

It would be nice if the Error would indicate, that additionally to the revocation statements the, code tries to access v$sessions. Our DB Team created stored procedures for Vault to Call (taking care of proper user de(provisioning) on the DB) and we had issues running the revocation statement via Vault. Directly connecting using sqlplus and running the statement did not produce any errors.

A note in the docs for this behaviour would be greatly appreaciated. Thanks!

@kpcraig
Copy link

kpcraig commented Nov 30, 2023

While i don't think it will 'solve' the issue, it seems like the functionality from #137 and the doc update from hashicorp/vault#23517 (when it lands) should make the fix clearer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants