MFA for IAM user is prompted on each request to AWS
See original GitHub issueDescribe the bug
When using AWS IAM user session with MFA, Leapp prompts for MFA on each call to AWS (e.g. each separate aws cli
command call).
Leapp Version 0.13.2
To Reproduce Steps to reproduce the behavior:
- Set “AWS credentials generation” method to “credential-process”.
- Add a new session with access method “AWS IAM user”.
- Add MFA ARN under MFA device (virtual MFA).
- Add access key and secret key.
- Save and start the session.
- Execute AWS CLI command with this session (e.g.
aws s3 ls
). - Enter MFA code when prompted. Command will execute successfully.
- Execute the same command again immediately. Prompt for MFA will be shown again and command will fail (due to OTP already have been used).
Expected behavior MFA prompt should not appear on each request.
Desktop (please complete the following information):
- OS: MacOS Monterey 12.5 (M1)
- Leapp Version: 0.13.2
- Leapp CLI version: @noovolari/leapp-cli/0.1.16 darwin-x64 node-v16.16.0
- Installation method: Homebrew
Additional context This only appears if “AWS credentials generation” method is set to “credential-process”. If I switch to “credentials-file” and re-add the session, everything works as expected. I would be happy to provide any additional information if needed.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Enforce MFA authentication for IAM users that use the AWS CLI
IAM users with the AWS Management Console are prompted to enter MFA authentication credentials and can then access AWS services. However, IAM ...
Read more >Using multi-factor authentication (MFA) in AWS
You can use IAM Identity Center to centrally manage access to multiple AWS accounts and provide users with MFA-protected, single sign-on access to...
Read more >IAM tutorial: Permit users to manage their credentials and MFA ...
You can permit your users to manage their own multi-factor authentication (MFA) devices and credentials on the My security credentials page.
Read more >Configure MFA device enforcement - AWS Documentation
Use the following procedure to determine whether your users must have a registered MFA device when signing in to the AWS access portal....
Read more >Using MFA devices with your IAM sign-in page
Provide a multi-factor authentication (MFA) code in order to sign in to the AWS Management Console if you have enabled MFA for your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in v0.14.2.
Closing this issue
Hey @andreacavagna01 thanks for the update! I upgraded to the latest versions of Leapp (0.14.2) and leapp-cli (0.1.20), however the issue is still present for me. Tried deleting and adding session as well. Are there any additional steps I need to take?