You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/01 14:24:37 UTC

[GitHub] [apisix] jenskeiner opened a new pull request #2913: fix: Use correct name when accessing Authorization header in auth-keycloak plugin.

jenskeiner opened a new pull request #2913:
URL: https://github.com/apache/apisix/pull/2913


   ### What this PR does / why we need it:
   The `auth-keycloak` plugin expects to find a bearer token in the standard `Authorization` header. However, it tries to obtain a token from a header called `authorization`, i.e. not properly capitalized. This PR fixes the capitalization so the correct header is used; cf. https://en.wikipedia.org/wiki/List_of_HTTP_header_fields.
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] moonming commented on pull request #2913: fix: Use correct name when accessing Authorization header in auth-keycloak plugin.

Posted by GitBox <gi...@apache.org>.
moonming commented on pull request #2913:
URL: https://github.com/apache/apisix/pull/2913#issuecomment-736635148


   Is http header case sensitive? @membphis 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] jenskeiner commented on pull request #2913: fix: Use correct name when accessing Authorization header in auth-keycloak plugin.

Posted by GitBox <gi...@apache.org>.
jenskeiner commented on pull request #2913:
URL: https://github.com/apache/apisix/pull/2913#issuecomment-736584651


   To be honest, I currently fail to see why unit tests in the non-fixed version didn't blow up before. Need to investigate that.
   
   But I was able to confirm that the header was not found when the incoming request used `authorization` instead of `Authorization`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on pull request #2913: fix: Use correct name when accessing Authorization header in auth-keycloak plugin.

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #2913:
URL: https://github.com/apache/apisix/pull/2913#issuecomment-736637249


   > Is http header case sensitive? @membphis
   
   Case insensitive, confirm.  `Authorization` is more readable.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on pull request #2913: fix: Use correct name when accessing Authorization header in auth-keycloak plugin.

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #2913:
URL: https://github.com/apache/apisix/pull/2913#issuecomment-736891379


   @jenskeiner many thx, merged


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis merged pull request #2913: fix: Use correct name when accessing Authorization header in auth-keycloak plugin.

Posted by GitBox <gi...@apache.org>.
membphis merged pull request #2913:
URL: https://github.com/apache/apisix/pull/2913


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org