I went through this tutorial on KONG https://getkong.org/plugins/jwt/ I have an understanding of JWT and authorization concepts. I have prototyped JWT with Spring Boot where I could put my own key value like this {"authorizations":"role_admin, role_user"}. It is easy to do that in Spring Boot but I am not able to find information on how to do this with KONG. Anyone has any info about it? Basically, I want to add my own authorization list and then decide if the api that is being accessed by the consumer, if the consumer has any or all of those authorizations |
Konrad:This is a useful discussion. Good exchange of points. Few things:1. The ACL flow which you said would be nice to exist is what I believe so too. This would have been a good open source project for me to contribute to :). I hope plugin will come with long term support. It will be a good plugin to have.
2. I guess if you have skipped creating a consumer in Kong, I would want to know that does Kong in your case participate in JWT validation at all or not?
3. When I played with Kong, I realized that if I want Kong to at least verify the signature of JWT, I had to create a consumer and use the secrets of the consumer to verify the token signature at Kong layer. If token is not tampered with, Kong will just relay the request further down. If token signature seems invalid, Kong sends 401, etc in that case and does not even let the call go further. I think in your case, you just use Kong for plain routing of the APIs and Kong does not participate in verifying the JWT signature either and the service does that. Is that how it is?