【发布时间】:2021-12-23 08:14:24
【问题描述】:
专家,
在我的 spring boot 2.5.5 应用程序中,我有以下 SSO 与 Azure AD 的依赖项。
参考:https://github.com/pateluday07/saml-sso-and-slo-demo-idp-azure-sp-springboot
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml2-core</artifactId>
<version>1.0.10.RELEASE</version>
<exclusions>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
我的 application.properties 有以下条目
service.provider.entity.id=APPNAME
idp.metedata.url=https://login.microsoftonline.com/<ID>/federationmetadata/2007-06/federationmetadata.xml?appid=<AppID>
saml.keystore.password= password
saml.private.key.alias= alias
saml.private.key.password: password
saml.keystore.file=classpath:/saml/dev/samlKeystore.jks
在 Azure 端,创建一个应用,实体 ID 为 APPNAME,回复 URL 为 https://servername/appname/saml/SSO
现在,当应用程序部署在服务器上 - servername 并被访问时,我收到以下错误
奇怪的是,如果我将 Azure 上的回复 URL 更改为 http://localhost:8080/appname/saml/SSO 并在本地部署应用程序并访问它,那么它就可以工作了。
知道出了什么问题。
【问题讨论】: