Skip to content

1.18.0 — password rotation

Choose a tag to compare

@vsdudakov vsdudakov released this 09 Oct 08:57
· 6 commits to main since this release

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 with Pool has been closed. Until the first rotation the URL's password is used exactly as parsed. Other backends raise ValueError. (#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 old db error text needs updating.

Full details in CHANGELOG.md.