簡體   English   中英

錯誤消息:沒有可用於發送SAML響應的對等端點

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

我在我的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"/>

為什么我收到此錯誤?

此消息表示Testshib Identity Provider的配置與您嘗試登錄的Shibboleth Service Provider之間不匹配。 我懷疑在元數據提供的斷言使用者服務URL中使用名稱“localhost”會導致問題。 IDP正在嘗試將SAML響應發送到https://localhost/Shibboleth.sso/SAML2/POST ,但當然沒有Assertion Consumer Service,因為“localhost”在這種情況下是IDP本身。

因此,我首先從Testshib中刪除所有內容,更改SP的entityID以使其更加獨特(使用您的IP地址而不是localhost),並將SP的更新元數據重新添加到TestShib。

嘗試請求,然后在https://idp.testshib.org/cgi-bin/idplog.cgi?lines=300上測試Testshib的idp日志。 對我來說,有一個這樣的錯誤信息:

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

這在文檔中有詳細說明,我建議仔細閱讀。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM