Closed wlonkly closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 41.92%. Comparing base (
9a4c5b6
) to head (22e706d
). Report is 32 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
any related unit test updates?
any related unit test updates?
There was no test coverage of the option selection/presentation today so I didn't update the tests, but happy to add coverage (I think... I don't work in Go often and the current tests in TestVerifyMfa_Duo
all focus on the request flow and simulating a push, so I could use a pointer in the right direction if possible!)
@wlonky yes, there seems to be coverage the modified code https://app.codecov.io/gh/Versent/saml2aws/blob/master/pkg%2Fprovider%2Fokta%2Fokta.go#L974
consider creating a copy of https://github.com/Versent/saml2aws/blob/14c45abf5f8dcee4d39a269cf1a55dcf28006643/pkg/provider/okta/okta_test.go#L268 and updating for 1Passcode` path (some processing could be shared between these two flows)
Got it, I'll see what I can do! Probably won't get to this until the weekend.
Ah, something's not right. I'll comment when this is good to go, sorry.
Sorted and ready to go!
@gliptak Is this ready to merge?
Rats, I need to make one more change -- I just used my local build on my actual work Okta account, and I see duplicate "Passcode" options (because I have both token
and phone1
authenticators; my test account only had phone1
).
Rats, I need to make one more change -- I just used my local build on my actual work Okta account, and I see duplicate "Passcode" options (because I have both
token
andphone1
authenticators; my test account only hadphone1
).
OK - just let me know when its ready
@mapkon Should be all set now. I switched around the logic to only add Passcode
once, rather than uniq-ing it at the end. Duo makes no distinction between phone passcodes or token passcodes, so no need to distinguish; any passcode is valid.
Any Duo mobile app registered with Duo, usually for Duo Push, also has the capability to produce HOTP passcodes:
In the case where Duo Push is administratively disabled and Yubikeys (etc) are not provided, HOTP might be the only way for a user to perform Duo MFA. This is the case for us, which is preventing our non-Yubikey users from using saml2aws at all.
This change adds Passcode to the list of MFA possibilities whenever a
phone1
is registered with Duo, to support using HOTP.I debated between adding it like this, or adding another conditional to the
option[value="token"]
case -- let me know if that would be preferable. I also checked the other Duo-enabled providers, but none of the others use this kind of logic to limit the MFA options presented to the user.