【问题标题】:SSO between web application in IBM WAS 7 and ADFS2.0IBM WAS 7 和 ADFS2.0 中的 Web 应用程序之间的 SSO
【发布时间】:2015-12-26 20:42:40
【问题描述】:

我使用 spring-security-saml2 插件在 tomcat web 应用程序和 ADFS 服务器之间建立 sso。我正在尝试在 IBM Websphere Application Server 7 中部署的 Web 应用程序中实现相同的目标。

我在 IBM WAS 中创建了一个自定义密钥库,并使用它在 WAS 上启用 SSL。密钥库的个人证书在应用程序 securityContext.xml 中用于签署元数据,并在 ADFS 服务器中导入签名者证书。 ADFS 服务器证书作为签署者证书导入到 WAS 密钥库中。我能够向 ADFS 服务器发送身份验证请求,还能够在日志中查看响应。但是在屏幕上解码时出现以下错误。

Error 401: Authentication Failed: Error decoding incoming SAML message  

在日志中:

29-09-2015 15:06:25,722 DEBUG org.opensaml.ws.message.decoder.BaseMessageDecoder:85 - Successfully decoded message.
29-09-2015 15:06:25,722 DEBUG org.opensaml.common.binding.decoding.BaseSAMLMessageDecoder:191 - Checking SAML message intended destination endpoint against receiver endpoint
29-09-2015 15:06:25,722 DEBUG org.opensaml.common.binding.decoding.BaseSAMLMessageDecoder:203 - SAML message intended destination endpoint in message was empty, not required by binding, skipping
29-09-2015 15:06:25,723 DEBUG org.springframework.security.saml.websso.WebSSOProfileImpl:109 - No inbound message in artifact response message.
29-09-2015 15:06:25,724 DEBUG org.springframework.security.saml.websso.WebSSOProfileImpl:122 - Could not decode artifact response message.
org.opensaml.ws.message.decoder.MessageDecodingException: No inbound message in artifact response message.
    at org.springframework.security.saml.websso.ArtifactResolutionProfileBase.resolveArtifact(ArtifactResolutionProfileBase.java:110)
    at org.opensaml.saml2.binding.decoding.HTTPArtifactDecoderImpl.doDecode(HTTPArtifactDecoderImpl.java:94)
    at org.opensaml.ws.message.decoder.BaseMessageDecoder.decode(BaseMessageDecoder.java:79)
    at org.opensaml.saml2.binding.decoding.BaseSAML2MessageDecoder.decode(BaseSAML2MessageDecoder.java:70)
    at org.springframework.security.saml.processor.SAMLProcessorImpl.retrieveMessage(SAMLProcessorImpl.java:105)
    at org.springframework.security.saml.processor.SAMLProcessorImpl.retrieveMessage(SAMLProcessorImpl.java:172)
    at org.springframework.security.saml.SAMLProcessingFilter.attemptAuthentication(SAMLProcessingFilter.java:77)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:195)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:166)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.saml.metadata.MetadataGeneratorFilter.doFilter(MetadataGeneratorFilter.java:86)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)  

在 ADFS 服务器日志中出现以下错误。

The artifact resolution request failed. 

Additional Data 
Exception message: 
MSIS3015: The signing certificate of the claims provider trust '+++++++++++++++++++++' identified by thumbprint '#################' is not valid. It might indicate that the certificate has been revoked, has expired, or that the certificate chain is not trusted.    

谁能帮我解决这个问题。

【问题讨论】:

    标签: single-sign-on websphere-7 adfs2.0 spring-saml


    【解决方案1】:

    您必须使 IBM WAS 作为 ADFS 中的依赖方。当我们实施此设置时,结果/收入声明将成为用户配置文件加载以进行身份​​验证的主要来源,并将 SAML 响应传递给 SP(您的应用程序的结束 URL)。

    请参阅以下链接以配置为 ADFS 的依赖方。

    https://omindu.wordpress.com/2015/06/19/setting-ad-fs-3-0-as-federated-authenticator-in-wso2-identity-server/

    【讨论】:

    • 您的意思是如果我在同一个 WAS 中有多个 Web 应用程序(具有不同的 URL),我应该让 IBM WAS 作为中继方而不是单个应用程序。我正在尝试 SP 发起的 SSO。 Web 应用程序被添加为 ADFS 上的中继方。
    • 即使它是由 SP 启动的。 SP 将发送 authenNrequest 并重定向到 IDP。 IDP 将进行身份验证并将 SAML 响应发送给 SP。当我们在 ADFS 中添加中继方时,结果/收入声明将用户配置文件从 ADFS 传递给 IDP。
    • 在这种情况下,IDP 是 ADFS 服务器。我能够在 ADFS 和 Web 应用程序/SP(部署在 IBM WAS 上)之间建立信任关系并发送身份验证请求。问题在于某些证书可能是我无法识别的。因此,在解码来自 IDP 的工件响应时出现错误。
    • 在这种情况下,首先关闭证书验证并进行测试。
    • 在哪里关闭应用程序端的证书验证。我需要更改 securityContext.xml
    【解决方案2】:

    我使用 Websphere SAML TAI 与 ADFS 建立 SSO。我确实提到的一些链接是developerworkstechblog

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-30
      • 1970-01-01
      • 1970-01-01
      • 2012-05-22
      • 1970-01-01
      • 1970-01-01
      • 2015-05-08
      相关资源
      最近更新 更多