aws / aws-secretsmanager-jdbc

The AWS Secrets Manager JDBC Library enables Java developers to easily connect to SQL databases using secrets stored in AWS Secrets Manager.
Apache License 2.0
161 stars 77 forks source link

Add PostgreSQL error code 28000 to authentication errors #223

Closed canelzio closed 10 months ago

canelzio commented 10 months ago

Issue #222

Description of changes: PostgreSQL Error Code 28000 is also considered as an authentication error in order to trigger secret refresh (together with 28P01 - invalid_password)

PostgreSQL Error Code 28000 (invalid_authorization_specification) is the error code returned by RDS Proxy when the secret is rotated in alternating user mode: refreshing the secret cache would address the issue #222.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.