Spring Security SAML behind reverse proxy

576 Views Asked by At

I have successfully integrated SSO/SAML2 on my local development platform with Spring Security SAML.

Now, i want to install it on our production environment behind a reverse-proxy. Reverse proxy is configured as following : https://mycustomer.company.com/api/auth/xxx is redirected to http://local_ip:local_port/auth/xxx

I have followed SAMLContextProviderLB bean configuration (Chapter 10.1 - https://docs.spring.io/spring-security-saml/docs/current-SNAPSHOT/reference/pdf/spring-security-saml-reference.pdf).

But after login successful, i am redirected to this invalid url : http://mycustomer.company.com**/auth/**

I think that it comes from the #successRedirectHandler bean. But if I put the correct URL (https://mycustomer.company.com/api/auth/index.jsp), i loop indefinitely in the SAML identification process (back to IDP, then SDP...).

I certainly misunderstood something in the configuration, but i cant see where. Thanks for your help.

0

There are 0 best solutions below