2015-01-05 50 views
0

我试图将WSO2 IS与Liferay集成为服务提供者,但迄今为止我还没有成功。一些修改是对代码所做,按照提出了三个JIRA问题和补丁上WSO2氧气罐贡献的本杰明·施梅林: https://wso2.org/jira/browse/IDENTITY-2856将WSO2身份认证服务器与Liferay集成 - 单点登出问题

上WSO2是SAML设置如下:

Assertion Consumer URL: liferayserver:8080/c/portal/saml/acs 
NameID Format: urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress 
Use fully Qualified username on NameID 
Enable Response Signing 
Enable Assertion Signing 
Enable Single logout 
    -> ConsumerURL: liferayserver:8080/c/portal/saml/slo_redirect 
Enable attribute profile 

然而,Liferay的返回以下异常:

Liferay returns the following exception: 
[code]23:00:50,071 ERROR [http-thread-pool-8080(4)][BaseSamlStrutsAction:45] com.liferay.saml.UnsupportedBindingException 
com.liferay.saml.UnsupportedBindingException 
at com.liferay.saml.profile.SingleLogoutProfileImpl.processSingleLogout(SingleLogoutProfileImpl.java:216) 
at com.liferay.saml.profile.SingleLogoutProfileUtil.processSingleLogout(SingleLogoutProfileUtil.java:54) 
at com.liferay.saml.hook.action.SingleLogoutAction.doExecute(SingleLogoutAction.java:39) 
at com.liferay.saml.hook.action.BaseSamlStrutsAction.execute(BaseSamlStrutsAction.java:42) 
at com.liferay.portal.kernel.struts.BaseStrutsAction.execute(BaseStrutsAction.java:39) 

我也试图改变单一注销端点liferayserver:8080/C /门/ SAML/SLO无济于事。在这两种情况下,会话都在Identity Server(WSO2)上关闭,但不在服务提供者(Liferay)上关闭。

任何想法可能是什么问题?

回答

1

事实证明,为了进行单次注销工作,还需要进行两项额外的修改。如果他们帮助别人,直到这些补丁集成到他们各自的产品中,我会在这里留下这些补丁。特别感谢Benjamin Schmeling

对于基于SAML的SLO你应该使用/C /门/ SAML/slo_redirect 端点,然而,Liferay的是不能够处理POST请求(在 至少在SAML portlet的最新版本)。你必须适应 Liferay的SAML门户如下:

SingleLogoutProfileImpl.processSingleLogout(HttpServletRequest的 要求,HttpServletesponse响应)添加新否则,如果分支:

else if(requestPath.endsWith("/slo_redirect") && 
     method.equalsIgnoreCase(HttpMethods.POST)){ 
     samlBinding = getSamlBinding(
     SAMLConstants.SAML2_POST_BINDING_URI); } 

此外,在 SingleLogoutProfileImpl.sendSpLogoutRequest(HttpServletRequest 请求,HttpServletResponse响应)在logoutRequest.setVersion 之后通过调用:012添加Wso2所需的SessionIndexaddSessionIndex(logoutRequest,samlSpSession.getSessionIndex());

相关问题