gy09535 edited a comment on issue #3115:
URL: https://github.com/apache/apisix/issues/3115#issuecomment-750893877


   > > > ### Issue description
   > > > 
我想实现一个网关自定义鉴权的功能,很类似rbac的拓展,但我们并不是用的这套rbac进行认证的,我想请教一下,是否有拓展能个填写自定义的请求地址,可以根据目标服务返回状态判断是否通行,并且可以将访问的数据携带下游服务中。如下图示意:
   > > > 
![image](https://user-images.githubusercontent.com/19376576/103063831-70627b00-45ed-11eb-8d12-f72e79325b38.png)
   > > > ### Environment
   > > > 
   > > > * apisix version (cmd: `apisix version`):
   > > > * OS: (cmd: `uname -a`)
   > > > * OpenResty / Nginx version: (cmd: `nginx -V` or `openresty -V`)
   > > 
   > > 
   > > I have do the some similar feature, you should add two plugins, one is 
for define the hook contract , and when the hook api response, you can restore 
the message in context. another is the combine plugin which you can combine the 
message and the request body with some rules, and then you can set the request 
to the upstream.
   > 
   > 谢谢提醒,想观摩观摩,你的开源吗?
   
   Sure, I should refactor it and the auth server can response JWT , the 
backend can resolve the JWT to get user info . I think it is a good way to 
change token to JWT, because of not want to export user info to client.
   The "openid-connect" is the standard to do that thing ,but you must flow its 
rules, for some system it has the self auth logical,  we can add auth hook to 
support it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to