Commit Graph

917 Commits

Author SHA1 Message Date
Sébastien Deleuze 48854c3ac9 Deprecate Jackson 2 support
This commit does not cover webauthn which is a special case (uses
jackson sub-package for Jackson 2 support) which will be handled in
a distinct commit.

See gh-17832
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
2025-10-19 17:03:19 -05:00
Sébastien Deleuze 65a14d6c6d Add Jackson 3 support
This commit adds support for Jackson 3 which has the following
major differences with the Jackson 2 one:
 - jackson subpackage instead of jackson2
 - Jackson type prefix instead of Jackson2
 - JsonMapper instead of ObjectMapper
 - For configuration, JsonMapper.Builder instead of ObjectMapper
   since the latter is now immutable
 - Remove custom support for unmodifiable collections
 - Use safe default typing via a PolymorphicTypeValidator

Jackson 3 changes compared to Jackson 2 are documented in
https://cowtowncoder.medium.com/jackson-3-0-0-ga-released-1f669cda529a
and
https://github.com/FasterXML/jackson/blob/main/jackson3/MIGRATING_TO_JACKSON_3.md.

This commit does not cover webauthn which is a special case (uses
jackson sub-package for Jackson 2 support) which will be handled in
a distinct commit.

See gh-17832
Signed-off-by: Sébastien Deleuze <sdeleuze@users.noreply.github.com>
2025-10-19 17:03:19 -05:00
Joe Grandja 0d261e9c32 Remove setOidcUserMapper() in OidcUserService and OidcReactiveOAuth2UserService
CodeQL Advanced / codeql-analysis-call (push) Waiting to run Details
CI / Build (17, ubuntu-latest) (push) Waiting to run Details
CI / Build (17, windows-latest) (push) Waiting to run Details
CI / Deploy Artifacts (push) Blocked by required conditions Details
CI / Deploy Docs (push) Blocked by required conditions Details
CI / Deploy Schema (push) Blocked by required conditions Details
CI / Perform Release (push) Blocked by required conditions Details
CI / Send Notification (push) Blocked by required conditions Details
Deploy Docs / build (push) Waiting to run Details
Closes gh-18060
2025-10-16 16:29:52 -04:00
Josh Cummings 2e7cdd7b14 Revert "Merge branch 'builder-enhancements'"
This reverts commit 95644fb73c, reversing
changes made to fbf7bb3be1.

Reverting this commit will allow us more time to
consider the ideal way to add this support to the public API.
2025-10-16 13:41:45 -06:00
Joe Grandja af1de950ae Align setRetrieveUserInfo() between OidcUserService and OidcReactiveOAuth2UserService
Closes gh-18057
2025-10-16 15:12:10 -04:00
Joe Grandja 7f29585df4 Remove OidcUserService.setAccessibleScopes()
Closes gh-18056
2025-10-16 15:12:10 -04:00
Josh Cummings e535e61c8b Move toBuilder to BuildableAuthentication
Closes gh-18052
2025-10-15 12:01:11 -06:00
Ivan Golovko 979ac7c336 Remove cache from (Reactive)OidcIdTokenDecoderFactory
CodeQL Advanced / codeql-analysis-call (push) Waiting to run Details
CI / Build (17, ubuntu-latest) (push) Waiting to run Details
CI / Build (17, windows-latest) (push) Waiting to run Details
CI / Deploy Artifacts (push) Blocked by required conditions Details
CI / Deploy Docs (push) Blocked by required conditions Details
CI / Deploy Schema (push) Blocked by required conditions Details
CI / Perform Release (push) Blocked by required conditions Details
CI / Send Notification (push) Blocked by required conditions Details
Deploy Docs / build (push) Waiting to run Details
Closes gh-16647

Signed-off-by: iigolovko <iigolovko@ginc-it.ru>
2025-10-14 11:24:54 -04:00
Rob Winch d18431a78d
Move FACTOR_ constants to FactorGrantedAuthority
Previously GrantedAuthorities had an implicit package tangle because it
was located in ~.core and FactorGrantedAuthority is in ~.core.authority
and FactorGrantedAuthority's authority property was implicitly expected
to be constants found in `GrantedAuthorities`.

This commit moves the constants to the FactorGrantedAuthority which
resolves this tangle. It wasn't initially done because
FactorGrantedAuthority did not exist at that time.

Closes gh-18030
2025-10-10 16:24:46 -05:00
Rob Winch 3f74991ce9
Authentication adds FactorGrantedAuthority
Closes gh-18001
2025-10-03 15:20:03 -05:00
Joe Grandja 4dfef1483d Polish gh-17507 2025-10-03 13:09:09 -04:00
Rohan Naik 8c65dc93f2 Enable PKCE by default
Closes gh-17507

