【问题标题】:Azure AD SSO with SAML Token encryption使用 SAML 令牌加密的 Azure AD SSO
【发布时间】:2020-11-05 05:13:48
【问题描述】:

我正在使用 Azure AD 开发基于 SAML 的 SSO。
我完成了所有必需的设置并能够发出 SAMLRequest 并能够在回复 URL 上获得 SAMLResponse。
(令牌加密菜单已导入证书 (Base64) 以加密令牌。) 但响应是 BASE64 编码和加密的。

我参考了下面的链接。 Manage certificates for federated single sign-on in Azure Active Directory

我解码了 BASE64 然后得到了 xml 数据。

示例 xml 数据

<samlp:Response ID="_8b8b42b6..........................xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
    <Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">https://sts.windows.net/.........../</Issuer>
    <samlp:Status>
        <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
    </samlp:Status>
    <EncryptedAssertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
             ......
             ......
             ......
            </xenc:CipherData>
        </xenc:EncryptedData>
    </EncryptedAssertion>
</samlp:Response>

我想解密属性“EncryptedAssertion”。

【问题讨论】:

    标签: azure single-sign-on saml-2.0


    【解决方案1】:

    您需要使用包含在证书中的公钥,它是 IdP 元数据的一部分来解密 EncryptedAssertion。不过,您没有说明您使用的是哪个 SAML 服务提供商(或 SAML 库)。

    【讨论】:

    • 谢谢!我有个问题。我可以下载 Certificate(base64) 、 Certificate(raw) 和 Federation metadata xml。我知道证书(base64)是公钥。如果可以的话,我想让你告诉我如何附上。
    • 很遗憾,我不明白你的问题。联合元数据通常包括 PEM 编码证书(没有 PEM 边界)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-13
    相关资源
    最近更新 更多