Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of nonce for ec2 authentication #6953

Merged
merged 2 commits into from
Jun 27, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions command/agent/auth/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ func NewAWSAuthMethod(conf *auth.AuthConfig) (auth.AuthMethod, error) {
a.lastCreds = creds

go a.pollForCreds(accessKey, secretKey, sessionToken, credentialPollIntervalSec)
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though it's not relevant for IAM I think this should still go up with the other config blocks instead of in an else block here.

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")
}
}
}

return a, nil
Expand Down