Commit Graph
39 Commits
Author SHA1 Message Date
Andy Wilkinson 185b446005 Merge branch '4.0.x'
Closes gh-50849
2026-06-24 17:54:30 +01:00
Andy Wilkinson a49549203b Polish "Treat empty JWK Set URI as absent"
See gh-50755

Signed-off-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
2026-06-24 17:48:11 +01:00
Vinod Kumar 8eb3b032a4 Treat empty JWK Set URI as absent
Signed-off-by: Vinod Kumar <codingkiddo@gmail.com>

See gh-50755
2026-06-24 17:34:15 +01:00
Andy Wilkinson a7f5c796c9 Stop auto-config of SpringReactiveOpaqueTokenIntrospector w/o WebFlux
SpringReactiveOpaqueTokenIntrospector uses WebClient in its
implementation so the auto-configuration of it must back off when
spring-webflux is not on the classpath. Failing to do so results in
a ClassNotFoundException for WebFlux's BodyInserters if the
auto-configuration's other conditions are met.

Fixes gh-50764
2026-06-13 21:26:02 +01:00
Stéphane Nicoll 5bf2a32b11 Merge branch '4.0.x' 2026-05-30 14:39:57 +02:00
Stéphane Nicoll 98084aab2b Reformat additional-spring-configuration-metadata.json files 2026-05-30 14:28:53 +02:00
Andy Wilkinson 6a74bb85a3 Merge branch '4.0.x'
Closes gh-50440
2026-05-14 15:03:44 +01:00
Andy Wilkinson add52b6ccd Merge branch '3.5.x' into 4.0.x
Closes gh-50439
2026-05-14 15:02:24 +01:00
Stéphane Nicoll 4c7cedb738 Merge branch '3.5.x' into 4.0.x
Closes gh-50229
2026-04-27 11:04:35 +02:00
Stéphane Nicoll 9c6d5d3ecf Merge branch '4.0.x'
Closes gh-50228
2026-04-27 10:59:42 +02:00
Stéphane Nicoll f71464b3c6 Merge branch '3.5.x' into 4.0.x
Closes gh-50227
2026-04-27 10:57:41 +02:00
Phillip Webb 6f409f7dd6 Polish code for upcoming Spring Security nullability changes
Update code and tests in preparation of upcoming Spring Security
`Nullable` annotation updates.
2026-04-07 22:27:19 -07:00
Stéphane Nicoll 29b03edf6f Do not configure a ReactiveJmtDecoder without spring-webflux
This commit guards the creation of a ReactiveJwtDecoder with the
presence of Spring WebFlux. WebClient is used behind the scenes and
the sole presences of the authorization server and reactive types were
not precise enough.

Closes gh-49807
2026-03-27 11:11:22 +01:00
Andy Wilkinson f2981d1bdc Rename property to authorities-claim-expressions
See gh-48490
2026-03-16 10:35:57 +00:00
Andy Wilkinson 8fff41b3ec Auto-configure ExpressionJwtGrantedAuthoritiesConverters
Closes gh-48490
2026-03-16 10:02:54 +00:00
Andy Wilkinson 8e5ae84796 Adapt to nullability changes in spring-security-oauth2-jose
See gh-49446
2026-03-13 17:20:11 +00:00
Andy Wilkinson 632a19ad63 Polish "Add customizers for opaque token introspector builders"
See gh-49029
2026-03-10 10:42:00 +00:00
itsmevichu 2ff451d502 Add customizers for opaque token introspector builders
See gh-49029

Signed-off-by: itsmevichu <vishnutheep@gmail.com>
2026-03-10 10:42:00 +00:00
Phillip Webb 86567aab1f Enable auto-configuration of OAuth2 machinery in a non-webapp
Refactor `spring-boot-security-oauth2-authorization-server` to separate
core authorization server auto-configuration from Spring Security web
auto-configuration.

This update should allow authorization server auto-configuration
outside or a reactive or servlet web application.

Closes gh-43978
2026-02-26 21:48:08 -08:00
Andy Wilkinson c3e51d32b8 Allow a JwtTypeValidator bean to override Security's default
A change in Spring Security [1] means that type validation is now
performed by default by Spring Security. A breaking side-effect of
this is that setting validateTypes to false no longer has an effect
and the default JwtTypeValidator is still present. Its presence,
wrapped in a DelegatingOAuth2TokenValidator, prevents a user's
JwtTypeValidator bean from being used for type validation.

This commit updates Boot's auto-configuration to change how the
type validators are created. We avoid wrapping in a
DelegatingOAuth2TokenValidator so that the user's custom
JwtTypeValidator can be detected and used in place of the default.
This requires us to create the JwtIssuerValidator rather than using
the createDefaultWithIssuer method as it does not allow additional
validators to be provided.

