Commit Graph

289 Commits

Author SHA1 Message Date
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 54aae36f98 Add support for OAuth 2.0 Protected Resource Metadata
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-17244
2025-10-02 14:50:17 -04:00
Rob Winch b2d76dfe66
Add GrantedAuthorities.FACTOR_*_AUTHORITY
Closes gh-17952
2025-09-24 09:53:56 -05: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
Rob Winch 093e930c32
Merge branch '6.5.x' 2025-09-10 12:00:31 -05:00
Rob Winch ab634d1099
Merge branch '6.4.x' into 6.5.x 2025-09-10 11:58:55 -05:00
Rob Winch a79a2b031a
Remove MockWebServer from JwtIssuerAuthenticationManagerResolverTests
This prevents timeouts on GitHub Windows runners due to overtaxed
systems.

Closes gh-17869
2025-09-10 11:56:07 -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
chanbinme 08fa272749 Remove authoritiesClaimName Field
This commit simplfies the logic in JwtGrantedAuthoritiesConverter
to no longer need the authoritiesClaimName field.

Signed-off-by: chanbinme <gksmfcksqls@gmail.com>
2025-08-13 10:57:15 -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 2fdca16c1a
Merge branch '6.4.x' into 6.5.x
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 / Check Samples (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-17634
2025-07-29 09:47:52 -05:00
Rob Winch 392129b616
Use 2004-present Copyright Header
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 / Check Samples (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
The Spring portfolio is changing to use <inception-year>-present in
the copyright headers to simplify keeping headers up to date. This
commit updates the headers and the checkstyle accordingly.

The commit updated etc/checkstyle/header.txt

It also updated the copyright headers using the following find/replace:

Find: (Copyright \d{4})\s*(\-\d{4})? the original author or authors.
Replace: Copyright 2004-present the original author or authors.

Closes gh-17633
2025-07-29 09:45:23 -05:00
Tran Ngoc Nhan 6dc77bd98b Update JwtIssuerAuthenticationManagerResolver constructor javadoc
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-07-07 11:37:52 -06:00
Tran Ngoc Nhan 21036c94b4 Remove Nimbus(Reactive)OpaqueTokenIntrospector
Closes gh-17302

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-07-03 15:41:57 -06:00
Soumik Sarker 06bd81b1da Removed deprecated class BearerTokenAuthenticationFilter
Closes gh-17309

Signed-off-by: Soumik Sarker <ronodhirsoumik@gmail.com>
2025-07-03 12:44:06 -06:00
Soumik Sarker 526f8a6200 Removed deprecated class BearerTokenAuthenticationToken
Issue gh-17309

Signed-off-by: Soumik Sarker <ronodhirsoumik@gmail.com>
2025-07-03 12:44:06 -06:00
Tran Ngoc Nhan a74ce06dae Remove JwtIssuer(Reactive)AuthenticationManagerResolver deprecations
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-06-24 12:33:00 -06:00
Rob Winch 18010f9914 Fix JwtAuthenticationProvider Checkstyle
Issue gh-17251
2025-06-17 13:32:43 -05:00
chanbinme 9cf5638914 Add null check for authentication token in JwtAuthenticationProvider
Add Assert.notNull validation to ensure the authentication token returned by jwtAuthenticationConverter is not null, preventing potential NullPointerException in subsequent operations.

Signed-off-by: chanbinme <gksmfcksqls@gmail.com>
2025-06-17 13:32:43 -05:00
Josh Cummings eaab42a73c Polish BearerTokenAuthenticationConverter Support
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) Waiting to run Details
- Moved to BearerTokenAuthenticationFilter constructor to align with
AuthenticationFilter
- Undeprecated BearerTokenResolver to reduce number of migration scenarios
- Updated to 7.0 schema
- Added migration docs

Issue gh-14750
2025-06-04 18:17:17 -06:00
Max Batischev 30577bd291 Add Additional Tests To BearerTokenAuthenticationFilterTests
Issue gh-14750

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-06-04 18:17:17 -06:00
Max Batischev 4967f3feee Add Support BearerTokenAuthenticationConverter
Closes gh-14750

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-06-04 18:17:17 -06:00
Joe Grandja 44303d2c80 Polish gh-17080 2025-05-13 14:36:44 -04:00
David Kowis 462e38c0e3 Fix DPoP jkt claim to be JWK SHA-256 thumbprint
Just used the nimbus JOSE library to do it, because it already has a
compliant implementation.

Closes gh-17080

Signed-off-by: David Kowis <david@kow.is>
2025-05-13 14:36:44 -04:00
Joe Grandja a265ac6ae7 Polish gh-17080
CodeQL Advanced / Analyze (${{ matrix.language }}) (none, actions) (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 / Check Samples (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
2025-05-13 14:35:23 -04:00
David Kowis 2090f44f74 Fix DPoP jkt claim to be JWK SHA-256 thumbprint
Just used the nimbus JOSE library to do it, because it already has a
compliant implementation.

Closes gh-17080

Signed-off-by: David Kowis <david@kow.is>
2025-05-13 14:35:23 -04:00
Joe Grandja ba7be9c8b9 Merge branch '6.5.x'
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
CodeQL Advanced / Analyze (${{ matrix.language }}) (none, actions) (push) Has been cancelled Details
Deploy Docs / build (push) Has been cancelled Details
2025-05-09 16:14:34 -04:00
Joe Grandja e3c39f02bc Add documentation for DPoP support
CodeQL Advanced / Analyze (${{ matrix.language }}) (none, actions) (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
CI / Test Against Snapshots (17, 17) (push) Has been cancelled Details
CI / Test Against Snapshots (21-ea, 21) (push) Has been cancelled Details
CI / Check Samples (push) Has been cancelled Details
Deploy Docs / build (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
Closes gh-17072
2025-05-09 16:02:14 -04:00
Rob Winch b453840c0a
HttpHeaders no longer a MultiValueMap
Closes gh-17060
2025-05-06 13:27:13 -05:00
Rob Winch 2dbf3a2d18
WebClient.exchange->exchangeToMono
Closes gh-17057
2025-05-06 13:26:16 -05:00
Josh Cummings eecd7d9559
Update Deprecated Reactor Usage 2025-04-23 12:11:08 -06:00
Joe Grandja 791feee355 Prevent downgraded usage of DPoP-bound access tokens
Issue gh-16574

Closes gh-16937
2025-04-14 15:54:41 -04:00
Tran Ngoc Nhan d864e51ff6 Format OpaqueTokenIntrospector
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-04-08 13:56:54 -05:00
Tran Ngoc Nhan d899bc5240 Polish javadoc
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-04-08 13:56:54 -05:00
Steve Riesenberg 1fb3fc80f9
Polish gh-15819
Closes gh-15818
2025-04-07 10:57:49 -05:00
Jonah Klöckner 9674532f4d
Add support for access token in body parameter as per rfc 6750 Sec. 2.2
Issue gh-15818
2025-04-07 10:57:49 -05:00
Steve Riesenberg 03e090c2d7
Merge branch '6.4.x'
Closes gh-16902
2025-04-07 10:57:12 -05:00
Steve Riesenberg db34de59bc
Merge branch '6.3.x' into 6.4.x
CI / Build (17, ubuntu-latest) (push) Has been cancelled Details
CI / Build (17, windows-latest) (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 / Check Samples (push) Has been cancelled Details
Deploy Docs / build (push) Has been cancelled Details
Trigger Dependabot Auto Merge Forward / Trigger Workflow (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
Closes gh-16901
2025-04-07 10:55:51 -05:00
Steve Riesenberg 3c0fef59b5
Polish gh-16039
CI / Build (17, ubuntu-latest) (push) Has been cancelled Details
CI / Build (17, windows-latest) (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 / Check Samples (push) Has been cancelled Details
Deploy Docs / build (push) Has been cancelled Details
Trigger Dependabot Auto Merge Forward / Trigger Workflow (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
Closes gh-16038
2025-04-07 10:54:09 -05:00
Jonah Klöckner da94fbe431
Evaluate URI query parameter only if enabled
Issue gh-16038
2025-04-07 10:54:07 -05:00
Tran Ngoc Nhan 7bca17cb5a Polish
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 / Check Samples (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
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-03-26 17:02:06 -06:00
Josh Cummings 56e757a2a1 Provide Authentication to AuthenticationExceptions
Deploy Docs / build (push) Has been cancelled Details
Execute Gradle Wrapper Upgrade / Execution (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
CI / Test Against Snapshots (17, 17) (push) Has been cancelled Details
CI / Test Against Snapshots (21-ea, 21) (push) Has been cancelled Details
CI / Check Samples (push) Has been cancelled Details
Clean build artifacts / main (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
Issue gh-16444
2025-03-21 21:54:32 -06:00