onelogin-aws-cli
onelogin-aws-cli copied to clipboard
Allow passing OTP token through command line
Expected Behavior
It would be nice if we could pass the OTP token (and the otp_device) through the CLI args / env variable (so e.g. you can run a script to get a token an pass it to this tool, without needing interactive input)
Current Behavior
Interactive prompt where it's not using the actual name of the OTP device but the type (e.g. I get twice Google Authenticator even though I gave them different names)
Possible Solution
Allow passing token and otp device through CLI
Context (Environment)
Allow hooking 1password-cli with this tool to not have to copy paste the token
You can set otp_device via the similarly named config parameter.
Would it work to do something like: generate_token.sh | onelogin-aws-login
@slycoder That would work.
Regarding the device, the problem is that I get this prompt (and I want the 2nd one), setting the otp_device to "Google Authenticator" picks the wrong one
Each device has a deviceId that you could use to differentiate: https://developers.onelogin.com/api-docs/2/saml-assertions/generate-saml-assertion