spring-projects / spring-projects/spring-security
SAML Signature Certificate Rollover
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Expected Behavior
You can configure multiple certificates for signing SAML requests. When resolving the certificate for creating a signature it should also be checked that this certificate is still valid.
Current Behavior
Currently the org.springframework.security.saml2.provider.service.web.authentication.OpenSaml5Template uses the org.opensaml.saml.security.impl.SAMLMetadataSignatureSigningParametersResolver or the underlying org.opensaml.xmlsec.impl.BasicSignatureSigningParametersResolver which both does not check for certificate validity.
Context
When a certficate for signing expires the some IDP does not accept the signatures anymore. The change of the certificate should not affect the user. So most of the IDPs support multiple signature certificates to do a rollover without affecting the user.
Spring-Security-SAML also supports multiple signing certificates but not a rollover on runtime. So an expired certificate must be removed before it expires.
This enhancement relates to #10799.
Solution suggestions
- Implement an
org.opensaml.xmlsec.SignatureSigningParametersResolverwhich also checks for validity of the certificates - Open up the
org.springframework.security.saml2.provider.service.web.authentication.OpenSaml5Templateso that it possible to add a custom resolver on your own.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with org.springframework.security.saml2.provider.service.web.authentication.OpenSaml5Template and the org.opensaml.xmlsec.SignatureSigningParametersResolver interfaces named in the issue. Review related issue #10799 and determine whether certificate validity should be handled by a resolver or exposed for custom configuration. Done means multiple signing certificates can roll over at runtime without using an expired certificate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100