Skip to content

Commit

Permalink
Fix SAML authenticator. (Velocidex#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette authored Sep 9, 2021
1 parent 299cf1c commit cb3ee36
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/authenticators/saml.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ func (self *SamlAuthenticator) AuthenticateUserHandler(
return
}

username := samlsp.AttributeFromContext(r.Context(), userAttr(config_obj))
sa, ok := session.(samlsp.SessionWithAttributes)
if !ok {
reject_handler.ServeHTTP(w, r)
return
}

username := sa.GetAttributes().Get(userAttr(config_obj))
user_record, err := users.GetUser(config_obj, username)

perm, err2 := acls.CheckAccess(config_obj, username, acls.READ_RESULTS)
Expand Down

0 comments on commit cb3ee36

Please sign in to comment.