1
0
mirror of synced 2026-05-22 21:33:16 +00:00
Commit Graph

2098 Commits

Author SHA1 Message Date
Robert Winch ea8bd1a01d Merge branch '7.0.x'
Closes gh-18595
2026-01-26 12:17:24 -06:00
Robert Winch 6dd6e8ebb1 Merge branch '6.5.x' into 7.0.x
Closes gh-18235
2026-01-26 12:06:19 -06:00
Garvit Joshi edd82ba82c gh-18234: Create SHA-1 MessageDigest for every new check request
Signed-off-by: Garvit Joshi <garvitjoshi9@gmail.com>
2026-01-26 11:06:25 -06:00
Robert Winch d7fbf3673a Fix consistency with Nullability Usage
Issue gh-18564
2026-01-23 10:42:53 -06:00
Robert Winch 9f8ac34c3b Remove @NullUnmarked
Closes gh-18491
2026-01-21 14:11:25 -06:00
Soumik Sarker 3f66d8b770 Fix format
Signed-off-by: Soumik Sarker <ronodhirsoumik@gmail.com>
2026-01-21 14:11:25 -06:00
Soumik Sarker ea26031a4d Fix format
Signed-off-by: Soumik Sarker <ronodhirsoumik@gmail.com>
2026-01-21 14:11:25 -06:00
Soumik Sarker b1d98491cf Removed nullUnmarked annotation from observability web classes
Fixes #17815

Signed-off-by: Soumik Sarker <ronodhirsoumik@gmail.com>
2026-01-21 14:11:25 -06:00
Robert Winch 35d103843b Externalize java-toolchain configuration
We should not use subprojects to perform configuration becaause it
does not allow for lazy loading and it can cause ordering problems.
In this case, the toolchain was not being used but instead it was
using the JAVA_HOME.

By splitting the configuration into a plugin and applying it to each
project it fixes the toolchain configuration
2026-01-16 16:54:00 -06:00
Robert Winch 0993e5735e Add missing @NullMarked
Closes gh-18514
2026-01-16 14:53:16 -06:00
Robert Winch 048b6bdd88 Update to JDK 25 (release = 17)
This commit updates the build to use JDK 25 while remaining compatable with JDK 17.

Note that we must update our JAAS related tests to use release=25 due to the disabling of
the Security Manager. See
https://docs.oracle.com/en/java/javase/25/security/security-manager-is-permanently-disabled.html

Closes gh-18512
2026-01-16 11:25:59 -06:00
Josh Cummings 3336f5f2ec Merge branch '7.0.x' 2026-01-14 14:47:31 -07:00
Josh Cummings d2ed8321b4 Merge branch '6.5.x' into 7.0.x 2026-01-14 14:46:36 -07:00
Guillaume Husta dd1f097131 Add @FunctionalInterface to RequestMatcher
Add `@FunctionalInterface` to `RequestMatcher`.

According to the documentation, it is a FunctionalInterface.

See: https://docs.spring.io/spring-security/reference/6.5/servlet/authorization/authorize-http-requests.html#match-by-custom

Signed-off-by: Guillaume Husta <guillaume.husta@gmail.com>
2026-01-14 14:45:22 -07:00
Robert Winch ec06f08bb6 Merge branch '7.0.x' 2026-01-12 13:38:52 -06:00
Andrey Litvitski 13f6286e04 Use DefaultParameterNameDiscoverer#getSharedInstance
Closes: gh-18330

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2026-01-12 13:37:32 -06:00
rigu1 0a6883c586 Fix Javadoc warnings in spring-security-web
* Use <code> tags for external references in DelegatingMissingAuthorityAccessDeniedHandler and SwitchUserWebFilter
* Fix typo in SessionAuthenticationException
* Apply javadoc-warnings-error plugin

Closes gh-18468

Signed-off-by: rigu1 <dlsrbtla@gmail.com>
2026-01-12 13:24:47 -06:00
Tran Ngoc Nhan d20c88ecef Format code
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2026-01-08 13:35:43 -06:00
Tran Ngoc Nhan 79815e044e Fix typos
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2026-01-08 13:35:43 -06:00
Soumik Sarker 244b5a16be Added test scope for NPE in RequestMethod
Signed-off-by: Soumik Sarker <ronodhirsoumik@gmail.com>
2025-12-01 18:06:42 -06:00
Josh Cummings 5662e17370 Add Nullable Annotations
Added Nullable to methods that may return a null value

Closes gh-18046
2025-11-04 15:08:12 -07:00
Rob Winch aaf738f7ac MFA is now Opt In
This commit ensures that MFA is only performed when users opt in. By
doing so, we allow users to decide if they will opt into the semantics
of merging two Authentication instances.

Closes gh-18126
2025-11-03 22:42:27 -06:00
Rob Winch ccd39a23c9 Only perform MFA if Authentication.getName() is the same
Closes gh-18112
2025-11-03 22:42:27 -06:00
Josh Cummings 793820acfa Remove Authority Copying From Reactive
We will re-address this when adding factors to
ReactiveAuthenticationManager implementations.

