首页 > 解决方案 > 反向代理背后的 Spring Security SAML

问题描述

我已在本地开发平台上成功地将 SSO/SAML2 与 Spring Security SAML 集成。

现在,我想将它安装在反向代理后面的生产环境中。反向代理配置如下: https://mycustomer.company.com/api/auth/xxx被重定向到http://local_ip:local_port/auth/xxx

我遵循了 SAMLContextProviderLB bean 配置(第 10.1 章 - https://docs.spring.io/spring-security-saml/docs/current-SNAPSHOT/reference/pdf/spring-security-saml-reference.pdf)。

但登录成功后,我被重定向到这个无效的网址:http ://mycustomer.company.com**/auth/**

我认为它来自#successRedirectHandler bean。但是,如果我输入正确的 URL ( https://mycustomer.company.com/api/auth/index.jsp ),我会在 SAML 识别过程中无限循环(返回 IDP,然后返回 SDP ...)。

我当然误解了配置中的某些内容,但我看不出在哪里。谢谢你的帮助。

标签: springspring-securityreverse-proxyspring-security-saml2

解决方案


推荐阅读