Use second_factors for logic instead of deprecated second_factor.#47426
Merged
Use second_factors for logic instead of deprecated second_factor.#47426
second_factors for logic instead of deprecated second_factor.#47426Conversation
Contributor
|
🤖 Vercel preview here: https://docs-5lcqvjwq2-goteleport.vercel.app/docs/ver/preview |
Merged
07c1201 to
3dafdec
Compare
8de6ebb to
ed14fdc
Compare
ed14fdc to
d00fd0e
Compare
4f4e9dd to
5e2c711
Compare
d00fd0e to
b0d55c2
Compare
bb99e06 to
9bbd5af
Compare
Contributor
Author
|
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
bl-nero
approved these changes
Oct 14, 2024
codingllama
reviewed
Oct 14, 2024
Contributor
codingllama
left a comment
There was a problem hiding this comment.
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
codingllama
reviewed
Oct 16, 2024
codingllama
reviewed
Oct 16, 2024
codingllama
approved these changes
Oct 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_factordirectly. This makes it so the server logic can function as expected whether the user sets the deprecatedsecond_factorfield or the newsecond_factorsfield in their auth preference.The only remaining direct uses of
second_factorare in tests and the proxy ping response forsecond_factor.Helpers used:
cap.IsSecondFactorEnabledcap.IsSecondFactorEnforcedcap.IsSecondFactorTOTPAllowedcap.IsSecondFactorWebauthnAllowedcap.IsSecondFactorSSOAllowedThis 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