【问题标题】:How to implement single logout using okta as IDP?如何使用 okta 作为 IDP 实现单点注销?
【发布时间】:2016-03-25 10:36:10
【问题描述】:

在 Okta 开发者帐户中,我启用了 SAML 单一注销 并获得 身份提供者单一注销 URL。我使用从单点登录过程中获得的 SAML 响应获得的 NameIDSessionIndex 创建了以下注销请求。

注销请求:

<?xml version="1.0" encoding="UTF-8"?>
<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Destination="https://dev-6#####.oktapreview.com/app/nepasoftdev660864_spdemo_1/exk606bnr5BZOBF7z0h7/slo/saml" ID="_b2be5dbd-928a-4554-a879-25a179e36ee2" IssueInstant="2016-03-25T10:20:47Z" Version="2.0">
   <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">http://192.###.###.##/spdemo</saml:Issuer>
   <saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">ramesh.shrestha@nepasoft.com</saml:NameID>
   <samlp:SessionIndex>id1458901238038.94596883</samlp:SessionIndex>
</samlp:LogoutRequest>

我收到以下 Logout Response 状态代码 RequestDenied

<?xml version="1.0" encoding="UTF-8"?>
<saml2p:LogoutResponse xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="http://localhost:10262/Logout.aspx" ID="id1846510753301801884197562" InResponseTo="_b2be5dbd-928a-4554-a879-25a179e36ee2" IssueInstant="2016-03-25T10:22:40.389Z" Version="2.0">
   <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://192.###.###.##/spdemo</saml2:Issuer>
   <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
      <ds:SignedInfo>
         <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
         <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
         <ds:Reference URI="#id1846510753301801884197562">
            <ds:Transforms>
               <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
               <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
            <ds:DigestValue>LQwvto+ERXvrQRUB7LOUUznSXII=</ds:DigestValue>
         </ds:Reference>
      </ds:SignedInfo>
      <ds:SignatureValue>P+T1K.....ZYvCw==</ds:SignatureValue>
      <ds:KeyInfo>
         <ds:X509Data>
            <ds:X509Certificate>MIID.....7zK0rH</ds:X509Certificate>
         </ds:X509Data>
      </ds:KeyInfo>
   </ds:Signature>
   <saml2p:Status>
      <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:RequestDenied" />
   </saml2p:Status>
</saml2p:LogoutResponse>

为什么可能是获得 RequestDenied 状态的原因?在 Okta 中启用单次注销时,我是否遗漏了注销请求或配置错误?

提前致谢。

【问题讨论】:

    标签: logout status okta


    【解决方案1】:

    您还需要对 LogoutRequest 进行签名,因此您需要包含一个 Signature 元素(类似于您在 LogoutResponse 中返回的内容)。

    也就是说,我遇到了同样的问题。我已经签署了我的 LogoutRequest,但仍然收到状态为 RequestDenied 的 LogoutResponse。

    我确实在 Okta 的支持页面上找到了这个线程 (https://support.okta.com/help/answers?id=906F0000000I07YIAS),这表明注销不支持 HTTP-Redirect 绑定,因此您可能需要 HTTP-Post。我还没试过。

    【讨论】:

      猜你喜欢
      • 2019-09-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-23
      • 2015-08-29
      相关资源
      最近更新 更多