Skip to content
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

Don't log error in legitimate nkey auth callout config case (4479). #4501

Merged
merged 2 commits into from Sep 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions server/auth.go
Expand Up @@ -279,7 +279,7 @@ func (s *Server) configureAuthorization() {
// Check for server configured auth callouts.
if opts.AuthCallout != nil {
s.mu.Unlock()
// Make sure we have a valid account and auth_users.
// Give operator log entries if not valid account and auth_users.
_, err := s.lookupAccount(opts.AuthCallout.Account)
s.mu.Lock()
if err != nil {
Expand All @@ -290,7 +290,8 @@ func (s *Server) configureAuthorization() {
var found bool
if len(s.users) > 0 {
_, found = s.users[u]
} else if len(s.nkeys) > 0 && !found {
}
if !found && len(s.nkeys) > 0 {
_, found = s.nkeys[u]
}
if !found {
Expand Down