2017-08-31 36 views
0

我无法找到包org.wso2.carbon.identity.sso.saml的源代码。 在GitHub的仓库WSO2 - 阁楼/碳认同有这些类,但有注意到,该仓库已不再用于开发,我发现有2个链接:WSO2 IS。打包org.wso2.identity.sso和SSO SLO返回多个应用程序

https://github.com/wso2/identity-framework  
https://github.com/wso2-extensions?utf8=%E2%9C%93&query=identity 

但我没有发现有包org.wso2.carbon.identity.sso.saml中的任何类。

我有2个应用程序的一些问题与SSO SLO:

我登录到2个应用程序:ab

从一个应用程序注销正常工作,但是当我尝试从第二个应用程序注销,我得到错误 [4] [IS]错误{org.wso2.carbon.identity.sso.saml.processors.SPInitLogoutRequestProcessor} - ssoTokenId cookie not found in the logout request 和HTML:

SAML 2.0 based Single Sign-On 
Error when processing the authentication request! 
Please try login again. 

SAML注销响应的连杆

https://test2-sso2.auth.test.vu.lt:9443/authenticationendpoint/samlsso_notification.do?status=Error+when+processing+the+authentication+request%21&statusMsg=Please+try+login+again. 

和SAML响应参数:

<saml2p:LogoutResponse Destination="https://test2-wso2.auth.test.vu.lt:9443/samlsso" 
         ID="_9cb47e1d90276bcc53d4b110d3573b82" 
         InResponseTo="fgehcpnbagimhhcacbaanopameodckepmopaoaek" 
         IssueInstant="2017-08-31T11:09:43.403Z" 
         Version="2.0" 
         xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" 
         > 
    <saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity" 
        xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" 
        >test2-wso2</saml2:Issuer> 
    <saml2p:Status> 
     <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Requester" /> 
     <saml2p:StatusMessage>Session was already Expired</saml2p:StatusMessage> 
    </saml2p:Status> 

</saml2p:LogoutResponse> 

所以,我有2个问题:

  • 在哪里可以找到包org.wso2.carbon.identity.sso.saml班;
  • 也许有人可以帮我解决与SSO SLO有关的问题?

我们正在使用WSO2 IS v.5.3.0。其中一个应用程序是travelocity.com,另一个是我们的应用程序,其结构类似于travelocity.com。我们正在多租户架构中工作。这两个应用程序(服务提供商)配置在同一租户

回答

0

我假设您正在寻找SPInitLogoutRequestProcessor。你可以在 [1]找到它。对于IS 5.3.0,与SAML组件相关的开发发生在5.3.x分支中。

对于您在SLO上的查询;当您将2个应用程序配置为单一注销并且您从一个应用程序注销时,Identity Server会使用户的已验证会话无效,并向其他会话参与者(本例中为应用程序2)发送反向信道SAML注销请求。所以第二个应用程序在接收到来自IS的注销请求时应该使其用户会话无效。

您看到的错误应该是由于注销请求无法找到有效的已验证会话(因为会话已被删除)。 [2]详细解释了IS如何进行单一注销。

您可以采取的另一种方法是在发送注销请求之前检查IDP端是否存在已存在的已认证会话。您可以使用被动SAML请求来检查会话的状态,如果会话已经存在,则发送注销请求。

+0

非常感谢。我认为我找不到这些类,因为“主”分支具有不同的结构。我会尝试你的解决方案之一。到目前为止,我在想Wso2 Saml代理和例如应用程序travelocity。com意识到你的第一个解决方案。但我没有检查它。另一个问题:我如何创建和发送被动SAML?对不起,如果是简单的问题。我是SAML的新手 –

+0

还有一个问题。你怎么看如果我改变类SPInitLogoutRequestProcessor会发生什么,以便当没有找到会话时,我接受当会话被注销并且SPInitLogoutRequestProcessor发送回答“成功” –

+0

要发送被动请求,必须设置IsPassive AuthnRequest中的=“true”属性。如果您在访问“http:// localhost:8080/travelocity.com /”时跟踪由travelocity发送的SAML请求,您将看到被动请求。 – Lucifer