spring-projects / spring-projects/spring-security
Configurable JWS algorithm for decoding an OIDC back-channel logout token
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
Analogous to
@Bean
public JwtDecoderFactory<ClientRegistration> idTokenDecoderFactory() {
OidcIdTokenDecoderFactory idTokenDecoderFactory = new OidcIdTokenDecoderFactory();
idTokenDecoderFactory.setJwsAlgorithmResolver(clientRegistration -> SignatureAlgorithm.<...>);
return idTokenDecoderFactory;
}
there should be a possibiliy to change the used JWS algorithm when decoding an OIDC back-channel logout token.
Current Behavior
If I'm not mistaken it's not easily possible to change the default algorithm JwsAlgorithms.RS256 in NimbusJwtDecoder (see org.springframework.security.config.annotation.web.configurers.oauth2.client.OidcBackChannelLogoutAuthenticationProvider#OidcBackChannelLogoutAuthenticationProvider).
Please let me know, if the algorithm can be set.
Context
The OIDC IdP (OpenID Connect Identity Provider) will not change the used JWS algorithm for the logout token.
Current workaround: the required classes from Spring Security were copied and modified. This is not a viable long-term solution (at least for me).
Thank you for your help!
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 at org.springframework.security.config.annotation.web.configurers.oauth2.client.OidcBackChannelLogoutAuthenticationProvider#OidcBackChannelLogoutAuthenticationProvider and inspect how NimbusJwtDecoder uses JwsAlgorithms.RS256. Compare this with OidcIdTokenDecoderFactory#setJwsAlgorithmResolver. Done means callers can configure the JWS algorithm used to decode an OIDC back-channel logout token without copying Spring Security classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, backend, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100