Skip to content

Commit

Permalink
Export RoleARN for use with STSWebIdentity (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
donatello committed Nov 13, 2021
1 parent a7a36ee commit daea25a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/credentials/iam_aws.go
Expand Up @@ -112,7 +112,7 @@ func (m *IAM) Retrieve() (Value, error) {

return &WebIdentityToken{Token: string(token)}, nil
},
roleARN: os.Getenv("AWS_ROLE_ARN"),
RoleARN: os.Getenv("AWS_ROLE_ARN"),
roleSessionName: os.Getenv("AWS_ROLE_SESSION_NAME"),
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/credentials/sts_web_identity.go
Expand Up @@ -78,9 +78,9 @@ type STSWebIdentity struct {
// This is a customer provided function and is mandatory.
GetWebIDTokenExpiry func() (*WebIdentityToken, error)

// roleARN is the Amazon Resource Name (ARN) of the role that the caller is
// RoleARN is the Amazon Resource Name (ARN) of the role that the caller is
// assuming.
roleARN string
RoleARN string

// roleSessionName is the identifier for the assumed role session.
roleSessionName string
Expand Down Expand Up @@ -164,7 +164,7 @@ func getWebIdentityCredentials(clnt *http.Client, endpoint, roleARN, roleSession
// Retrieve retrieves credentials from the MinIO service.
// Error will be returned if the request fails.
func (m *STSWebIdentity) Retrieve() (Value, error) {
a, err := getWebIdentityCredentials(m.Client, m.STSEndpoint, m.roleARN, m.roleSessionName, m.GetWebIDTokenExpiry)
a, err := getWebIdentityCredentials(m.Client, m.STSEndpoint, m.RoleARN, m.roleSessionName, m.GetWebIDTokenExpiry)
if err != nil {
return Value{}, err
}
Expand Down

0 comments on commit daea25a

Please sign in to comment.