-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add second_factors
#47169
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
Closed
Closed
Add second_factors
#47169
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
499db47
Add proto.
Joerger 949f538
Refactor enum decoding for reusability and use it for SecondFactorType.
Joerger 6e00700
Replace usage of cap.GetSecondFactor.
Joerger 2dc6ea8
Update validation logic.
Joerger 3ee5e5d
Add SecondFactorTypeString representation; Update second factor relat…
Joerger dca7da4
Replace useage and deprecate old SecondFactor methods; Derive SecondF…
Joerger dd46cb5
Add fileconf and warning logs.
Joerger 9dd277c
Undo gofumpt edits.
Joerger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,6 +191,7 @@ var SystemConnectors = []string{ | |
| } | ||
|
|
||
| // SecondFactorType is the type of 2FA authentication. | ||
| // Deprecated: Use types.SecondFactorType | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this cause problems on e/ ? (I'm not sure deprecating this is wise, see other comment threads.) |
||
| type SecondFactorType string | ||
|
|
||
| const ( | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -2099,6 +2099,20 @@ message AuthPreferenceSpecV2 { | |||||||
| // SignatureAlgorithmSuite is the configured signature algorithm suite for the cluster. | ||||||||
| // The current default value is "legacy". This field is not yet fully supported. | ||||||||
| SignatureAlgorithmSuite signature_algorithm_suite = 20; | ||||||||
|
|
||||||||
| // SecondFactors is a list of supported second factor types. | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| repeated SecondFactorType SecondFactors = 21 [(gogoproto.jsontag) = "second_factors,omitempty"]; | ||||||||
| } | ||||||||
|
|
||||||||
| // SecondFactorType is a type of second factor. | ||||||||
| enum SecondFactorType { | ||||||||
| SECOND_FACTOR_TYPE_UNSPECIFIED = 0; | ||||||||
| // SECOND_FACTOR_TYPE_OTP is OTP second factor. | ||||||||
| SECOND_FACTOR_TYPE_OTP = 1; | ||||||||
| // SECOND_FACTOR_TYPE_WEBAUTHN is WebAuthn second factor. | ||||||||
| SECOND_FACTOR_TYPE_WEBAUTHN = 2; | ||||||||
| // SECOND_FACTOR_TYPE_SSO is SSO second factor. | ||||||||
| SECOND_FACTOR_TYPE_SSO = 3; | ||||||||
| } | ||||||||
|
|
||||||||
| // U2F defines settings for U2F device. | ||||||||
|
|
||||||||
Oops, something went wrong.
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.
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.
Do we have to? Every config out there uses it, plus I see little harm in keeping it around.