Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update
Browse files Browse the repository at this point in the history
smallinsky committed Sep 27, 2021
1 parent 9b81a2d commit 89a15c9
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 0 additions & 16 deletions lib/auth/auth.go
Original file line number Diff line number Diff line change
@@ -3090,22 +3090,6 @@ func (a *Server) isMFARequired(ctx context.Context, checker services.AccessCheck
return &proto.IsMFARequiredResponse{Required: true}, nil
}

func databaseRoleMatchers(dbProtocol string, user, database string, labels map[string]string) services.RoleMatchers {
switch dbProtocol {
case defaults.ProtocolPostgres:
return services.RoleMatchers{
&services.DatabaseLabelsMatcher{Labels: labels},
&services.DatabaseUserMatcher{User: user},
&services.DatabaseNameMatcher{Name: database},
}
default:
return services.RoleMatchers{
&services.DatabaseLabelsMatcher{Labels: labels},
&services.DatabaseUserMatcher{User: user},
}
}
}

// mfaAuthChallenge constructs an MFAAuthenticateChallenge for all MFA devices
// registered by the user.
func (a *Server) mfaAuthChallenge(ctx context.Context, user string, u2fStorage u2f.AuthenticationStorage) (*proto.MFAAuthenticateChallenge, error) {
2 changes: 1 addition & 1 deletion lib/srv/db/common/role/role.go
Original file line number Diff line number Diff line change
@@ -46,4 +46,4 @@ func DatabaseRoleMatchers(dbProtocol string, user, database string, labels map[s
&services.DatabaseNameMatcher{Name: database},
}
}
}
}

0 comments on commit 89a15c9

Please sign in to comment.