Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex McGrath committed May 23, 2024
1 parent 583a24c commit 4d572b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions lib/auth/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,8 @@ func generateAuthority(ctx context.Context, asrv *Server, caID types.CertAuthID)
}

var secondFactorUpgradeInstructions = `
Teleport v16 removed support for local authentication without a second
factor enabled. The auth_service should be updated to enable it.
Teleport requires second factor authentication for local users.
The auth_service configuration should be updated to enable it.
auth_service:
authentication:
Expand All @@ -722,7 +722,6 @@ auth_service:
For more information:
- https://goteleport.com/docs/access-controls/guides/webauthn/
- https://goteleport.com/docs/changelog/
`

func initializeAuthPreference(ctx context.Context, asrv *Server, newAuthPref types.AuthPreference) error {
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func GetModules() Modules {
return modules
}

var ErrCannotDisableSecondFactor = errors.New("cannot disable two-factor authentication")
var ErrCannotDisableSecondFactor = errors.New("cannot disable multi-factor authentication")

// ValidateResource performs additional resource checks.
func ValidateResource(res types.Resource) error {
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/modules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestValidateAuthPreferenceOnCloud(t *testing.T) {

authPref.SetSecondFactor(constants.SecondFactorOff)
_, err = testServer.AuthServer.UpdateAuthPreference(ctx, authPref)
require.EqualError(t, err, "cannot disable two-factor authentication")
require.EqualError(t, err, modules.ErrCannotDisableSecondFactor.Error())
}

func TestValidateSessionRecordingConfigOnCloud(t *testing.T) {
Expand Down

0 comments on commit 4d572b9

Please sign in to comment.