Skip to content

Commit

Permalink
Merge pull request #2230 from authzed/fix-tracing-logic-in-postgres-r…
Browse files Browse the repository at this point in the history
…ds-authn

Update tracing logic in authn code
  • Loading branch information
tstirrat15 authored Feb 3, 2025
2 parents abdc17d + ee76d5a commit 98e88a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/datastore/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ func (d awsIamCredentialsProvider) IsCleartextToken() bool {
func (d awsIamCredentialsProvider) Get(ctx context.Context, dbEndpoint string, dbUser string) (string, string, error) {
authToken, err := rdsauth.BuildAuthToken(ctx, dbEndpoint, d.awsSdkConfig.Region, dbUser, d.awsSdkConfig.Credentials)
if err != nil {
log.Ctx(ctx).Trace().Str("region", d.awsSdkConfig.Region).Str("endpoint", dbEndpoint).Str("user", dbUser).Msg("successfully retrieved IAM auth token for DB")
return "", "", err
}
return dbUser, authToken, err
log.Ctx(ctx).Trace().Str("region", d.awsSdkConfig.Region).Str("endpoint", dbEndpoint).Str("user", dbUser).Msg("successfully retrieved IAM auth token for DB")
return dbUser, authToken, nil
}

0 comments on commit 98e88a1

Please sign in to comment.