Skip to content

Commit

Permalink
Add PolicyArns to web identity provider
Browse files Browse the repository at this point in the history
  • Loading branch information
diehlaws committed Apr 7, 2020
1 parent 2d667a9 commit e1e464f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aws/credentials/stscreds/web_identity_provider.go
Expand Up @@ -32,6 +32,7 @@ var now = time.Now
// an OIDC token.
type WebIdentityRoleProvider struct {
credentials.Expiry
PolicyArns []*sts.PolicyDescriptorType

client stsiface.STSAPI
ExpiryWindow time.Duration
Expand Down Expand Up @@ -84,6 +85,7 @@ func (p *WebIdentityRoleProvider) RetrieveWithContext(ctx credentials.Context) (
sessionName = strconv.FormatInt(now().UnixNano(), 10)
}
req, resp := p.client.AssumeRoleWithWebIdentityRequest(&sts.AssumeRoleWithWebIdentityInput{
PolicyArns: p.PolicyArns,
RoleArn: &p.roleARN,
RoleSessionName: &sessionName,
WebIdentityToken: aws.String(string(b)),
Expand Down

0 comments on commit e1e464f

Please sign in to comment.