【问题标题】:Signing auth request in shibboleth SP在 shibboleth SP 中签署身份验证请求
【发布时间】:2019-06-06 11:35:01
【问题描述】:

我正在使用 Shibboleth SP 进行 SAML 授权。

最近 IdP 更改了配置,现在需要对 AuthRequest 进行签名。

IdP 的元数据有以下参数

<md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"
WantAuthnRequestsSigned="true"><md:KeyDescriptor use="signing">

SP 的 shibboleth2.xml 文件有以下标签

<ApplicationDefaults entityID="...."
   REMOTE_USER="eppn persistent-id targeted-id email Email FirstName LastName NameID">

在 IdP 强制执行 AuthRequest 签名后,我们将 shibboleth2.xml 文件更改如下

<ApplicationDefaults entityID="..."
                         REMOTE_USER="eppn persistent-id targeted-id email 

Email FirstName LastName NameID" 
signing="true" encryption="true">

基本上,我添加了signing="true"encryption="true"

生成的新元数据在标签中具有以下属性

<md:SPSSODescriptor AuthnRequestsSigned="1" 
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol 
urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:1.0:protocol">

早期的AuthnRequestsSigned="1" 属性不存在。

之后,当我尝试进行身份验证时,它给了我们以下错误,

<samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Responder"/>
        <samlp:StatusMessage>Unable to verify the signature</samlp:StatusMessage>
    </samlp:Status>

问题 1:我是否需要向 IdP 提供此新元数据? 问题2:知道为什么会这样吗? 问题 3:我需要更改配置中的其他任何内容吗?

附:在执行 AuthRequest 签名之前,它正在工作,所以我认为配置中没有任何其他问题。

这是 AuthRequest 示例

<samlp:AuthnRequest
    AssertionConsumerServiceURL="https://...SP-host.../Shibboleth.sso/SAML2/POST"
    Destination="https://...idp-host.../marrsso/idp/SSO.saml2"
    ID="...some-id..." IssueInstant="2019-01-11T14:13:25Z"
    ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"
    xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
    <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://...entity-id.../shibboleth</saml:Issuer><samlp:NameIDPolicy AllowCreate="1"/></samlp:AuthnRequest>

我认为签名信息应该作为请求的一部分放在此处。作为http请求,它作为GET请求,对吗? 当我在网络中看到请求时,我可以看到签名作为查询参数 请求的状态码是'200'

【问题讨论】:

    标签: saml saml-2.0 shibboleth shibboleth-sp


    【解决方案1】:

    将签名作为查询字符串的一部分发送并不罕见。它就像一个预签名的 URL。

    1. 仅在 SP 上启用“signing=true”不应更改 最初是生成的。所以重新发送元数据不是 要求。与 IdP 核对 SP 的元数据是否最初是 完全导入还是他们只是添加了依赖方和其他基本端 要集成的点,如果请求签名是,这可能会很好 不需要。

    2. 如果 IdP 无法验证签名,那么它们一定是丢失了 SP的证书。确保比较两个元数据文件 在启用签名和加密之前和之后,他们应该 匹配(特别是围绕证书),但对于附加属性 你已经确定了。否则重新发送元数据。

    3. 在这种情况下不需要进行其他配置更改。

    【讨论】:

      猜你喜欢
      • 2015-01-22
      • 2020-10-31
      • 2012-05-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-15
      • 1970-01-01
      • 1970-01-01
      • 2017-10-04
      相关资源
      最近更新 更多