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

Assume role fails with mfa #34

Open
IhorKravchuk opened this issue Jan 16, 2019 · 0 comments
Open

Assume role fails with mfa #34

IhorKravchuk opened this issue Jan 16, 2019 · 0 comments
Labels

Comments

@IhorKravchuk
Copy link

IhorKravchuk commented Jan 16, 2019

While using opinel with scout2 or ScoutSuite with crossaccount MFA access, STS assume role failing.
After investigation I found that the root cause is incorrect naming inside assume_role function credentials argument TokenCode and SerialNumber:
- if 'mfa_serial' in credentials and 'mfa_code' in credentials:
- sts_args['TokenCode'] = credentials['mfa_code']
- sts_args['SerialNumber'] = credentials['mfa_serial']
+ if 'SerialNumber' in credentials and 'TokenCode' in credentials:
+ sts_args['TokenCode'] = credentials['TokenCode']
+ sts_args['SerialNumber'] = credentials['SerialNumber']

@x4v13r64 x4v13r64 added the bug label Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants