Skip to content

Version 4.19.2

Choose a tag to compare

@Revsgaard Revsgaard released this 22 Jun 14:26
· 34 commits to main since this release
7d6733c

Added ECDSA signature support for modern .NET targets.

The SAML 2.0 component now supports ECDSA XML signatures and signature validation on .NET 10, .NET 9 and .NET 8. The following signature algorithms have been added:

  • ecdsa-sha256
  • ecdsa-sha384
  • ecdsa-sha512

Existing signing configuration remains unchanged. ECDSA signing can be enabled by using an X509Certificate2 with an ECDSA key and setting SignatureAlgorithm to the relevant Saml2SecurityAlgorithms.Ecdsa*Signature value.

New optional validation allowlists have been added to Saml2Configuration:

  • SignatureValidationAlgorithms
  • XmlCanonicalizationValidationMethods

SignatureValidationAlgorithms is used only when validating incoming signatures with SignatureValidationCertificates. If the list is empty, validation falls back to SignatureAlgorithm.

XmlCanonicalizationValidationMethods is used only when validating signed XML canonicalization methods. If the list is empty, validation falls back to XmlCanonicalizationMethod.

During XML signature validation, the actual SignedInfo.SignatureMethod and SignedInfo.CanonicalizationMethod are read from the signature and must match the configured validation allowlists. This makes it possible to accept multiple incoming signature algorithms and canonicalization methods while continuing to generate outgoing signatures with SignatureAlgorithm and XmlCanonicalizationMethod.

ECDSA support applies only to signing and signature validation. It cannot be used for SAML encryption or decryption. RSA-based encryption and decryption behavior is unchanged.

NuGet package released:
https://www.nuget.org/packages/ITfoxtec.Identity.Saml2/
https://www.nuget.org/packages/ITfoxtec.Identity.Saml2.Mvc/
https://www.nuget.org/packages/ITfoxtec.Identity.Saml2.MvcCore/