-
Notifications
You must be signed in to change notification settings - Fork 224
Implement config option for which MFA to use #108
Conversation
@nickatsegment What is the preferred way(s) to set/override config options? #97 used the AWS config file, #85 used a CLI switch and environment variables. Currently this PR uses the cli route, and I think env variable override would be useful. Thoughts? |
hi @nickatsegment, happy new year! Wanted to see if you have some feedback on CLI vs AWS config to do the MFA settings. |
@lsowen Hi, happy new year! Thanks for hanging in there despite our radio silence :) Do you have (or can you imagine) a use case where you'd want different MFA methods depending on the account? For me, as a user, I only ever use 1 idP (same for every AWS account) and always pick the same method. So for my own personal use case, I'd prefer an env var because you can set it in your bash profile and not have to copy it to every aws-okta profile. |
@nickatsegment I think whichever method we use (cli flag or aws config) I will implement an ENV variable override. Would it be useful to put plumbing in place to allow values to be set in the |
@lsowen I'm guessing it would be useful for some users. Give it a shot and see how much complexity it adds. If it's a lot, I'd say wait for somebody with the need. |
`MFADevice` is now `MFAConfig.DuoDevice` because it is only used for DUO push auth
Order of precedence: * CLI flags * Environment variables * Current profile * Source profile * `okta` "profile" Update README
@Fauzyy just rebased, updated to use the new This version supports:
|
@lsowen this look good to me so far, I'll merge once I wrap up testing 👍 - thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for this @lsowen 🥂
Strangely I don't see this working after taking the latest code and installing it.
Isn't it supposed to default to push instead of asking it? Did I misunderstand the documentation? |
hi @manishtomar, while you can mix/match the methods of specifying which one you want to use (eg use environment variable and CLI switch), you have to specify both the provider and the factor-type for the config to have impact. eg
|
@lsowen Awesome. Thank you so much for the clarification and thanks a lot for this contribution! |
Supercedes #97/#73, and streamlines changes for this PR and #85.