Signed-off-by: Rohan Naik <rohan.nn1203@gmail.com>
2025-10-03 13:08:04 -04:00
Rob Winch b2d76dfe66
Add GrantedAuthorities.FACTOR_*_AUTHORITY
Closes gh-17952
2025-09-24 09:53:56 -05:00
Josh Cummings 6e7a181eac
Polish Authentication Factors
Issue gh-17933
2025-09-19 11:32:28 -06:00
Josh Cummings 758b35df9c
Add Factor Tests for Authentication Providers
Issue gh-17933
2025-09-19 11:32:27 -06:00
Josh Cummings e8accd0499
Add Factory Authority When Authentication Succeeds
Issue gh-17933
2025-09-19 11:32:26 -06:00
Bernard Budano 02a948da81 Address reviewer requested changes
Closes gh-17806

Signed-off-by: Bernard Budano <bbudano@gmail.com>
2025-09-12 16:19:27 -05:00
Bernard Budano 8e3cf9677c Support @ClientRegistrationId at Class Level
Closes gh-17806

Signed-off-by: Bernard Budano <bbudano@gmail.com>
2025-09-12 16:19:27 -05:00
Josh Cummings 69ee8d9aec Polish OAuth 2.0 Authentication Builders
Issue gh-17861
2025-09-09 14:59:14 -06:00
Josh Cummings dd50dc0c40 Remove Generic Typing From Authentication.Builder
It would be better to introduce parameter types for
principal and credentials into Authentication.Builder
at the same time as doing so for Authentication

Issue gh-17861
2025-09-09 14:49:13 -06:00
Josh Cummings a0fe6a5fee Polish Builders
- Added remaining properties
- Removed apply method since Spring Security isn't using
it right now
- Made builders extensible since the authentications are
extensible

Issue gh-17861
2025-09-09 14:49:13 -06:00
Josh Cummings a201a2b862 Add Authentication.Builder
This commit adds a new default method to Authentication
for the purposes of creating a Builder based on the current
authentication, allowing other authentications to be
applied to it as a composite.

It also adds Builders for each one of the authentication
result classes.

Issue gh-17861
2025-09-09 14:49:13 -06:00
Josh Cummings c64b086878
Add SecurityAssertions
This commit introduces a simple, internal test API for
verifying aspects of an Authentication, like its name
and authorities.

Closes gh-17844
2025-09-03 17:53:42 -06:00
Josh Cummings eeb383ac46 Fix Checkstyle
Issue gh-17623
2025-08-07 14:32:18 -06:00
Josh Cummings 6d1a886f92 Deprecate SERIAL_VERSION_UID
Closes gh-17623
2025-08-07 11:09:35 -06:00
Rob Winch f6cb0bd610
Merge Use 2004-present Copyright Header
The original merge into main did not apply the changes. This fixes it.
Closes gh-17635
2025-07-29 10:52:42 -05:00
Rob Winch bf877a9864
Add OAuth2User to OidcUser Conversion Params
Deploy Docs / build (push) Has been cancelled Details
Execute Gradle Wrapper Upgrade / Execution (push) Has been cancelled Details
CodeQL Advanced / codeql-analysis-call (push) Has been cancelled Details
Update Antora UI Spring / Update on Supported Branches (5.8.x) (push) Has been cancelled Details
Update Antora UI Spring / Update on Supported Branches (6.2.x) (push) Has been cancelled Details
Update Antora UI Spring / Update on Supported Branches (6.3.x) (push) Has been cancelled Details
Update Antora UI Spring / Update on Supported Branches (main) (push) Has been cancelled Details
Update Antora UI Spring / Update on docs-build (push) Has been cancelled Details
CI / Build (17, ubuntu-latest) (push) Has been cancelled Details
CI / Build (17, windows-latest) (push) Has been cancelled Details
Clean build artifacts / main (push) Has been cancelled Details
CI / Test Against Snapshots (17, 17) (push) Has been cancelled Details
CI / Test Against Snapshots (21-ea, 21) (push) Has been cancelled Details
CI / Deploy Artifacts (push) Has been cancelled Details
CI / Deploy Docs (push) Has been cancelled Details
CI / Deploy Schema (push) Has been cancelled Details
CI / Perform Release (push) Has been cancelled Details
CI / Send Notification (push) Has been cancelled Details
Previously the Oidc(Reactive)OAuth2UserService APIs allowed a strategy
for converting to the OidcUser with the OidcUserRequest and OidcUserInfo.
The input should also include the OAuth2User to make
it simple to use the OAuth2User as a part of the conversion.

This commit introduces OidcUserSource as a POJO containing
OidcUserRequest, OidcUserInfo, and OAuth2User.

It then updates the OidcUser conversion strategy in OidcUserService and
OidcReactiveOAuth2UserService to accept OidcUserSource as the source for
the Converter used to create OidUser.

