2015-01-05 51 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());

相關問題