OAuth Plugin Not Working - Kubernetes Ingress

I want to enable centralized authentication when deploying kong as a kubernetes ingress controller running with postgres database. Hence I deployed the plugin as decribed in this yaml file and added the plugin to the ingress component as shown in this yaml.

Even after applying the plugin I do not get an error if the Authorization header is not passed when making the api request through curl. I get a valid api response.

If I modify my application code to support OAuth2 authentication then it works (i.e. I get the 401 error) but that would defeat the purpose of having centralized authentication since each microservice would have to add support for OAuth2. I am hoping kong can do that centrally.

Could you please guide me on what could be missing?


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