Skip to content

Support for multiple decryption certificates in SpOptions #53

Description

@plachor

Hi RSK Team.

Currently SpOptions.EncryptionCertificate accepts a single X509Certificate2 for decrypting encrypted SAML assertions. This makes encryption certificate rotation extremely difficult in multi-federation environments.

The only way to rotate the encryption certificate today is:

  1. Disable RequireEncryptedAssertions for all identity providers
  2. Ask all partners to stop encrypting assertions
  3. Wait for confirmation from every partner
  4. Replace the certificate
  5. Ask all partners to update their metadata and start encrypting again
  6. Re-enable RequireEncryptedAssertions

This requires coordination across potentially dozens of external partners which is operationally infeasible and introduces a security window where assertions are transmitted unencrypted.

Proposed solution: Keep the existing SpOptions.EncryptionCertificate as the active decryption certificate (also published in SP metadata for partners to encrypt with), and add a new property such as ICollection DecommissionedDecryptionCertificates for previously active certificates that should still be accepted as a fallback during the transition period. The library would first attempt decryption with the active EncryptionCertificate, and if that fails, try each decommissioned certificate. This enables graceful rotation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions