-
Notifications
You must be signed in to change notification settings - Fork 15
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
A pool that creates connections from dynamically changing settings #11
Comments
I don't think "hasql-pool" will fit your case. Consider explicitly controlling your connections with the "resource-pool" package. You can use the source code of "hasql-pool" as a reference. Just out of curiosity, is the new token only required for the new connections or you have to reset the already established ones as well? |
Thanks for the hint. The strategy that I have at hand uses new tokens for newly established connections only. |
Okay then definitely go with "resource-pool". |
@avanov suggests to implement this now, since after the move away from resource-pool it seems possible. I'll give it some thought. I'm a bit preoccupied now and may forget, so feel free to ping me if I don't come back to this issue within a couple of weeks. In the meantime can you guys describe what API you have in mind for this? |
Nikita, both accounts belong to me, the one above is workplace-related. Regarding the API, the simplest could be |
Thanks. It's implemented in 0.7.2 now. |
Hi, I stumbled upon a case where this is required in secure environments that exchange tokens during a short period of time. For instance, RDS allows AWS IAM tokens to be used as Postgres passwords that would last for 15 minutes.
With Python I could achieve that with a
creator
method that would take all but password credentials from OS env vars, and the password would be received from AWS API call:Is there a way to relatively easily encode this behaviour for hasql-pool?
The text was updated successfully, but these errors were encountered: