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

--mfa-token not registering from CLI, only from prompt #604

Open
jimweller opened this issue Feb 5, 2024 · 3 comments
Open

--mfa-token not registering from CLI, only from prompt #604

jimweller opened this issue Feb 5, 2024 · 3 comments

Comments

@jimweller
Copy link

The --mfa-token switch does not seem to work when using a source_profile. But it does work by inputting it on the prompt.

Below I use the TOTP seed to generate an OTP. I call assume with the --mfa-token switch, but assume still prompts for an OTP. The --mfa-token does not seem to register the OTP parameter. But the OTP works by putting it in the prompt.

❯ export OTP=$(echo 0000O73YQPSHRX6DNWOCD6| totp-cli instant) && echo $OTP
743051
❯ assume lxk-sandbox --mfa-token 743051
? MFA Token 743051
[✔] [lxk-sandbox](us-east-1) session credentials will expire in 1 hour

My profiles look like

[profile lxk-iam]
region             = us-east-1
credential_process = granted credential-process --profile=lxk-iam

[profile lxk-sandbox]
role_arn       = arn:aws:iam::00000000000:role/@Global_Administrator
source_profile = lxk-iam
region         = us-east-1
mfa_serial     = arn:aws:iam::111111111111:mfa/mfa-cli
@jimweller
Copy link
Author

I should probably mention that the lxk-iam profile, the source_profile, is not SSO. It's ACCESS_KEY/SECRET.

@jimweller
Copy link
Author

It does work with the --chain switch.

assume --mfa-token $OTP --chain lxk-sandbox lxk-iam

@jimweller
Copy link
Author

Version: 0.20.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant