代码之家  ›  专栏  ›  技术社区  ›  Akshay

在shibboleth SP中签名身份验证请求

  •  0
  • Akshay  · 技术社区  · 5 年前

    我使用Shibboleth SP进行SAML授权。

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

    <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" .

    之后,生成的新元数据在tag中具有以下属性

    <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示例

    <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请求,对吗? 当我在网络中看到请求时,我可以看到签名作为查询参数 enter image description here

    0 回复  |  直到 5 年前
        1
  •  1
  •   stk    5 年前

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

    1. 最初生成的。所以重新发送元数据不是 要求。如果SP的元数据最初是 完全进口还是仅仅增加了依赖方和其他基本端

    2. 如果IdP无法验证签名,那么它们一定是丢失的 匹配(特别是在证书周围),但对于附加属性 你已经确认了。否则重新发送元数据。

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