Issue gh-2603
2025-11-03 13:31:30 -07:00
Josh Cummings fb701e4615 Merge remote-tracking branch 'origin/6.5.x' 2025-10-20 17:10:05 -06:00
Josh Cummings 1c112005fa Don't Attempt to Generate Token Without Valid Token Request
Closes gh-18088

Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
2025-10-20 17:09:43 -06:00
Marcus Hert da Coregio e0a71eb00e Fix GenerateOneTimeTokenRequestResolver ignored if username param not present
Signed-off-by: Marcus Hert da Coregio <marcusdacoregio@gmail.com>
2025-10-20 17:09:43 -06:00
Andrey Litvitski 9b61533db2 Mark GrantedAuthority#getAuthority as @Nullable
Closes: gh-17999

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2025-10-20 15:22:24 -06:00
Josh Cummings 9c7b34a48b Favor Relative Redirects by Default
Closes gh-16300
2025-10-20 10:25:17 -06:00
Rob Winch 51e8f8f1c6 Deprecate WebAuthnAuthenticationFilter.setConverter(GenericHttpMessageConverter)
This makes sense given that Framework's new Jackson support is a
SmartHttpMessageConverter. Additionally,
GenericHttpMessageConverterAdapter is now package private to encapsulate
it.

Issue gh-18073
2025-10-19 17:03:19 -05:00
Sébastien Deleuze 137f8fd670 Add support for JacksonJsonHttpMessageConverter
This commit introduces classpath checks and instantiation of
JacksonJsonHttpMessageConverter (based on Jackson 3) leveraging
a new GenericHttpMessageConverterAdapter which allows to adapt
SmartHttpMessageConverter to GenericHttpMessageConverter.

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 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
Josh Cummings 4bc319883b Address Nullability 2025-10-17 14:03:15 -06:00
Josh Cummings b1a50a25b6 Check If toBuilder Is Implemented
Since RC1 is right around the corner, let's change the API
footprint as little as possible by using reflection to check
if a class has declared toBuilder themselves. If they have, we
can assume that that class's builder will produce that class.

Issue gh-18052
2025-10-16 13:41:45 -06: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
Josh Cummings cefc0cddec Propagate All Missing Factors
Closes gh-18000
2025-10-16 13:41:45 -06:00
Rob Winch 2eb5da3764 Deprecate CacheControlServerHttpHeadersWriter.CACHE_CONTRTOL_VALUE
The member is public, so we need to deprecate it rather than remove it.

Issue gh-18035

Closes gh-18058
2025-10-16 14:03:19 -05:00
Tran Ngoc Nhan f5d33457dc Fix-typos
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-10-16 14:03:19 -05:00
Joe Grandja 67c3ceb611 Fix NullAway error
Related https://github.com/spring-projects/spring-framework/pull/35629
2025-10-15 14:53:06 -04:00
Josh Cummings 4102007119 Add Builder#authentication
This commit consolidates logic common to applying one
authenticaiton to another. Specifically, it will copy the
authorities in one authentication into the builder instance
of another.

Closes gh-18053
2025-10-15 12:01:11 -06:00
Josh Cummings e535e61c8b Move toBuilder to BuildableAuthentication
Closes gh-18052
2025-10-15 12:01:11 -06:00
Rob Winch b864be92d8 Update to Reactor 2025.0.0-SNAPSHOT
To prepare for the release we should update to Reactor
2025.0.0-SNAPSHOT to fix any issues that are present.

Closes gh-18041
2025-10-13 11:16:27 -05: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 83da86a358 DefaultLoginPageGeneratingFilter uses List
This fixes an ordering problem with query parameters of the tests.

Issue gh-18002
2025-10-06 09:34:06 -05:00
Rob Winch 9595d37c14 Integration Test for DefaultLoginPageGeneratingFilterTests
Add a minimal test to ensure that
DelegatingMissingAuthorityAccessDeniedHandler and
DefaultLoginPageGeneratingFilterTests work together properly.

Issue gh-18002
2025-10-03 15:20:03 -05:00
Rob Winch 2473378fcd Use RequiredFactorErrors
Closes gh-18002
2025-10-03 15:20:03 -05:00
Rob Winch 64c9e3e210 Prevent Dupliate GrantedAuthority#getAuthority()
If the GrantedAuthority is not equal, but contains a duplicate
GrantedAuthority#getAuthority() then at the time of authentication,
the Filter or WebFilter will duplicate the GrantedAuthority which leads
to a memory leak. This is important to avoid for when we add support for
a GrantedAuthority that might have an issuedAt attribute. If it is too
old, then we'd want only the new GrantedAuthority to be added and the old
instance to be removed. However, the two GrantedAuthority instances
will not be equal because the issuedAt will not be equal.

Closes gh-17981
2025-10-01 15:37:23 -05:00
Rob Winch 029e31ebe8 DelegatingAuthenticationEntryPoint.Builder allows just defaultEntryPoint
Previously build threw an Exception when entryPoints was empty and
defaultEntryPoint was specified.

This commit changes build to return the defaultEntryPoint instead.

Closes gh-17955
2025-09-25 09:45:52 -05:00
Rob Winch b2d76dfe66 Add GrantedAuthorities.FACTOR_*_AUTHORITY
Closes gh-17952
2025-09-24 09:53:56 -05:00