question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MFA for IAM user is prompted on each request to AWS

See original GitHub issue

Describe 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:

  1. Set “AWS credentials generation” method to “credential-process”.
  2. Add a new session with access method “AWS IAM user”.
  3. Add MFA ARN under MFA device (virtual MFA).
  4. Add access key and secret key.
  5. Save and start the session.
  6. Execute AWS CLI command with this session (e.g. aws s3 ls).
  7. Enter MFA code when prompted. Command will execute successfully.
  8. 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andreacavagna01commented, Aug 25, 2022

Fixed in v0.14.2.

Closing this issue

0reactions
yafanasievcommented, Sep 2, 2022

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found