Repository navigation
1.18.0 — password rotation
Password rotation release: a PostgreSQL pool can now take a new password without being rebuilt, so short-lived credentials such as RDS IAM tokens refresh without failing in-flight queries. Highlights:
Added
YaraOrm.set_password(password, connection="default")rotates a PostgreSQL pool's password in place. PostgreSQL checks the password only when a connection opens, so the next connection the pool opens presents the new one; the pool stays open and connections already in use keep working. Refresh an RDS IAM authentication token (15 minutes) on a shorter timer instead of opening a second pool and closing the one serving traffic, which failed in-flight queries withPool has been closed. Until the first rotation the URL's password is used exactly as parsed. Other backends raiseValueError. (#28, thanks @senhadjielrhazi)
Changed
- PostgreSQL connection errors carry the server's message and SQLSTATE. A failed connect used to surface as the driver's bare
db error; it now reads e.g.password authentication failed for user "app" (SQLSTATE 28P01). Code that matched on the olddb errortext needs updating.
Full details in CHANGELOG.md.