Graylog2 / graylog-plugin-auth-sso

SSO support for Graylog through trusted HTTP headers set by load balancers or authentication proxies
Other
50 stars 13 forks source link

Plugin does not respect header case #52

Open andymelichar opened 4 years ago

andymelichar commented 4 years ago

Problem description

The SSO plugin isn't respecting the case of the headers - all headers appear to be pulled into the plugin as lowercase. If nginx is sending Remote-User, the plugin interprets it as remote-user which can be very confusing for people trying to get the plugin to work properly.

Steps to reproduce the problem

  1. Set up Graylog behind nginx as a reverse proxy
  2. Set up nginx to return the header "Remote-User" to Graylog proxy_set_header Remote-User $email;
  3. Install SSO plugin into Graylog
  4. Set up SSO and configure it to use "Remote-User" as the username header (matching case of the nginx header)
  5. SSO plugin will not see the "Remote-User" header and SSO will not properly function
  6. Change SSO to look for "remote-user" (does not match the case of the nginx header) and it will work successfully

Plugin should either lowercase all configured headers before attempting to match them, or should not lowercase the headers being passed into it in the first place.

Environment