-
Notifications
You must be signed in to change notification settings - Fork 8
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
preauth - http headers are evaluated in a case-sensitive manner #125
Comments
Related: traefik/traefik#466 |
using the following patch is fixing the behaviour:
but we might want to avoid the call to |
Since the hashmap is passed when instanciating the The map will be reused afterwards here, when mapping the headers onto a |
…sensitive-125 preauth - http header names are case insensitive (#125)
Relying on the http specifications, the HTTP header names should be considered as case-insensitive, meaning "preauth-username should be the same as "Preauth-Username".
in the following code snippet:
https://github.com/georchestra/georchestra-gateway/blob/main/gateway/src/main/java/org/georchestra/gateway/security/preauth/PreauthAuthenticationManager.java#L57-L74
the
HttpHeaders
object is following the specs correctly (callinggetFirst("preauth-username")
returns the same result as callinggetFirst("Preauth-Username")
), but as soon as we built our own hashmap (methodextract()
), we end up with a map in which we expect the headers names to be lowercased.If the upstream proxy (say traefik) is sending normalized versions of the headers (like
Preauth-Username
), no matter how it is actually specified in its configuration, then we will miss the expected headers in the hashmap being built by theextract()
method.One workaround could be to lowercase the key in the
extract()
method.The text was updated successfully, but these errors were encountered: