-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
I am trying to run this inside a docker container, but it always fails before asking for the OTP. The same command line works just fine outside the container.
I tried adding all capabilities and also run as privileged and it still does not work.
Any ideas ?
How to reproduce:
docker run --rm -it almalinux:8 /bin/bash
yum install python3-pip -y
pip3 install onelogin-aws-assume-role
onelogin-aws-assume-role -i REDACTED -s REDACTED -d REDACTED -a REDACTED --aws-account-id REDACTED --aws-region us-east-1 -u user@domain.redacted --onelogin-password 'REDACTED'
Error message:
OneLogin AWS Assume Role Tool
Traceback (most recent call last):
File "/usr/local/bin/onelogin-aws-assume-role", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/aws_assume_role/aws_assume_role.py", line 661, in main
result = get_saml_response(client, username_or_email, password, app_id, onelogin_subdomain, ip, mfa_verify_info, cmd_otp)
File "/usr/local/lib/python3.6/site-packages/aws_assume_role/aws_assume_role.py", line 256, in get_saml_response
raise Exception(error_msg)
Exception:
Error 401. Insufficient Permission
Running the same command outside the container will show:
OneLogin AWS Assume Role Tool
MFA Required
Authenticate using one of these devices:
-----------------------------------------------------------------------
0 | Google Authenticator
-----------------------------------------------------------------------
Enter the OTP Token for Google Authenticator:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels