Documentation
¶
Overview ¶
Package awsauth provides shared AWS IAM authentication helpers for PostgreSQL connectors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDBAuthToken ¶
GenerateDBAuthToken uses the AWS SDK to build a short-lived RDS IAM authentication token. Credentials are resolved via the standard SDK chain: environment variables, ~/.aws/credentials, EC2/ECS instance metadata, etc.
auth.BuildAuthToken has a bug (https://github.com/aws/aws-sdk-go-v2/issues/3365) where it produces a token without a "/" path component (host:port?Action=... instead of host:port/?Action=...). The SigV4 canonical URI is therefore "" instead of "/", which does not match what RDS expects, causing PAM authentication failure. We insert the missing slash after the fact.
Types ¶
This section is empty.