Skip to content

Commit

Permalink
Only need to skip MFA if it is present
Browse files Browse the repository at this point in the history
  • Loading branch information
mtibben committed Jan 8, 2020
1 parent 8e44923 commit b5e0cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (c *CredentialLoader) ProviderWithChainedMfa(profileName string, isChained
sourceCredProvider = NewMasterCredentialsProvider(c.Keyring, config.ProfileName)
} else if config.SourceProfile != "" {
sourceCredProvider, err = c.ProviderWithChainedMfa(config.SourceProfile, true, config.MfaSerial)
if err == nil {
if err == nil && config.MfaSerial != "" {
skipMfaBecauseSourceProfileHasItCovered = true
config.MfaSerial = ""
}
Expand Down

0 comments on commit b5e0cab

Please sign in to comment.