【问题标题】:Error Message: No peer endpoint available to which to send SAML response错误消息:没有可用于发送 SAML 响应的对等端点
【发布时间】:2015-03-13 02:54:23
【问题描述】:

我在我的 Mac 上安装了 Shibboleth SP。我尝试与测试 shib 建立连接。但是,我在登录后收到此错误。

 Error Message: No peer endpoint available to which to send SAML response 

这是我的 Shibboleth2.xml

<Sessions lifetime="28800" timeout="3600" relayState="ss:mem"
          checkAddress="false" handlerSSL="false" cookieProps="http">


    <SSO entityID="https://idp.testshib.org/idp/shibboleth"
         discoveryProtocol="SAMLDS" forceAuthn="true">
      SAML2 SAML1
    </SSO>


    <MetadataProvider type="XML" uri="http://www.testshib.org/metadata/testshib-providers.xml"
          backingFilePath="testshib-two-idp-metadata.xml" reloadInterval="180000">
    </MetadataProvider>

这是我的元数据

 <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://localhost/Shibboleth.sso/SAML2/POST" index="1"/>
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="https://localhost/Shibboleth.sso/SAML2/POST-SimpleSign" index="2"/>
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS" Location="https://localhost/Shibboleth.sso/SAML2/ECP" index="3"/>
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post" Location="https://localhost/Shibboleth.sso/SAML/POST" index="4"/>

为什么会出现这个错误?

【问题讨论】:

    标签: shibboleth


    【解决方案1】:

    尝试请求,然后 Testshib 的 idp 记录在 https://idp.testshib.org/cgi-bin/idplog.cgi?lines=300。对我来说,有这样一条错误消息:

    05:15:03.350 - WARN [org.opensaml.saml2.binding.AuthnResponseEndpointSelector:206] -
    Relying party 'my.entity.id' requested the response to be returned to endpoint with ACS
    URL 'https://wrong-host/Shibboleth.sso/SAML2/POST'  and binding 'urn:oasis:names:tc:
    SAML:2.0:bindings:HTTP-POST' however no endpoint, with that URL and using a supported
    binding,  can be found in the relying party's metadata 
    

    但我的元数据说

    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" 
    Location="https://right-host/Shibboleth.sso/SAML2/POST" index="1"/>
    

    如您所见,shibd 要求重定向到错误的位置。问题是 shibd 使用来自 Apache 的主机名。 (我假设您使用的是 Apache。如果不是,设置可能类似。)

    解决方案是转到/etc/apache2/sites-enabled/default-ssl.conf 并将ServerName 设置为与您的元数据匹配的正确host:port。然后,打开/etc/apache2/apache2.conf 并确保UseCanonicalNameOn

    这个在docs里有详细介绍,推荐仔细阅读。

    【讨论】:

      【解决方案2】:

      此消息表明 Testshib 身份提供者的配置与您尝试登录的 Shibboleth 服务提供者的配置不匹配。我怀疑在您的元数据提供的断言消费者服务 URL 中使用名称“localhost”会导致问题。 IDP 正在尝试将 SAML 响应发送到https://localhost/Shibboleth.sso/SAML2/POST,但当然没有断言消费者服务,因为在这种情况下,“localhost”就是 IDP 本身。

      所以,我会首先从 Testshib 中删除所有内容,更改您的 SP 的 entityID 以使其更加独特(使用您的 IP 地址而不是 localhost)并将您的 SP 的更新元数据重新添加到 TestShib。

      【讨论】:

      • 我认为这是不对的。 IDP 不发出请求,它重定向浏览器,因此 localhost 应该可以工作。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-28
      • 2023-03-22
      • 2019-11-25
      • 1970-01-01
      • 2022-08-16
      • 2022-08-19
      • 1970-01-01
      相关资源
      最近更新 更多