2016-02-08 107 views
1

我希望確認RelayState是有效簽名的SAML註銷請求所必需的。SAML /是需要簽名註銷請求的RelayState嗎?

我們已將Microsoft的ADFS 2012 R2與Oracle的聯合身份驗證聯盟,其中ADFS是SP,OIF是IdP。作爲基礎,我們遵循Integrating ADFS 2.0/3.0 SP with OIF IdP

一切正常,除了註銷。我們有另一個SP正在註銷並與OIF合作。我們發現的一個不同之處在於,ADFS未發送帶有簽名註銷請求的RelayState參數,但另一個SP是。我一直在使用SAMLTool's Validate Logout Req,在這裏我輸入以下內容:源

  • SAML註銷請求
  • ENTITYID
  • 目標URL,註銷請求
  • SigAlg
  • 的簽名目的地SAML註銷請求
  • X.509證書來源(簽名檢查)
  • 忽略計時問題:檢查

那然後給我的錯誤:

In order to check Signature you must provide the RelayState parameter and the X.509 cert 

如果我在SAMLTool's Validate Logout Req其他值一起我輸入的RelayState然後返回報告,我簽署了註銷請求是有效的。

在ADFS的情況下,因爲它沒有RelayState參數,所以我不能得到SAMLTool's Validate Logout Req來說ADFS的註銷是有效的。所有這一切,我無法在SAML規範中的任何地方找到說明RelayState是簽名註銷請求所必需的。任何人都可以確認它是必需的,並用文檔備份它?對於SAML LogoutRequestType

<element name="LogoutRequest" type="samlp:LogoutRequestType" /> 
<complexType name="LogoutRequestType"> 
    <complexContent> 
     <extension base="samlp:RequestAbstractType"> 
      <sequence> 
       <choice> 
        <element ref="saml:BaseID" /> 
        <element ref="saml:NameID" /> 
        <element ref="saml:EncryptedID" /> 
       </choice> 
       <element ref="samlp:SessionIndex" minOccurs="0" maxOccurs="unbounded" /> 
      </sequence> 
      <attribute name="Reason" type="string" use="optional" /> 
      <attribute name="NotOnOrAfter" type="dateTime" use="optional" /> 
     </extension> 
    </complexContent> 
</complexType> 
<element name="SessionIndex" type="string" /> 

回答

3

LogoutRequest消息不會參考RelayState參數(如其他帖子所示),但它是用於在SAML參與方之間傳遞消息的所謂綁定的一部分。假設註銷使用HTTP-RedirectHTTP-POSTArtifact結合,該規範允許發件人爲包括RelayState參數,然後接收機必須返回相同RelayState參數作爲響應的一部分(作爲一種方式的發送方保持狀態)。

請參閱第3.4節。3的RelayState的SAML綁定文件的:https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf爲HTTP重定向綁定:

3.4.3 RelayState

RelayState data MAY be included with a SAML protocol message transmitted with this binding. The value MUST NOT exceed 80 bytes in length and SHOULD be integrity protected by the entity creating the message independent of any other protections that may or may not exist during message transmission. Signing is not realistic given the space limitation, but because the value is exposed to third-party tampering, the entity SHOULD ensure that the value has not been tampered with by using a checksum, a pseudo-random value, or similar means. If a SAML request message is accompanied by RelayState data, then the SAML responder MUST return its SAML protocol response using a binding that also supports a RelayState mechanism, and it MUST place the exact data it received with the request into the corresponding RelayState parameter in the response. If no such value is included with a SAML request message, or if the SAML response message is being generated without a corresponding request, then the SAML responder MAY include RelayState data to be interpreted by the recipient based on the use of a profile or prior agreement between the parties

對於類似部分存在其他綁定。正如@ n​​zpcmad所說:將它包含在請求中並不是強制性的。

+0

換句話說,它不是強制性的。該工具在要求時不正確。 ADFS例如不爲SP啓動提供它。 – nzpcmad

+0

謝謝。我會接受這個答案並與甲骨文開一張票,看看他們在說什麼。如果有什麼有趣的結果,我會嘗試返回這裏進行狀態更新。 –

+0

我們最終解決了我們的問題,並在ADFS和OAM之間註銷現在正在運行。主要問題是OAM中過時的ADFS元數據。 –

0

閱讀SAMLv2核心規範 「單點註銷協議」 的XML模式沒有提到的RelayState元素。 SAMLv2配置文件規範中的「單一註銷配置文件」也沒有提及RelayState。

我想說這表明RelayState(這是一個請求參數,所以只能用於前置通道綁定)並不是強制性的。

+2

謝謝,但我仍然困惑。根據你所說的,爲什麼RelayState是強制性的,因爲該規範沒有列出它?或者你最後一句話是錯字? –

+0

是的,這是一個錯字,很抱歉。 –

+0

你能否更新? – nzpcmad