首页 > 解决方案 > 在 LightSAML SP Bundle 中使用 ECDSA-SHA256 签署 SAML2 AuthnRequest

问题描述

在捆绑使用的 IdP 定义中,除其他外,生成AuthnRequest

我如何/在哪里指定我希望AuthnRequest使用ECDSA-SHA256进行签名?

我是否必须覆盖工厂服务才能实现这一目标?

<?xml version="1.0"?>
<md:EntityDescriptor
    xmlns:mdalg="urn:oasis:names:tc:SAML:metadata:algsupport"
    xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    entityID="some-entity">
  <md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" WantAuthnRequestsSigned="true">
    <md:KeyDescriptor use="signing">
      <mdalg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
      <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
        <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
        <ds:X509Data>

我尝试添加mdalg:SigningMethodand ds:SignatureMethod,如上所述,但我真的不知道我在做什么,因为配置模式在文档中并没有很好地定义。

标签: saml-2.0symfony4x509signing

解决方案


您的 mdalg:SigningMethod 位置似乎是错误的。它是对原始 SAML2 标准的扩展,因此需要存在于一个块中。把这当作我的传闻,因为我自己并没有真正使用它。

这是关于 simpleSAMLphp 软件的邮件列表帖子,内容归功于 Peter Schober:

https://groups.google.com/forum/#!msg/simplesamlphp/HSdZXaYUuRI/bdz7mQJLBgAJ

XML 中的放置示例在其中。


推荐阅读