ADFS服务器上的SAML LogOutRequest处理失败

Ras*_*tko 2 adfs saml federation adfs2.0 saml-2.0

我有ADFS服务器作为IdP.我有单独的SP应用程序.这些是在信任圈中定义的.SAML协议上的SSO工作正常.当我尝试SP启动注销请求时,我在ADFS端遇到错误:

MSIS7000:登录请求不符合Web浏览器客户端的WS-Federation语言或SAML 2.0协议WebSSO配置文件.

编辑来自ADFS事件跟踪的更多详细信息:

MSIS7015:此请求不包含预期的协议消息,或者根据HTTP SAML协议绑定找到了不正确的协议参数.

我已经审查了mu注销SAML消息并且看起来正确.只是提到同一个SP正在使用ForgeRocks IdP(来自Sun OpenSSO)正确注销.

Saml loout请求消息:

<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                 ID="b00b3f55-f3e3-4935-9e91-da6bf8b62efd"
                 Version="2.0"
                 IssueInstant="2013-08-27T09:45:08Z"
                 Destination="https://00.00.00.00/adfs/ls/"
                 Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
                 NotOnOrAfter="2013-08-27T09:50:08Z"
                 >
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">SPEntityId/</saml:Issuer>                    
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">jsmith@company.com</saml:NameID>
<samlp:SessionIndex>_ea853497-c58a-408a-bc23-c849752d9741</samlp:SessionIndex>
Run Code Online (Sandbox Code Playgroud)

编辑

Lan向我建议签署注销请求消息是强制性的.他是对的.在OASIS规范(http://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf)第4.4.3.1节中.它被描述.根据我现在发送签名的消息,但我有同样的问题.

签名留言:

<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                 ID="aed640c0-9455-49ea-9450-4ad7c08d98e7"
                 Version="2.0"
                 IssueInstant="2013-08-29T15:22:45Z"
                 Destination="https://server/adfs/ls/"
                 Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
                 NotOnOrAfter="2013-08-29T03:27:45Z"
                 >
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
             Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">user</saml:NameID>
<samlp:SessionIndex>_677952a2-7fb3-4e7a-b439-326366e677db</samlp:SessionIndex>
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">SPIssuer</saml:Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
        <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
        <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
        <Reference URI="#aed640c0-9455-49ea-9450-4ad7c08d98e7">
            <Transforms>
                <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
            </Transforms>
            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
            <DigestValue>53jjPvQ2Ty1Z+VikwrUwW4Erj3k=</DigestValue>
        </Reference>
    </SignedInfo>
    <SignatureValue>signed value</SignatureValue>
    <KeyInfo>
        <X509Data>
            <X509Certificate>certificate</X509Certificate>
        </X509Data>
    </KeyInfo>
</Signature>
Run Code Online (Sandbox Code Playgroud)

我做错了什么?应该在ADFS上指定一些其他端点吗?因为我得到的应该与登录请求一样使用(这完全在我身边工作).

谢谢,拉斯特科

Ras*_*tko 6

Finlay我可以做SLO :)

以前我曾与ForgeRock的IDP合作,但它的工作非常完美,但ADFS却没有.很明显,Microsoft限制了与SAML邮件格式相关的规则.结论我发现:

  1. 必须签署LogoutRequest消息(SAML 2.0 Profiles doc,Sect 4.4.3.1).谢谢伊恩.

  2. XML元素和属性的顺序很重要.在此消息的底部是我的注销请求的最终版本.

  3. NameId必须与从AuthenticationResponse接收的格式相同.它应包含ADFS预期的元素.这些链接帮助了我:SAML主题SAML LogoutRequest 中的名称标识符(名称ID)声明

  4. 必须使用XmlDsigExcC14NTransform转换LogoutRequest签名,该签名应在XmlDsigEnvelopedSignatureTransform之后添加

  5. 签名的标准化方法应该是http://www.w3.org/2001/10/xml-exc-c14n#

  6. Issuer,NameID和SessionIndex是必需的XML元素

  7. 命名空间是必需的:xmlns:samlp ="urn:oasis:names:tc:SAML:2.0:protocol"和xmlns:saml ="urn:oasis:names:tc:SAML:2.0:assertion"

正在运行的最终LogoutRequest消息:

<samlp:LogoutRequest ID="f8a62847-92f2-4f0c-936a-df9efe0cc42f"
                 Version="2.0"
                 IssueInstant="2013-08-29T20:53:50Z"
                 Destination="https://server/adfs/ls/"
                 Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
                 xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                 >
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://sp.com/</saml:Issuer>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
        <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
        <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
        <Reference URI="#f8a62847-92f2-4f0c-936a-df9efe0cc42f">
            <Transforms>
                <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
                <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
            </Transforms>
            <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
            <DigestValue>W7F1E2U1OAHRXn/ItbnsYZyXw/8=</DigestValue>
        </Reference>
    </SignedInfo>
    <SignatureValue></SignatureValue>
    <KeyInfo>
        <X509Data>
            <X509Certificate></X509Certificate>
        </X509Data>
    </KeyInfo>
</Signature>
<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
             Format="http://schemas.xmlsoap.org/claims/UPN"
             >user</saml:NameID>
<samlp:SessionIndex>_2537f94b-a150-415e-9a45-3c6fa2b6dd60</samlp:SessionIndex>
Run Code Online (Sandbox Code Playgroud)