forked from aws/aws-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for MFA when assuming a role
Feedback from aws#990, this adds support for MFA when assuming a role. To enable this, in addition to role_arn and source_profile, you can specify an mfa_serial option in your config file:: [profile foo] role_arn = ... source_profile = development mfa_serial = ..... This is the the mfa arn/device id. If an mfa_serial is provided then a user will be prompted for the token code when the AssumeRole call happens. As mentioned in the original PR, for now when the temporary credentials expire, an exception will be raised if MFA is required. We can look into updating this in the future to support reprompting the user. This only affects the case where the credentials expire within the duration of the AWS CLI process. Aside from some of the ``aws s3 cp/sync`` commands, the AWS CLI is generally a short lived process so this won't affect the common usage scenarios.
- Loading branch information
Showing
2 changed files
with
116 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters