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

one time pass as argument? #67

Open
tamis-laan opened this issue Dec 7, 2021 · 2 comments
Open

one time pass as argument? #67

tamis-laan opened this issue Dec 7, 2021 · 2 comments

Comments

@tamis-laan
Copy link

I would like to do:

aws-mfa --one-time-pass 123456

Is this possible?

@hoto
Copy link

hoto commented Mar 16, 2022

That would be super useful for scripting login to AWS with passwords managers.
Using an environment variable would be ok as well.

For now you could always grab the TOTP to clipboard and paste it when aws-mfa ask:
e.g. with 1password cli:

awsmfa='op item get q4myjst4inexxxx6dmyr2ey --field type=otp --format json | jq -r .totp | pbcopy && aws-mfa --profile prod --force'

@osiegmar
Copy link

I just noticed that this functionality was actually implemented by 5334deb four years ago (2018-05-15) but never released.

This makes it very simple to use aws-mfa together with 1Password-CLI:

aws-mfa --force --token $(op item get <item id> --otp)

@broamski Could you release a 0.0.13 please?

Maybe AgileBits wants to update https://blog.1password.com/1password-cli-2_0/ then in order to enhance security by using aws-mfa! ;-)

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

3 participants