【问题标题】:Spring Security SAML and ECPSpring Security SAML 和 ECP
【发布时间】:2014-11-27 21:58:27
【问题描述】:

我有一个使用 Spring Security SAML 扩展(1.0 版)的 Java Web 应用程序,充当 SP。此 SP 使用预配置的元数据,它适用于基于浏览器的客户端。我现在正在尝试添加 ECP 支持,并且已将以下内容添加到元数据 bean 中的 SP 扩展元数据 bean:

<property name="ecpEnabled" value="true"/>

我使用以下作为标头参数的 GET 请求:

Accept: application/vnd.paos+xml
PAOS: ver='urn:liberty:paos:2003-08';'urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp'

我的网络应用抛出此异常:

HTTP 状态 500 - org.opensaml.saml2.metadata.provider.MetadataProviderException:服务提供者没有可用于所选配置文件 org.opensaml.saml2.metadata.impl.SPSSODescriptorImpl@7fe2dde8 的断言消费者服务

...根本原因...

org.opensaml.saml2.metadata.provider.MetadataProviderException:服务提供者没有可用于所选配置文件 org.opensaml.saml2.metadata.impl.SPSSODescriptorImpl@7fe2dde8 的断言消费者服务 org.springframework.security.saml.websso.WebSSOProfileImpl.getAssertionConsumerService(WebSSOProfileImpl.java:205) org.springframework.security.saml.websso.WebSSOProfileECPImpl.sendAuthenticationRequest(WebSSOProfileECPImpl.java:55) org.springframework.security.saml.SAMLEntryPoint.initializeECP(SAMLEntryPoint.java:185).....

看起来它正在尝试启动 ECP 流程,但我不明白为什么会出现此异常。我遵循了 Spring SAML 文档,它在 ECP 部分中没有提及任何相关内容。

【问题讨论】:

    标签: spring-saml


    【解决方案1】:

    确保您的 SP 元数据包含绑定 urn:oasis:names:tc:SAML:2.0:bindings:PAOS 的端点。

    Spring SAML 示例应用程序的元数据生成 UI 有一个用于包含它的复选框,或者使用属性 bindingSSO 将其添加到 MetadataGenerator bean,例如:

    <property name="bindingsSSO">
        <list>
            <value>post</value>
            <value>artifact</value>
            <value>paos</value>
        </list>
    </property>
    

    【讨论】:

    • 做到了!谢谢弗拉德!
    猜你喜欢
    • 2020-05-31
    • 2015-07-30
    • 2015-09-23
    • 2014-10-14
    • 2014-08-06
    • 2015-04-10
    • 2019-06-25
    • 1970-01-01
    • 2015-08-27
    相关资源
    最近更新 更多