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

Verify device arn is an mfa device. #62

Closed
wants to merge 1 commit into from
Closed

Verify device arn is an mfa device. #62

wants to merge 1 commit into from

Conversation

danielhoherd
Copy link

A common mistake is for people to try to to authenticate using their user ARN instead of their MFA ARN. This change set validates the ARN as being an MFA ARN.

Example bad ARN:

arn:aws:iam::123456789012:user/somebody

Example of attempting to use this bad ARN:

$ aws-mfa --device arn:aws:iam::123456789012:user/somebody
INFO - Validating credentials for profile: default
ERROR - arn:aws:iam::123456789012:user/somebody does not appear to be an MFA device.

Example good ARN:

arn:aws:iam::123456789012:mfa/somebody

Example of attempting to use this good ARN (this will be identical to the output from before this change):

$ aws-mfa --device arn:aws:iam::123456789012:mfa/somebody
INFO - Validating credentials for profile: default
INFO - Your credentials are still valid for 41764.586892 seconds they will expire at 2021-03-25 06:29:10

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.

None yet

1 participant