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

Automatically use profile's MFA #6

Open
xird opened this issue Mar 28, 2018 · 1 comment
Open

Automatically use profile's MFA #6

xird opened this issue Mar 28, 2018 · 1 comment

Comments

@xird
Copy link

xird commented Mar 28, 2018

With the current version of aws-mfa, the user must define in the options both the profile name and the MFA ARN.

Since the MFA ARN should already be configured in the aws config file under the profile, aws-mfa should be able to get the MFA ARN from there.

Suggestion for implementation:

  • IF MFA ARN is given in the option, use it
  • ELSE IF try to dig the ARN from the config file
  • ELSE exit with an error saying that no MFA could be found.

The last part is there because with the current version it is possible to generate temporary credentials without using an MFA token. If AWS policies mandate the use of MFA for an action, using the generated credentials for that action will result in a "Permission denied" error. Since aws-mfa is meant for MFA users, there's no need for it to generate non-MFA credentials.

@xird
Copy link
Author

xird commented Mar 28, 2018

Oops. The PR for this ended up in the same branch as the simple README FIX in #2 .

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

No branches or pull requests

1 participant