Bug with creating aws_session_token for IAM User credentials without MFA
See original GitHub issueDescribe the bug
Sessions created AWS IAM User Provider and without MFA have trouble accessing IAM resources. One obvious difference to other sessions is that the aws_session_token
has quotes around it.
Leapp Version 0.9.0
To Reproduce Steps to reproduce the behavior:
- Add a new Session in Leapp (AWS, IAM User)
- Fill in credentials for user with full access to all AWS resources, but no MFA enabled.
- Start the newly created session
- Inside
.aws/credentials
there should be an entry withaws_session_token="..."
- Try to access your own user
aws iam get-user --user-name XXX --profile YYY
- Receive error:
An error occurred (InvalidClientTokenId) when calling the GetUser operation: The security token included in the request is invalid
Expected behavior The user information is fetched and shown in the console
Desktop (please complete the following information):
- OS: macOS
- OS Version 12.2.1
- Leapp Version 0.9.0
Additional context I tried the same AWS command with the same base credentials, but without temporary credentials and that works.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:7 (4 by maintainers)
Top Results From Across the Web
aws-cli fails to acquire session token before issuing ... - GitHub
AWS CLI fails while attempting to issue API calls with MFA authentication. It appears to be issuing a sts:AssumeRole API call without ......
Read more >Accessing AWS using your AWS credentials
Understand the different types of AWS security credentials (passwords, access keys, multi-factor authentication, key pairs, certificates) and when you use ...
Read more >Setup AWS credentials and configuration
Configure a session token as part of your credentials ; You are using your own AWS account, and using credentials from an IAM...
Read more >aws Cookbook - Chef Supermarket
IAM User, Group, Policy, and Role Management: ... If credentials are not supplied via parameters, resources will look for the credentials in ...
Read more >Never put AWS temporary credentials in the ... - Ben Kehoe
We need to talk about how AWS credential configuration works. Many people have more than one IAM principal that they use on a...
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
@ericvilla That is a very good point! But I still consider it a bug in Leapp, since I don’t have any way not to use temporary credentials
@jalaziz I realize this is old but I was running into the same problem. I had to delete the session and re-create it with the MFA device and after that it prompted me for a code.