Closes gh-17626
2025-07-25 09:09:24 -05:00
Joe Grandja b8796d84b7 Fix tests in ClientRegistrationsTests
Issue gh-17542
2025-07-17 09:52:55 -04:00
Josh Cummings 571b6fe4a8
Fix Formatting
Issue gh-16858
2025-07-09 14:05:41 -06:00
Josh Cummings 9dea1c2eb5
Update to Latest HttpRequestValues Contract
Issue gh-16858
2025-07-09 13:47:06 -06:00
Josh Cummings 919ae1d636
Use PathPatternRequestMatcher in oauth2
Issue gh-16887
2025-07-03 13:37:49 -06:00
Josh Cummings 98686a5139
Standardize Mock Request Paths
Closes gh-17449
2025-07-03 13:37:47 -06:00
Joe Grandja e869bcdfa3 Remove deprecated implementations of OAuth2AccessTokenResponseClient
Closes gh-16909
2025-07-03 14:23:23 -04:00
Joe Grandja cfe38957d7 Remove Resource Owner Password Credentials grant
Closes gh-17446
2025-07-03 14:23:23 -04:00
Rob Winch e37424c637 Fix cycle in DefaultOAuth2AuthorizationRequestResolver
CodeQL Advanced / codeql-analysis-call (push) Waiting to run Details
CI / Build (17, ubuntu-latest) (push) Waiting to run Details
CI / Build (17, windows-latest) (push) Waiting to run Details
CI / Test Against Snapshots (17, 17) (push) Waiting to run Details
CI / Test Against Snapshots (21-ea, 21) (push) Waiting to run Details
CI / Deploy Artifacts (push) Blocked by required conditions Details
CI / Deploy Docs (push) Blocked by required conditions Details
CI / Deploy Schema (push) Blocked by required conditions Details
CI / Perform Release (push) Blocked by required conditions Details
CI / Send Notification (push) Blocked by required conditions Details
Deploy Docs / build (push) Has been cancelled Details
DefaultOAuth2AuthorizationRequestResolver should not depend on
OAuth2AuthorizationRequestRedirectFilter because
OAuth2AuthorizationRequestRedirectFilter already depends on
DefaultOAuth2AuthorizationRequestResolver.

OAuth2AuthorizationRequestRedirectFilter also takes advantage of the
new constructor that defaults the base uri.

Polishes gh-16384
2025-06-27 15:49:28 -05:00
DingHao 7587048f95 Add default authorizationRequestBaseUri to DefaultOAuth2AuthorizationRequestResolver
Closes gh-16383

Signed-off-by: DingHao <dh.hiekn@gmail.com>
2025-06-27 15:49:28 -05:00
Rob Winch b2325e4176
Add OAuth Support for HTTP Interface Client
Closes gh-16858
2025-06-17 09:53:51 -05:00
Tran Ngoc Nhan 48eb243012 Update javadoc
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-05-07 14:59:14 -05:00
Tran Ngoc Nhan 1e4dd713c5 Remove APPLICATION_JSON_UTF8 usage
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-05-07 14:59:14 -05:00
Rob Winch 5704582c52
ResponseErrorHandler.handleError(URI, HttpMethod,ClientHttpResponse)
Closes gh-17056
2025-05-06 13:26:16 -05:00
Rob Winch 11105a5c51
UriComponentsBuilder.fromHttpUrl->fromUriString
The fromHttpUrl method is deprecated and replaced with fromUriString

Closes gh-
2025-05-06 13:26:15 -05:00
Rob Winch cb0fdef236
Remove MediaType.APPLICATION_JSON_UTF
Closes gh-17050
2025-05-06 13:26:14 -05:00
Josh Cummings 804d79d96a
Merge branch '6.4.x' 2025-04-29 14:27:47 -06:00
Josh Cummings a4126aa27d
Merge branch '6.3.x' into 6.4.x 2025-04-29 14:27:40 -06:00
Josh Cummings f631a0fcd5
Polish ClientRegistrationsTests
Simplified the assertion so that it is focused on the core
behavior being verified. This will likely also make the test
more stable when updating Spring Framework versions.

Issue gh-16860
2025-04-29 14:27:04 -06:00
Josh Cummings fe6ddd0c8f
Merge branch '6.4.x' 2025-04-29 14:26:44 -06:00
Josh Cummings 656ad72608
Merge branch '6.3.x' into 6.4.x
Closes gh-17016
2025-04-29 14:22:52 -06:00
Evgeniy Cheban 0e84f31a00 Add ClientRegistration's RestClient failed attempts information to exception message
Closes gh-16860

Signed-off-by: Evgeniy Cheban <mister.cheban@gmail.com>
2025-04-29 13:43:20 -06:00
Josh Cummings eecd7d9559
Update Deprecated Reactor Usage 2025-04-23 12:11:08 -06:00
Josh Cummings 834370d8eb
Update Deprecated Spring Web Usage 2025-04-23 11:29:19 -06:00