Skip to content

Commit

Permalink
Add WithCredentials to AWS auth API
Browse files Browse the repository at this point in the history
The default behavior does not allow to fully customize the credentials used to access Vault thru AWS authentication.

The developer can choose to skip process environment variables and override the default behavior.
  • Loading branch information
mxmauro committed May 9, 2024
1 parent 842dff8 commit 80aaa59
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api/auth/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,12 @@ func WithRegion(region string) LoginOption {
return nil
}
}

// WithCredentials can be used to specify a custom set of credentials
// from the source you choose.
func WithCredentials(creds *credentials.Credentials) LoginOption {
return func(a *AWSAuth) error {
a.creds = creds
return nil
}
}

0 comments on commit 80aaa59

Please sign in to comment.