在shibboleth SP中签署auth请求

问题描述 投票:0回答:1

我正在使用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强制执行A​​uthRequest签名后,我们更改了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请求,是正确的吗?当我在网络中看到请求时,我可以看到签名作为查询参数enter image description here请求的状态代码是'200'

saml saml-2.0 shibboleth shibboleth-sp
1个回答
1
投票

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

  1. 只在SP上启用“signing = true”不应更改最初生成的密钥。因此,不需要重新发送元数据。检查IdP是否最初完全导入了SP的元数据,或者只是添加了依赖方和其他基本端点进行集成,如果不需要请求签名,这可能会正常工作。
  2. 如果IdP无法验证签名,则他们必须缺少SP的证书。为了确保在启用签名和加密之前和之后比较两个元数据文件,它们应该匹配(特别是围绕证书),但是对于您已经识别的附加属性。否则重新发送元数据。
  3. 在这种情况下,不需要进行其他配置更改。
© www.soinside.com 2019 - 2024. All rights reserved.