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

database/sql: Support for changing the username and password of an existing connection #17727

Closed
F21 opened this issue Nov 1, 2016 · 1 comment

Comments

@F21
Copy link

F21 commented Nov 1, 2016

Opening as per the suggestion in https://groups.google.com/forum/#!topic/golang-nuts/_OakZP-dLZw

My use case for this feature it to support rotating username and passwords using Vault. Vault leases database usernames and passwords and forces clients to rotate them before expiry. Be able to update the username and password of an existing connection pool would be extremely useful.

All drivers currently use the DSN to pass in the username and password, so perhaps this could be generalized to updating the DSN of an existing database connection pool.

@bradfitz
Copy link
Contributor

bradfitz commented Nov 1, 2016

Sorry, I don't think we want to do this. Just re-open the database and with the new password.

/cc @kardianos

@bradfitz bradfitz closed this as completed Nov 1, 2016
@golang golang locked and limited conversation to collaborators Nov 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants