fix(feature/rds/auth): include trailing slash in BuildAuthToken URL path#3367
Open
mangomaker5 wants to merge 1 commit intoaws:mainfrom
Open
fix(feature/rds/auth): include trailing slash in BuildAuthToken URL path#3367mangomaker5 wants to merge 1 commit intoaws:mainfrom
mangomaker5 wants to merge 1 commit intoaws:mainfrom
Conversation
BuildAuthToken generates a token missing the '/' path separator between host:port and the query string (host:5432?Action=...), causing PAM authentication failures on Aurora Express Configuration clusters. This aligns the SDK output with the AWS CLI (aws rds generate-db-auth-token) which produces host:5432/?Action=... Fixes aws#3365
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #3365
BuildAuthTokengenerates an IAM authentication token missing the/path separator betweenhost:portand the query string:host:5432?Action=connect&DBUser=postgres&...host:5432/?Action=connect&DBUser=postgres&...This aligns the Go SDK output with
aws rds generate-db-auth-token(AWS CLI), which includes the trailing slash.Root Cause
In
connect.go, When the endpointhost:5432is prefixed withhttps://and passed tohttp.NewRequest, Go'snet/urlparses it as a URL with an empty path. The resulting presigned URL fromPresignHTTPomits the/between the authority and query string. Aurora Express Configuration clusters (withInternetAccessGatewayEnabled: true) strictly validate this format and reject the token withFATAL: PAM authentication failed.Fix
A single line addition in
connect.go(line 72):