2017-08-31 34 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