haowang-pony opened a new issue #5253:
URL: https://github.com/apache/apisix/issues/5253


   ### Issue description
   
   Currently I want to use apisix in k8s as ingress-controller and I expose 
apisix gateway as Nodeport such that the service outside the kubenetes could 
visit the apisix. 
   
   And I also want to integrate keycloak with apisix. The keycloak was deployed 
in the outside the k8s. Therefore I have such architecture.
   
   ![Screenshot 
(47)](https://user-images.githubusercontent.com/67166358/137556507-e333f3ce-05aa-4525-af0d-002ea02933c5.png)
    
   But I met a problem: after receiving redrect request from keycloak, the 
apisix couldn't redirect the url to service. And apisix just send the request 
back to keycloak and then keycloak send request back to apisix. Threfore I 
would have such error p`onyai.onelogin.com redirected you too many times. `  
   
   
   I checked the codebase and found [such 
comment](https://github.com/apache/apisix/blob/153e643674f13df98fb0929085ff61240aa73c66/apisix/plugins/openid-connect.lua#L294).
 And I checked the request to has already set access token in the cookies.  I'm 
not sure whether I messed some configs  or my usage is not allowed. If my usage 
is not allowed, how to use apisix as ingress-controller and integrate with 
keycloak outside the k8s?
   
   Thanks in advance!
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`): 1.2.0
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to