mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
RDS and ElastiCache SigV4 validators accepted any valid token regardless of which user it was signed for. A token signed for user A could authenticate as user B if the signature was cryptographically valid. - RdsSigV4Validator.validate() now takes clientUsername and rejects tokens where DBUser doesn't match the connecting PostgreSQL user - ElastiCache SigV4Validator.validate() now takes expectedUsername and rejects tokens where User doesn't match the AUTH username - PostgresProtocolHandler passes clientUsername to the validator - ElastiCacheAuthProxy passes the AUTH username to the validator - Both validators use MessageDigest.isEqual() for signature comparison instead of String.equals() to prevent timing side-channel attacks - 4 new test cases: wrong-user rejection + null-username backwards compat for both RDS and ElastiCache validators