kong-plugin-jwt-keycloak
kong-plugin-jwt-keycloak copied to clipboard
How to enable basic auth and jwt-keycloak plugin for a single service
Hello @gbbirkisson ,
I am using your plugin and now I have a requirement to enable both basic-auth and jwt-keycloak plugin for a single service. From the documentation https://docs.konghq.com/1.4.x/auth/#multiple-authentication, I created an anonymous user and mapped them in the configs for basic-auth and jwt-keycloak plugin. I also added request termination as suggested, but now the requests made via basic auth only work whereas the one with jwt-keycloak doesn't.
Can you provide me some information to fix the issue?
Steps :
- enable both plugins for a service
- created an anonymous user
- enable anonymous user for both the plugins
- add request termination for the service (tried with exit code 401)
- requests via basic auth works but the ones made with jwt-keycloak doesn't
I do not have much experience with this. Do you get a 401 when trying calling the service with a token?
The Basic Auth plugin priority is 1001 but the default priority for this plugin is 1005, meaning that the this plugin is run first. You can flip it by setting the env variable JWT_KEYCLOAK_PRIORITY to 1000 or something lower. Do your tests again post the result.
I am about to archive this repository. Please move your issues/PRs the successor of this repo: https://github.com/telekom-digioss/kong-plugin-jwt-keycloak