Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/client/webclient/webclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ type AuthenticationSettings struct {
// PreferredLocalMFA is a server-side hint for clients to pick an MFA method
// when various options are available.
// It is empty if there is nothing to suggest.
PreferredLocalMFA constants.SecondFactorType `json:"preferred_local_mfa,omitempty"`
PreferredLocalMFA string `json:"preferred_local_mfa,omitempty"`
// AllowPasswordless is true if passwordless logins are allowed.
AllowPasswordless bool `json:"allow_passwordless,omitempty"`
// AllowHeadless is true if headless logins are allowed.
Expand Down
2 changes: 1 addition & 1 deletion api/client/webclient/webconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ type WebConfigAuthSettings struct {
// PreferredLocalMFA is a server-side hint for clients to pick an MFA method
// when various options are available.
// It is empty if there is nothing to suggest.
PreferredLocalMFA constants.SecondFactorType `json:"preferredLocalMfa,omitempty"`
PreferredLocalMFA string `json:"preferredLocalMfa,omitempty"`
// LocalConnectorName is the name of the local connector.
LocalConnectorName string `json:"localConnectorName,omitempty"`
// PrivateKeyPolicy is the configured private key policy for the cluster.
Expand Down
1 change: 1 addition & 0 deletions api/constants/constants.go
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and deprecate second_factor

Do we have to? Every config out there uses it, plus I see little harm in keeping it around.

Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ var SystemConnectors = []string{
}

// SecondFactorType is the type of 2FA authentication.
// Deprecated: Use types.SecondFactorType
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 (
Expand Down
14 changes: 14 additions & 0 deletions api/proto/teleport/legacy/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// SecondFactors is a list of supported second factor types.
// SecondFactors is a list of supported second factor types, in ascending
// order of preference (first item is preferred).

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.
Expand Down
Loading