Spring security SAML断言失败

Spring security SAML断言失败,spring-security,saml-2.0,spring-saml,okta,spring-security-saml2,Spring Security,Saml 2.0,Spring Saml,Okta,Spring Security Saml2,我有一个Spring SAML应用程序,Okta作为IDP。我正在做IDP启动的流程和 获取此异常: org.opensaml.common.SAMLException: Endpoint with message binding urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST and URL https://<myCompanyUrl>.com/saml/SSO wasn't found in local metadata org.o

我有一个Spring SAML应用程序,Okta作为IDP。我正在做IDP启动的流程和 获取此异常:

org.opensaml.common.SAMLException: Endpoint with message binding urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST and URL https://<myCompanyUrl>.com/saml/SSO wasn't found in local metadata
org.opensaml.common.SAMLException:具有消息绑定的端点urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST和URLhttps://.com/saml/SSO 在本地元数据中找不到
当我查看本地元数据时,我看到:

 <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
                                 Location="https://<server IP address> :<server port>/saml/SSO" index="0" isDefault="true"/>

看起来它正在尝试将包含主机名的URL与具有服务器IP地址的URL相匹配。位置字段是自动生成的。有人知道什么配置选项会影响这一点吗


更新1

以下是我的metadataGeneratorFilter配置:

<bean id="metadataGeneratorFilter" class="org.springframework.security.saml.metadata.MetadataGeneratorFilter">
    <constructor-arg>
        <bean class="org.springframework.security.saml.metadata.MetadataGenerator">
            <property name="entityId" value="https://myHostname/myApp"/>
        </bean>
    </constructor-arg>
</bean>

好吧,谜团已经解开:

根据Spring SAML文档,当您处于反向代理/负载平衡器设置中时,必须确保指定

<property name="entityBaseURL" value="https://www.myserver.com/spring-security-saml2-sample"/>


10.1反向代理和负载平衡器

在Okta的常规SAML设置中,似乎有一个名为单点登录URL的选项