I have been using Kong db-less 1.4.1, runing on Kubernetes (OpenShift)
I have configured (enabled) JWT plugin as global to be used for all rest APIs behind the Kong but I also need to have anonymous in the same plugin as exceptions, I created the jwt plugin by below yaml
Moreover I have also created “KongConsumer” and “KongCredential” , this plugin works perfectly but when I add anonymous in this configuration, it doesn’t work anymore
Please do me a favor and send me an practical example to solve my problem
Applying username as value of anonymous has no problem in 2.0.2 but the actual functionality of this global doesn’t work properly
when I turn the jwt plugin global and add anonymous : username then all api can be invoked with no security, I expected to give --header “apiKey = something as key” to the request to let this specific request come in with no token otherwise other requests should have token as a must
We’re still stuck in this plugin usage
I want to have authenticated requests by default but also have some exceptions for example if you are exposing the token provider API behind the Kong , it has to be Unauthenticated request because you will ask for getting token but all the other APIs behind the Kong have to be Authenticated requests by token
What’s the practical solution ? could you please give me an applicable jwt global plugin configuration with anonymous in it and a client request example to show how the anonymous request has to look like ?
Create a /iot/api route in Kong with the JWT plugin enabled on it.
Create a more specific /iot/api/token route in Kong and don’t enable the JWT plugin on it.
That should be it.