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

Add support for MFA when assuming a role #991

Merged
merged 1 commit into from
Nov 10, 2014

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Nov 10, 2014

Feedback from #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.

cc @kyleknap @danielgtaylor

cc @garnaat @ehammond

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.
@kyleknap
Copy link
Contributor

Looks good as well. 🚢

@jamesls jamesls merged commit e8d9791 into aws:develop Nov 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants