【问题标题】:Spring security SAML authentication failure with Microsoft ADFSMicrosoft ADFS 的 Spring 安全 SAML 身份验证失败
【发布时间】:2015-07-20 14:53:09
【问题描述】:

我们正在尝试使用 Spring Security 连接到 Microsoft ADFS 服务器。 我们设置了 Spring SAML 示例应用程序,如 Spring 安全文档中所述,但我们在 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)

然后:

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.

我们已经采纳了上述建议。 Spring 安全日志中没有错误消息。

【问题讨论】:

  • 就我而言,服务提供商的身份 URL 在我的 SAML 客户端中配置错误。它应该与您在添加依赖方时在 ADFS 中配置的内容相匹配。
  • 就我而言,服务提供商没有正确签署 SAML 身份验证请求。因此,ADFS 服务器以“SAML 消息签名的验证失败”响应。

标签: java spring spring-security single-sign-on adsf


【解决方案1】:

SAML 规范 (4.1.4.1 Usage) 说:

请注意,服务提供者可以在 请求命名它希望的实际身份 收到断言。此元素不得包含任何 元素。如果身份提供者不 将主体识别为该身份,然后它必须以 包含错误状态且没有断言的消息。

看起来该模块可能违反了该规范。检查并查看是否有避免向 IDP 发送 SubjectConfirmation 元素的选项。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-06-25
    • 2011-07-23
    • 2014-08-17
    • 2018-12-22
    • 2020-02-06
    • 2011-05-04
    • 1970-01-01
    • 2013-03-07
    相关资源
    最近更新 更多