mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* fix(rds): propagate ModifyDBInstance master-password rotations to the backend and proxy Rotating the master password only updated Floci's stored state. The backend DB container kept the original credential and the running auth proxy kept validating the master scramble against the password it was started with, so after a rotation no client could connect at all: the old password failed the proxy's (rotated) validator and the new one failed against the backend. On rotation, while the old credential is still known: - exec into the DB container and change the password there. MySQL and MariaDB run SET PASSWORD as the master user itself with the old password (changing your own password needs no privileges, and root's password is the creation-time one, unknown after earlier rotations). PostgreSQL runs ALTER ROLE over the trusted local socket. - restart the auth proxy on the rotated credential, the same stop/start the reboot path uses. Mock mode, cluster members and instances without a running container are unaffected. * fix(rds): swap the proxy password snapshot in place instead of restarting it An immediate stop/start of the auth proxy races the listener rebind: closing the server socket defers the port release while relay connections are still draining, so the restart failed with EADDRINUSE and ModifyDBInstance threw (caught by the sdk-test-java RdsJdbcCompatTest). Updating the snapshot on the running proxy avoids the race entirely and keeps live connections open, which is also what rotation should do.