简体   繁体   English

使用Microsoft ADFS的Spring Security SAML身份验证失败

[英]Spring security SAML authentication failure with Microsoft ADFS

We are trying to use Spring Security to connect to a Microsoft ADFS server. 我们正在尝试使用Spring Security连接到Microsoft ADFS服务器。 We set up the Spring SAML sample application, as described in Spring security documentation, but we get the following errors on the ADFS server. 如Spring安全性文档中所述,我们设置了Spring SAML示例应用程序,但是在ADFS服务器上遇到以下错误。

Exception details: 
    Microsoft.IdentityServer.Protocols.Saml.SamlProtocolSignatureVerificationException: MSIS7075: SAML authentication request for the WebSSO profile must not specify any SubjectConfirmations.
       at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolManager.ValidateSignatureRequirements(SamlMessage samlMessage)
       at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolManager.Issue(HttpSamlRequestMessage httpSamlRequestMessage, SecurityTokenElement onBehalfOf, String sessionState, String relayState, String& newSamlSession, String& samlpAuthenticationProvider, Boolean isUrlTranslationNeeded, WrappedHttpListenerContext context, Boolean isKmsiRequested)
       at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.RequestBearerToken(WrappedHttpListenerContext context, HttpSamlRequestMessage httpSamlRequest, SecurityTokenElement onBehalfOf, String relyingPartyIdentifier, Boolean isKmsiRequested, Boolean isApplicationProxyTokenRequired, String& samlpSessionState, String& samlpAuthenticationProvider)
       at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.BuildSignInResponseCoreWithSerializedToken(HttpSamlRequestMessage httpSamlRequest, WrappedHttpListenerContext context, String relyingPartyIdentifier, SecurityTokenElement signOnTokenElement, Boolean isKmsiRequested, Boolean isApplicationProxyTokenRequired)
       at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.BuildSignInResponseCoreWithSecurityToken(SamlSignInContext context, SecurityToken securityToken, SecurityToken deviceSecurityToken)
       at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.Process(ProtocolContext context)
       at Microsoft.IdentityServer.Web.PassiveProtocolListener.ProcessProtocolRequest(ProtocolContext protocolContext, PassiveProtocolHandler protocolHandler)
       at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)

And then: 接着:

The verification of the SAML message signature failed. 
Message issuer: http://adfs.xxxx.yyyy.com/adfs/services/trust 
Exception details: 
MSIS7075: SAML authentication request for the WebSSO profile must not specify any SubjectConfirmations. 

This request failed. 

User Action 
Verify that the message issuer configuration in the AD FS configuration database is up to date. 
Configure the signing certificate for the specified issuer. 
Verify that the issuer's certificate is up to date. 
Verify the issuer and server message signing requirements.

We already applied the above suggestions. 我们已经应用了以上建议。 There is no error message in the Spring security logs. Spring安全日志中没有错误消息。

The SAML specs ( 4.1.4.1 Usage ) say: SAML规范( 4.1.4.1用法 )说:

Note that the service provider MAY include a element in the request that names the actual identity about which it wishes to receive an assertion. 注意,服务提供者可以在请求中包括一个元素,该元素为希望接收断言的实际身份命名。 This element MUST NOT contain any elements. 该元素不得包含任何元素。 If the identity provider does not recognize the principal as that identity, then it MUST respond with a message containing an error status and no assertions. 如果身份提供者不能将委托人识别为该身份,则它必须以一条包含错误状态且没有断言的消息作为响应。

Looks like the module may be violating that spec. 看起来该模块可能违反了该规范。 Check and see if there is an option to avoid sending SubjectConfirmation elements to the IDP. 检查并查看是否有避免将SubjectConfirmation元素发送到IDP的选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM