spring-projects / spring-projects/spring-boot

Add SSL bundle support for OAuth2 Clients

Open
#50,388 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

SSL bundle support for OAuth2 Resource Servers (for the JWK Set request) is being actively worked on in #50280.

This is a feature request to add symmetric SSL bundle support for OAuth2 Clients.

Today, configuring SSL for OAuth2 Clients requires taking ownership of a large portion of the Spring Security wiring. This complexity is probably better handled by Spring Boot using the standard SSL bundle mechanism.

One idea would be to attach the SSL bundle configuration to the provider (spring.security.oauth2.client.provider.<provider-id>.ssl.bundle) rather than to each individual client registration (spring.security.oauth2.client.registration.<client-registration-id>.ssl.bundle) since the TLS material is a property of the provider (Authorization Server).


Note that implementing this for OAuth2 Clients might be much more involved than implementing it for OAuth2 Resource Servers due to the number of different HTTP clients that are used:

  • various token response clients (RestClient{AuthorizationCode,ClientCredentials,RefreshToken,JwtBearer,TokenExchange}TokenResponseClient) and their WebClient variants
  • a user info client (DefaultOAuth2UserService / OidcUserService)
  • NimbusJwtDecoder
  • potentially ClientRegistrations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the SSL bundle work for OAuth2 Resource Servers in #50280 and the provider configuration described here. Trace the listed token response clients, WebClient variants, DefaultOAuth2UserService, OidcUserService, NimbusJwtDecoder, and ClientRegistrations. Done means OAuth2 Clients can use the standard provider SSL bundle configuration across the relevant HTTP clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
authentication, backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.