Skip to content

Commit

Permalink
Update tracing logic in authn code
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat15 committed Feb 3, 2025
1 parent 88063a2 commit e8da317
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 e8da317

Please sign in to comment.