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

Duo Passcode Implementation or Documentation Unclear #17872

Closed
patcable opened this issue Nov 9, 2022 · 2 comments
Closed

Duo Passcode Implementation or Documentation Unclear #17872

patcable opened this issue Nov 9, 2022 · 2 comments

Comments

@patcable
Copy link

patcable commented Nov 9, 2022

Describe the bug
The Duo MFA method can accept a TOTP passcode generated from the Duo Mobile app, or one associated with an end-users Duo account (ex. a Yubikey OTP). What is left out of the documentation is that the word passcode= must be appended for the Duo Login MFA provider to actually use that provided OTP or Yubikey OTP. If an end-user only specifies the TOTP code or Yubikey OTP, the Duo Login MFA provider will send a push anyways.

I was able to figure this out by looking at login_mfa.go. This, somewhat, makes sense to me - the way you'd specify on the CLI with legacy MFA was with passcode= after a vault login command.

I'm not sure if this should be updated in documentation (maybe in the Configure Duo MFA Method doc? Or maybe a provider-specific callout in the validate API docs) or if the code should be updated to use passcode auth if an MFA cred is specified at all.

To Reproduce

  1. Configure Duo Login MFA and associate with an authentication method.
  2. Configure a Duo user, set up Duo Mobile or associate a Yubikey OTP with the Duo user.
  3. Attempt to log in - I use LDAP, so: vault login -method=ldap -mfa <MFA_ID_HERE>:passcode=<YUBI_PRESS_OR_TOTP_HERE>
  4. You'll receive a Duo push even though you specified a TOTP or Yubikey OTP

Expected behavior
If you run vault login -method=ldap -mfa <MFA_ID_HERE>:passcode=<YUBI_PRESS_OR_TOTP_HERE> you'll receive login creds without a Duo push.

Environment:

  • Vault Server Version (retrieve with vault status): 1.12.0
  • Vault CLI Version (retrieve with vault version): 1.12.0
  • Server Operating System/Architecture: Ubuntu 20.04 on arm64

Additional context
The documentation should probably be updated to say that passcode= is required if it's not going to change. However, that's a bit janky in other places -- like when you log in via the Web UI, you have to remind your users to type in passcode= then press their Yubikey, but there's no indication of that in the UI either:
Screen Shot 2022-11-09 at 5 13 29 PM

@patcable
Copy link
Author

patcable commented Dec 1, 2022

👋 has anyone looked at this?

@patcable
Copy link
Author

Fixed by GH-18342 and GH-18610

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

No branches or pull requests

2 participants