Fixes gh-48301

[1] https://github.com/spring-projects/spring-security/commit/6d3b54df21ec0cffc30c8b3e0784220bd117a87d
2025-11-27 14:18:10 +00:00
Stéphane Nicoll 3d23261f87 Merge branch '3.5.x'
Closes gh-48122
2025-11-13 14:55:19 +01:00
Stéphane Nicoll 724f706f34 Move auto-configuration for WebTestClient in autoconfigure
Closes gh-47892
2025-10-31 12:05:25 +01:00
Yanming Zhou 609b0b444e Use JsonMapper instead of ObjectMapper where feasible
See gh-47503

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-10-20 13:16:52 +02:00
Phillip Webb c2e68c0911 Refactor security auto-configuration package structure
Refactor security auto-configuration package structure and classes to
create distinct web configurations.

Closes gh-14412
2025-10-16 14:10:08 -07:00
Phillip Webb 8f89bd304f Polish code to fix warnings 2025-10-14 21:51:25 -07:00
Phillip Webb 34e0382858 Move actuator heath code to spring-boot-health
Closes gh-46357
2025-10-14 21:51:24 -07:00
Phillip Webb 4587c82330 Start building against Spring Security 7.0.0-RC1 snapshots
See gh-47499
2025-10-13 15:13:00 -07:00
Moritz Halbritter c03b71ea4e Add nullability annotations to tests in module/spring-boot-security-oauth2-resource-server
See gh-47263
2025-10-13 15:15:51 +02:00
Andy WilkinsonandPhillip Webb 9eb05ebb10 Create spring-boot-resttestclient and spring-boot-webtestclient modules
Create `spring-boot-resttestclient` and `spring-boot-webtestclient`
modules to hold test client auto-configuration and `TestRestTemplate`
code.

Previous these classes were contained in `spring-boot-resetclient-test`
and `spring-boot-webclient-test` which was incorrect since the `-test`
modules should hold code need to test the given modules, not supporting
test classes.

See gh-46356

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2025-10-09 22:12:39 -07:00
Phillip Webb 4b2d358384 Refine spring-boot-test-autoconfigure dependencies
Make `spring-boot-test-autoconfigure` optionally depend on
`spring-boot-autoconfigure` so that it can be an `api` dependency
for `*-test` modules. Also relocate it to core.

See gh-47322
2025-10-01 21:41:55 -07:00
Andy Wilkinson 5348880b69 Modularize spring-boot-test-autoconfigure
This commit modularizes spring-boot-test-autoconfigure. It now
contains only the code that's central to test auto-configuration.
Feature-specific functionality has moved out into -test modules,
some existing and some newly created. For example, `@DataJpaTest` can
now be found in spring-boot-data-jpa-test.

Closes gh-47322
2025-09-25 13:11:35 +01:00
Phillip WebbandMoritz Halbritter 239f384ac0 Update PropertyMapper to better support nullability
Refactor `PropertyMapper` so that it no longer calls adapter or
predicate methods by default when the source value is `null`. This
effectively makes all default calls the same as using
`alwaysWhenNotNull` in the previous generation of the code.

For the limited times when you do need to deal with `null` values, the
new `always()` method can be used.

For example,

	map.from(source::method).to(destination::method);

Will not call `destination.method(...)` if `source.method()` returns
`null`.

Where as:

	map.from(source::method).always().to(destination::method);

Will call  `destination.method(null)` if `source.method()` returns
`null`.

This update provides clearer semantics for the API and allows for better
JSpecify nullability annotations. It has also simplified much of our
existing property mapper code.

Closes gh-47024

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
2025-09-05 14:43:33 -07:00
Andy Wilkinson d353038c58 Update Jackson support to require Jackson 3
Closes gh-45535
2025-09-02 11:37:09 +01:00
Moritz Halbritter 99629d0d32 Improve null-safety of module/spring-boot-security-oauth2-resource-server
See gh-46926
2025-08-26 14:22:56 +02:00
Moritz Halbritter 0fde29da0f Add nullability annotations to module/spring-boot-security-oauth2-resource-server
See gh-46587
2025-08-06 10:13:39 +02:00
Andy Wilkinson 0f2e0d693a Polish 2025-07-31 13:16:00 +01:00
Andy Wilkinson 4720956c06 Merge branch '3.5.x'
Closes gh-46637
2025-07-31 12:01:17 +01:00
Moritz Halbritter c0f1f641ce Make auto-configurations final and remove public members
Closes gh-32883
2025-07-29 09:48:49 +02:00
Phillip Webb decc32dde3 Restructure project directories to better fit Gradle
Closes gh-46358
2025-07-10 17:54:08 -07:00