我的 Web 应用程序部署在 Amazon ECS 上并使用 ALB 并从堡垒主机访问此应用程序。 我正在使用 Okta 进行 SSO。 登录页面成功重定向到 Okta,在请求返回应用程序服务器时进行身份验证后,我收到以下错误 - 我正在使用 CustomSAMLContextProvider ...
提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供 中文繁体 英文版本 中英对照 版本,有任何建议请联系yoyou2525@163.com。
我在我的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
并确保UseCanonicalName
为On
。
这在文档中有详细说明,我建议仔细阅读。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.