【问题标题】:Spring Security SAML Service Provider Metadata GenerationSpring Security SAML 服务提供者元数据生成
【发布时间】:2019-07-23 17:17:53
【问题描述】:

您好 Spring Security SAML 专业人士和爱好者,

例如,服务提供者元数据生成会产生类似

<md:AssertionConsumerService Location="http://localhost:8080/<app-servlet-context>/saml/SSO"/>

在本地 Tomcat 容器上部署和运行时,身份管理可以使用该容器来配置 SAML 消费者 URL。

我们正在使用 Okta 和 OneLogin 进行测试。大家都很开心。

我面临的问题是部署到 docker 容器上的相同 Web 应用程序配置预先配置了特定的 DNS 记录返回

<md:AssertionConsumerService Location="http://<app-context-root>:8080/<app-servlet-context>/saml/SSO"/>

用应用程序上下文根替换localhost(默认?)。

实际域 http://&lt;app-name&gt;.&lt;company-domain&gt;.com 无处可寻,导致 Assertion Consumer Service Location 值无法用于配置 IdP 发起的 SSO。

单次注销服务位置值的情况相同。

有人可以帮我理解这种行为并配置我的实现,以便服务提供者元数据中提供的 AssertionConsumerServiceSingleLogoutService 的位置看起来像

<md:AssertionConsumerService Location="http://<my-app-dns-domain-name>:8080/<app-servlet-context>/saml/SSO"/>

<md:SingleLogoutService Location="http://<my-app-dns-domain-name>:8080/<app-servlet-context>/saml/SingleLogout"/>

谢谢!

【问题讨论】:

    标签: spring-security saml-2.0 spring-saml


    【解决方案1】:

    您是如何生成元数据的?您是否以编程方式执行此操作?

    如果是,可以使用 MetadataGenerator 类的 setEntityBaseURL() 方法。

    【讨论】:

    • 您好 Sébastien,感谢您回答我的问题。似乎另一件事现在坏了,因为我现在收到以下错误 SAML message intended destination endpoint 'https://&lt;my-app-domain-name&gt;/&lt;app-servlet-context&gt;/saml/SSO' did not match the recipient endpoint 'http://&lt;app-servlet-context&gt;/&lt;app-servlet-context&gt;/saml/SSO 有什么想法吗?
    • 您好,您的某处似乎缺少“s”。您收到“http”,但似乎期待“https”。
    猜你喜欢
    • 2014-04-24
    • 2016-05-08
    • 1970-01-01
    • 2016-04-04
    • 2020-10-26
    • 1970-01-01
    • 2014-10-27
    • 2012-08-07
    • 2014-11-13
    相关资源
    最近更新 更多