Skip to content

Commit

Permalink
Allow configuration of nonce for ec2 authentication (#6953)
Browse files Browse the repository at this point in the history
* Allow configuration of nonce for ec2 authentication

* Addressing pull request comment
  • Loading branch information
amdonov authored and jefferai committed Jun 27, 2019
1 parent 755fde7 commit b70f5c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions command/agent/auth/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ func NewAWSAuthMethod(conf *auth.AuthConfig) (auth.AuthMethod, error) {
}
}

nonceRaw, ok := conf.Config["nonce"]
if ok {
a.nonce, ok = nonceRaw.(string)
if !ok {
return nil, errors.New("could not convert 'nonce' value into string")
}
}

if a.authType == typeIAM {

// Check for an optional custom frequency at which we should poll for creds.
Expand Down

0 comments on commit b70f5c4

Please sign in to comment.