Hello,
Has anyone successfully configured NGINX to run as a forward proxy and also to run the same forward proxy as a SAML SP?
I used the "ngx_http_proxy_connect_module" to run the OSS version of NGINX as a forward proxy.
ngx_http_proxy_connect_module
https://github.com/chobits/ngx_http_proxy_connect_module/
I also tried to run the OSS version of NGINX as a SAML SP using the njs code provided in "nginx-saml".
nginx-saml
https://github.com/nginxinc/nginx-saml
However, this attempt failed.
Let me explain what I tried.
I tried to connect to the web server using a browser from a Windows client.
I set up the communication from the client to the browser to go through NGINX, which was running as a forward proxy.
When the browser tried to connect to the web server, the browser was redirected by NGINX to the SAML IdP (together with the SAML request sent to the IdP).
The IdP then sends the SAML response to the browser and at the same time tries to direct the browser to NGINX.
Up to this point, NGINX was working as expected.
However, after that the browser never reached the web server.
The browser tried to connect to the web server multiple times, but there was no response from NGINX to those attempts.