Commit Graph

332 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
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 e535e61c8b Move toBuilder to BuildableAuthentication
Closes gh-18052
2025-10-15 12:01:11 -06: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
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 18fbf88993 Polish CAS Authentication Builder
Issue gh-17861
2025-09-09 14:49:13 -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
Rob Winch a4a4908d71
Enable Null checking in spring-security-cas via JSpecify
Closes gh-16882
2025-08-30 11:22:30 -05: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
Josh Cummings 558b7e0b47
Use PathPatternRequestMatcher in cas
Issue gh-16887
2025-07-03 13:37:48 -06:00
Josh Cummings 98686a5139
Standardize Mock Request Paths
Closes gh-17449
2025-07-03 13:37:47 -06:00
Soumik Sarker dff5780e09 Removed deprecated class ServiceAuthenticationDetails
Issue gh-17309

Signed-off-by: Soumik Sarker <ronodhirsoumik@gmail.com>
2025-07-03 12:44:06 -06:00
Josh Cummings 91ee5e7f2b
Add RequestMatcher Migration Path for CAS
Issue gh-16417
2025-03-26 16:38:38 -06:00
Josh Cummings 50ad378a29
Polish MockHttpServletRequest Usage
This commit makes so that the requestURI is set to a value that makes
sense with the other properties being mocked.

Issue gh-16632
2025-03-26 13:27:17 -06:00
Rob Winch 05116eabbd
Merge branch '6.3.x' into 6.4.x
- adb303e Add testRuntimeOnly junit-platform-launcher

Closes gh-16756
2025-03-17 14:18:49 -05:00
Rob Winch adb303e152
Add testRuntimeOnly junit-platform-launcher
Closes gh-16755
2025-03-17 14:16:44 -05:00
Josh Cummings 8735368d9e
Don't Support Serialization of Jackson Modules
Issu gh-16276
2025-01-14 17:04:36 -07:00
Joe Grandja c2cfe92a02 Merge branch '6.3.x' 2024-11-18 05:16:16 -05:00
Joe Grandja 709103e38c Merge branch '6.2.x' into 6.3.x 2024-11-18 04:45:38 -05:00
Joe Grandja a8c4d6cead Require Locale argument for toLower/toUpperCase usage 2024-11-18 04:22:26 -05:00
Tran Ngoc Nhan ab93541926 Simplify condition in some methods 2024-10-25 13:42:33 -07:00
Kyoungwoong 9b2910cd42 Add setter method for userDetailsChecker in CasAuthenticationProvider(#10277)
This commit introduces a setter method for the userDetailsChecker property in the CasAuthenticationProvider class. Previously, the userDetailsChecker was initialized with a default AccountStatusUserDetailsChecker instance, limiting customization options. Now, users can inject their own UserDetailsChecker implementation through the setter method, providing greater flexibility in handling user details validation.
2024-05-24 14:00:56 -03:00
Marcus Hert Da Coregio 08f11f06ab Revert unnecessary commits from main
Issue gh-15016
2024-05-08 13:49:18 -03:00
Rishi Raj 0202409dae Proofread documentation 2024-04-30 09:14:54 -03:00
Marcus Hert Da Coregio f4712069d7 Allow customization of redirect strategy in CasAuthenticationEntrypoint
Closes gh-14881
2024-04-10 13:25:47 -03:00
Josh Cummings a1549d9dd7
Merge branch '6.2.x' 2024-02-20 17:17:27 -07:00
Josh Cummings cfb9f1ed32
Merge branch '6.1.x' into 6.2.x
Closes gh-14641
2024-02-20 17:17:12 -07:00
Josh Cummings 89246998c4
Move Cas Class
Closes gh-14627
2024-02-20 17:16:37 -07:00
Marcus Hert Da Coregio 21580fd27d Merge branch '6.2.x' 2024-02-16 13:31:20 -03:00
Marcus Hert Da Coregio 15306c1007 Merge branch '6.1.x' into 6.2.x 2024-02-16 13:21:15 -03:00
Rob Winch 750cb30ce4 Add AuthenticationTrustResolver.isAuthenticated 2024-02-16 13:08:29 -03:00
Marcus Hert Da Coregio fd3de41c3b Merge branch '6.2.x'
Closes gh-14537
2024-02-02 15:33:33 -03:00
Marcus Hert Da Coregio b21f941c85 Merge branch '6.1.x' into 6.2.x
Closes gh-14536
2024-02-02 15:32:17 -03:00
Marcus Hert Da Coregio 4e5780a30c Fix setters not working for CasAuthenticationFilter
The setSecurityContextRepository and setSecurityContextHolderStrategy only works for the parent class.
This commit overrides the method and make sure that we set the objects in the super class and the CasAuthenticationFilter.

Closes gh-14529
2024-02-02 15:29:28 -03:00
Marcus Hert Da Coregio 69808bfda3 Polish gh-14193
Issue gh-14193
2023-12-20 11:06:53 -03:00
Jérôme LELEU f516fbc39a Added support for the CAS gateway feature 2023-12-20 11:06:53 -03:00
Steve Riesenberg 447f40949c
Revert unnecessary merges on 6.1.x
This commit removes unnecessary main-branch merges starting from
9f8db22b77 and adds the following
needed commit(s) that were made afterward:

- 4d6ff49b9d
- ed6ff670d1
- c823b00794
- 44fad21363
2023-10-31 15:22:15 -05:00
Steve Riesenberg 9db33f33c7
Revert unnecessary merges on 6.0.x
This commit removes unnecessary main-branch merges starting from
8750608b5b and adds the following
needed commit(s) that were made afterward:

- 5dce82c48b
2023-10-31 15:11:45 -05:00
Marcus Da Coregio 24ece1290c Merge branch '6.1.x'
Closes gh-13948
2023-10-04 10:28:07 -03:00
Marcus Da Coregio 18773d653f Update to org.apereo.cas.client:cas-client-core 4.0.3
Closes gh-13947
2023-10-04 10:27:19 -03:00
Marcus Da Coregio 07b6c451fd Merge branch '6.1.x'
Closes gh-13884
2023-09-29 11:47:38 -03:00
Marcus Da Coregio 8adfc9b463 Merge branch '6.0.x' into 6.1.x
Closes gh-13883
2023-09-29 11:46:48 -03:00
kandaguru17 c87e8c752b Use SecurityContextHolderStrategy in CasAuthenticationFilter
Closes gh-13265
2023-06-23 09:58:48 -03:00