Open ybasket opened 1 month ago
After further exploration, I was able to inject a dynamic password somewhat OK-ish:
Session.pooledF
's implementationpassword
parameter by an effect supplying the passwordsession
, evaluate that effect to obtain the current passwordNot great UX, but okay. Would still be cool to have a method on Session
that did this directly, pooledF
could just delegate with a pure
effect.
Use Case At $work, we're looking to switch from doobie to skunk. One obstacle on the migration comes from the likely requirement to use AWS RDS IAM. It integrates Postgres authentication with AWS IAM by signing short-lived (15 min) tokens that can be used as password when connecting to RDS Postgres. The problem with skunk is that it expects the password to be static, it's just
String
in all relevant signatures.Feature request Unless I'm overlooking some smart way to deal with a connection pool and a dynamic password in the existing setup, it would be cool if skunk added support. From what I've seen at first glance, taking a
F[String]
(or maybe more general aF[SomeConnectionParamsIncludingPassword]
that is evaluated when the connection is established, would help to support it. The existing (public) method signatures could just lift the password usingpure
, for RDS IAM, the effect would ask the AWS SDK for a fresh/TTL-aware-cached token.