-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Use second_factors
for logic instead of deprecated second_factor
.
#47426
Conversation
🤖 Vercel preview here: https://docs-5lcqvjwq2-goteleport.vercel.app/docs/ver/preview |
07c1201
to
3dafdec
Compare
8de6ebb
to
ed14fdc
Compare
ed14fdc
to
d00fd0e
Compare
4f4e9dd
to
5e2c711
Compare
d00fd0e
to
b0d55c2
Compare
bb99e06
to
9bbd5af
Compare
In this commit b0d55c2 I fixed some issues with the logic around deleting your last mfa device or passkey. IMO the updated logic is simple enough to include in this PR, especially since the fix comes as a direct result from the new helpers and simplified second factors handling. Would be good to have @codingllama's or @bl-nero's approval. |
2bc96f1
to
d4536b2
Compare
…delete disabled webauthn devices; Update tests and remove cases that depend on second factor optional (deprecated).
d4536b2
to
8ce6e31
Compare
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.
Could we update the PR title and description so both are more descriptive of the changes done here?
second_factors
- Follow upsecond_factors
for second factor logic instead of deprecated second_factor
.
second_factors
for second factor logic instead of deprecated second_factor
.second_factors
for logic instead of deprecated second_factor
.
9e5d6f7
to
a08fa38
Compare
This PR does not introduce any functional changes.
Follow up to #47233 to use the second factor helper methods for second factor logic, instead of using
second_factor
directly. This makes it so the server logic can function as expected whether the user sets the deprecatedsecond_factor
field or the newsecond_factors
field in their auth preference.The only remaining direct uses of
second_factor
are in tests and the proxy ping response forsecond_factor
.Helpers used:
cap.IsSecondFactorEnabled
cap.IsSecondFactorEnforced
cap.IsSecondFactorTOTPAllowed
cap.IsSecondFactorWebauthnAllowed
cap.IsSecondFactorSSOAllowed
This updated logic should be easier to read as well, so I hope this PR isn't too terribly difficult to review. Getting this in before the v17 test plan should also ease some concern.
Depends on #47233