使用kong-jwt2header插件在上游获取索赔
我已经在Kong中安装了 kong-jwt2header 插件,配置config.token_required = true
。
我还配置了Kong的身份服务,该服务用于生成JWT令牌。当我们设置config.token_required = true
在kong-jwt2header插件中抛出一个错误{“ error”:“在请求jwt token”}
nto offer {身份服务。
现在,我有两个选项
- 设置
config.token_required = false
或 - 将身份服务保留在Kong Gateway之外。 因此,从身份服务请求令牌时,不需要JWT令牌。
从上面的两个方面,哪种是最好的方法?还是有更好的方法可以在上游发送索赔?
I have installed the kong-jwt2header plugin in the Kong with configuration config.token_required=true
.
I also have configured the Identity service in kong which is used to generate the JWT token. As we set the config.token_required=true
in kong-jwt2header plugin throws an error {"error": "No valid JWT token found"}
while requesting a JWT token from the Identity service.
Now I have two options
- Set the
config.token_required=false
Or - Keep the Identity service outside the Kong gateway.
So that JWT token is not required while requesting a token from an identity service.
Which is the best way from the above two? Or are there any better ways we can send the claims upstream?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论