JWT and KONG with custom authrizations

放肆的年华 提交于 2019-12-08 15:06:30

Kong community edition can handle only the authentication process, (give or deny access to a customer).

Authorization process (what a given customer can do in your application) is handled by your application or by https://getkong.org/plugins/ee-oauth2-introspection/ oauth2 introspection plugin which is enterprise edition only

you can write your own authorization server based on X-Consumer-Username request header if user passed authentication or original token header proxied by kong

hope helps

The kong jwt plugin does not support sending custom payload parameters to the upstream api. It does however seem like you can use this plugin (I have not tested it):

https://github.com/wshirey/kong-plugin-jwt-claims-headers

Update:

If you set Kong to forward all headers you'll get the raw Authorization header with the jwt token. So you could base64 decode the jwt token and pull out the claims/payload parameters you need manually in your service.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!