Commit Graph

3271 Commits

Author SHA1 Message Date
Josh Cummings 1ad4323cec
Merge branch '6.3.x' into 6.4.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 / 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
Trigger Dependabot Auto Merge Forward / Trigger Workflow (push) Waiting to run Details
2025-03-27 16:43:43 -06:00
DingHao 1e7db094d1 Use correct message prompt
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
Trigger Dependabot Auto Merge Forward / Trigger Workflow (push) Waiting to run Details
Signed-off-by: DingHao <dh.hiekn@gmail.com>
2025-03-27 16:42:52 -06:00
Josh Cummings 40b84d3e44
Merge branch '6.4.x' 2025-03-27 16:34:39 -06:00
Josh Cummings 6c5b6d1c51
Merge branch '6.3.x' into 6.4.x
Closes gh-16837
2025-03-27 16:32:12 -06:00
Josh Cummings 456604ab45 Sort Default Advisors and Added Advisors
This commit ensures that the default advisors and added advisors
are sorted in the event that this component is not being published
as a Spring bean.

Issue gh-16819
2025-03-27 16:18:00 -06:00
Tran Ngoc Nhan fcc1bd598d Sort Advisors AfterSingletonsInstantiated
In order to make so that authorization advisors are sorted
only one time and also as part of the configuration lifecycle,
AuthorizationAdvisorProxyFactory now implements
SmartInitializingBean.

Closes gh-16819

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-03-27 16:18:00 -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
Josh Cummings 60bed7f68a Polish AuthenticationRequest Property
- Add getter for reading the request
- Update BadCredentialsMixing to ignore authentication
- Allow exception to be mutable

Issue gh-16444
2025-03-21 21:54:32 -06:00
amm0124 3b6aca0d9c Add authRequest field to AuthenticationException
Store the authentication request details in the `authRequest` field of
`AuthenticationException` when an authentication exception occurs.

Closes gh-16444

Signed-off-by: amm0124 <amm0124@naver.com>
2025-03-21 21:54:32 -06:00
Josh Cummings 7f22a3459f Polish Tests
Issue gh-16444
2025-03-21 21:54:32 -06:00
DingHao 10ed5009e6 Method Security templates support use deep non-aliased attributes
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-16498

Signed-off-by: DingHao <dh.hiekn@gmail.com>
2025-03-21 15:05:33 -06:00
Max Batischev ed79efc5fa Add support ResolvableTypeProvider to authorization events
Closes gh-16700

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-03-20 13:12:36 -06:00
Josh Cummings 85b48f8392
Deprecate AccessDecisionManager
Closes gh-11302
2025-03-19 17:41:20 -06:00
Josh Cummings 8e9634d25c
Deprecate ConfigAttribute
Closes gh-16774
2025-03-19 17:39:38 -06:00
Josh Cummings 89bd670fb1
Deprecate SecurityConfig
Closes gh-16773
2025-03-19 17:39:26 -06:00
Josh Cummings 989aee244b
Deprecate SecurityMetadataSource
Closes gh-16772
2025-03-19 15:26:05 -06:00
DingHao 96b9820e19 Annotation parameter scan finds first-level conflicts
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 PR-16312
2025-03-18 14:23:53 -06:00
Rob Winch e6223dede3
Merge branch '6.4.x'
- adb303e Add testRuntimeOnly junit-platform-launcher

Closes gh-16757
2025-03-17 14:34:18 -05: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 3468b7f85f
Merge branch '6.4.x' 2025-03-17 11:02:47 -06:00
Josh Cummings dc2e1af2da
Align Method Traversal with MergedAnnotations
Closes gh-16751
2025-03-17 10:11:46 -06:00
Josh Cummings 6ce8307885
Merge branch '6.4.x' 2025-03-17 09:50:07 -06:00
Josh Cummings 4993fa863a
Merge branch '6.3.x' into 6.4.x 2025-03-17 09:49:01 -06:00
Josh Cummings 36ea1b11a7
Fix Compilation Error
Issue gh-16697
2025-03-17 09:43:21 -06:00
Steve Riesenberg 0938ca01a4
Add support for automatic context-propagation with Micrometer
Closes gh-16665
2025-03-13 15:29:08 -05:00
Max Batischev 58a665e5aa Add Support SingleResultAuthorizationManager
Closes gh-16590

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-03-07 13:46:23 -07:00
Josh Cummings 39a80497c2
Merge branch '6.4.x' 2025-03-04 09:53:06 -07:00
Josh Cummings 4ae0965b1c
Merge branch '6.3.x' into 6.4.x 2025-03-04 09:52:31 -07:00
Josh Cummings 46cd94b5f4
SpEL Propagates Authorization Exceptions
Closes gh-16697
2025-03-04 09:51:55 -07:00
Max Batischev fa35c5b4d8 Make DefaultOneTimeToken Serializable
Closes gh-16617

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-02-27 12:49:48 -07:00
Josh Cummings ada6460f12
Merge branch '6.4.x' 2025-02-26 11:30:47 -07:00
Josh Cummings 954101ab0c
Use Thread-Safe Map
Issue gh-15906
2025-02-26 11:28:10 -07:00
Josh Cummings ae2894ab25
Update Copyright
Issue gh-16600
2025-02-24 15:09:04 -07:00
dae won 45b51fe3c8 Add grantedAuthorityMapper as a class member
- Add unit tests for setGrantedAuthorityMapper method

Signed-off-by: dae won <eodnjs01477@gmail.com>
2025-02-24 15:05:55 -07:00
dae won cb07031259 Add unit tests for setUserDetailsMapper method
Signed-off-by: dae won <eodnjs01477@gmail.com>
2025-02-24 15:05:55 -07:00
dae won 22511aac7f Refactor mapToUser method visibility to private
Signed-off-by: dae won <eodnjs01477@gmail.com>
2025-02-24 15:05:55 -07:00
dae won 6ac3426e39 Add userDetailsMapper as a class member
Signed-off-by: dae won <eodnjs01477@gmail.com>
2025-02-24 15:05:55 -07:00
dae won e8fe003c4c Make mapToUser and mapToGrantedAuthority protected in JdbcUserDetailsManager
- Closes gh-16540

Signed-off-by: dae won <eodnjs01477@gmail.com>
2025-02-24 15:05:55 -07:00
Josh Cummings 43ddf73ddb
Polish Exception Message
This error message provides more context around which credentials failed.

Issue gh-16494
2025-02-20 13:31:59 -07:00
Max Batischev 08f71461b4 Add Support BadCredentialsException to OneTimeTokenAuthenticationProvider
Closes gh-16494

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-02-20 13:26:11 -07:00
Josh Cummings 6fdfeb3413
Polish Debug Messages
Issue gh-16484
2025-02-14 16:05:42 -07:00
tejas-teju 291162a195 Add debug messages for auth exceptions in ProviderManager
Issue gh-16484

Signed-off-by: tejas-teju <tejas8196@gmail.com>
2025-02-14 16:01:22 -07:00
Tran Ngoc Nhan 5d089f680e Consistently NonNull annotation
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-02-13 16:18:28 -07:00
Josh Cummings 981e3fd779
Merge branch '6.4.x' 2025-02-05 13:59:12 -07:00
Josh Cummings b4c7795699
Support Serialization for Authorization Components
Closes gh-16544
2025-02-05 13:58:32 -07:00
Josh Cummings e63ef3cdc4
Merge branch '6.4.x' 2025-02-03 12:35:53 -07:00
Josh Cummings 47fd6befde
Ensure Serialization Compatibility for AuthenticationException
Issue gh-16286
2025-02-03 12:34:43 -07:00
dae won 6a94a294ea Lazily compose debug message in AbstractUserDetailsAuthenticationProvider
Closes gh-16495

Signed-off-by: dae won <eodnjs01477@gmail.com>
2025-02-03 12:27:49 -07:00
tejas-teju e724ea16a4 Update UsernameNotFoundException message
Closes gh-16497

Signed-off-by: tejas-teju <tejas8196@gmail.com>
2025-01-30 18:25:52 -07:00
Josh Cummings e1a42db845
Merge branch '6.4.x' 2025-01-23 17:03:53 -07:00
Josh Cummings 36716d12ba
Serialization Support of Core Components
Issue gh-16276
2025-01-23 16:50:30 -07:00
Josh Cummings 3e4ba737e7
Don't Support Serialzation of Deprecated Access Classes
Issue gh-16276
2025-01-23 16:46:38 -07:00
Josh Cummings d7921daa13
Support Serialization for SecurityConfig
Issue gh-16276
2025-01-23 16:44:53 -07:00
Max Batischev 474b5e151a Add Support GenerateOneTimeTokenRequestResolver
Closes gh-16291

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-01-22 17:09:55 -06:00
Josh Cummings c2a5709e0f
Merge branch '6.4.x' 2025-01-17 16:09:01 -07:00
Josh Cummings bbe4f87641
Mark Serialization Support for Events
Issue gh-16276
2025-01-17 16:08:31 -07:00
Josh Cummings 9a3bbf8d00
Merge branch '6.4.x' 2025-01-17 14:17:16 -07:00
Josh Cummings 45da5c94b6
Support Serialization in Test Classes
Issue gh-16276
2025-01-17 14:15:30 -07:00
2-say 33ecb443ea Suggest replacing size() == 0 with isEmpty() for collection check
Consider using isEmpty() instead of size() == 0 to improve code readability
and follow modern Java practices.

Signed-off-by: 2-say <dev2say@gmail.com>
2025-01-16 16:27:50 -07:00
Josh Cummings 6019803064
Merge branch '6.4.x' 2025-01-14 18:38:14 -07:00
Josh Cummings 244fd2eb51
Support Serialization in Exceptions
Issue gh-16276
2025-01-14 18:37:53 -07:00
Josh Cummings 0af4cdbf5c
Merge branch '6.4.x' 2025-01-14 17:05:21 -07:00
Josh Cummings 8735368d9e
Don't Support Serialization of Jackson Modules
Issu gh-16276
2025-01-14 17:04:36 -07:00
Rob Winch bb38fd3483 Merge branch '6.4.x'
Closes gh-16409
2025-01-13 17:33:32 -06:00
Toshiaki Maki 5075869418 Fix for JdbcOneTimeTokenService cleanupExpiredTokens failing with PostgreSQL
Closes gh-16344
2025-01-13 17:09:57 -06:00
github-actions[bot] 95ec49a21d Support Meta-Annotation Parameters on Parameter Annotations
Closes gh-16248
2024-12-19 15:14:22 -07:00
Josh Cummings b9f3a28678 Add UserDetailsService Constructor
Closes gh-15973
2024-12-16 17:59:16 -07:00
Josh Cummings b9911fd522
Add serialVersionUID to Authentication classes
Issue gh-16276
2024-12-13 16:41:32 -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
Josh Cummings 69cbe12a7b
Register Authorization Proxied Type
Closes gh-16106
2024-11-15 15:07:37 -07:00
Tran Ngoc Nhan ffed4ea1dc Polish diamond usage 2024-10-25 13:42:33 -07:00
Max Batischev 9cb81f8ad5 Polish JdbcOneTimeTokenService 2024-10-25 13:26:52 -07:00
Josh Cummings 981fbd5c2c Polish Tests
Closes gh-14768
2024-10-24 20:51:34 -07:00
Max Batischev ec13b8db4b Add @FunctionalInterface to AuthorizationEventPublisher 2024-10-23 12:45:00 -07:00
Josh Cummings 95aaf3566f Use Thread-safe Map
Closes gh-15906
2024-10-22 16:16:17 -07:00
Steve Riesenberg af2b84246b
Fix flaky test
Issue gh-15735
2024-10-18 12:22:08 -05:00
kwonyonghyun b8aa78829c Improve readability of empty collection checks 2024-10-14 12:16:39 -07:00
Tran Ngoc Nhan 31f8caec5f Polish diamond operator usage 2024-10-14 11:51:35 -07:00
Josh Cummings 9ce5a76e8c Polish AuthorizationManager#authorize
Issue gh-14843
2024-10-14 11:48:57 -07:00
Max Batischev e7644925f8 Add AuthorizationResult support for AuthorizationManager
Closes gh-14843
2024-10-14 11:48:57 -07:00
Josh Cummings 702538ebce AuthorizationEventPublisher Accepts AuthorizationResult
Closes gh-15915

Co-authored-by: Max Batischev <mblancer@mail.ru>
2024-10-14 11:48:57 -07:00
Munawar Hafiz aa7ef1192e Replaces Date().getTime() method with System.currentTimeMillis() 2024-10-10 14:29:25 -05:00
Josh Cummings b26f2af5d5 Polish
Formatting as well as adding a missing defer

Issue gh-15699
2024-10-07 16:39:54 -07:00
Max Batischev 2ca2e56383 Add Reactive One-Time Token Login support
Closes gh-15699
2024-10-07 16:39:54 -07:00
Rob Winch 1dd79c379b Add JdbcOneTimeTokenService
Closes gh-15735
2024-10-02 14:42:13 -05:00
Rob Winch c3a5ae1254 Fix logger checkstyle 2024-10-02 14:39:58 -05:00
Rob Winch 7738e6c895 Add logger.isDebugEnabled()
Issue gh-15735
2024-10-02 14:24:23 -05:00
Rob Winch c4b60cd080 Reduce visibility for JdbcOneTimeTokenServiceTests
Issue gh-15735
2024-10-02 14:24:23 -05:00
Rob Winch 650ec3ba82 Use Duration for calculating validity
This improves readability.

Issue gh-15735
2024-10-02 14:24:23 -05:00
Rob Winch e8c71df899 Use private Inner JdbcOneTimeTokenService classes
Issue gh-15735
2024-10-02 14:24:23 -05:00
Rob Winch 612b15abcc JdbcOneTimeTokenService.setCleanupCron
Spring Security uses setter methods for optional member variables. Allows
for a null cleanupCron to disable the cleanup.

In a clustered environment it is likely that users do not want all nodes
to be performing a cleanup because it will cause contention on the ott
table.

Another example is if a user wants to invoke cleanUpExpiredTokens with a
different strategy all together, they might want to disable the cron job.

Issue gh-15735
2024-10-02 14:22:25 -05:00
Rob Winch 4787ac254d cleanUpExpiredTokens->cleanupExpiredTokens
Issue gh-15735
2024-10-02 10:59:26 -05:00
Rob Winch 4f328c9503 destroy() shuts down the taskScheduler
Issue gh-15735
2024-10-02 10:59:21 -05:00
Max Batischev 0c216f0b59 Add public to setClock method in InMemoryOneTimeTokenService
Closes gh-15863
2024-09-30 15:33:33 -05:00
Max Batischev 50cc36d53e Add support JdbcOneTimeTokenService
Closes gh-15735
2024-09-29 00:06:10 +03:00
DingHao 68d814e042 Polish ExpressionTemplateSecurityAnnotationScanner 2024-09-23 16:05:22 -07:00
Jonny Coddington b90851d968 Improve Error Messages for PasswordEncoder
Closes gh-14880

Signed-off-by: Jonny Coddington <bottlerocketjonny@protonmail.com>
2024-09-17 14:16:08 -07:00
Josh Cummings 1760e7fac8 Cache Annotation Lookups
Closes gh-15799
2024-09-15 21:30:55 -07:00
Josh Cummings d194724a04 Skip Proxying If Already Proxied
Issue gh-15709
2024-09-15 21:30:55 -07:00
Josh Cummings 6f5e103dec Use AnnotationTemplateExpressionDefaults in Reactive
Issue gh-15097
2024-09-15 21:30:55 -07:00
Marcus Hert Da Coregio 0618d4e03f Provide Runtime Hints for Beans used in Pre/PostAuthorize Expressions
Closes gh-14652
2024-09-13 08:42:14 -03:00
Josh Cummings fd5d03d384 Add AuthorizeReturnObject Hints
Closes gh-15709
2024-09-10 11:57:31 -07:00
Josh Cummings da38b13a17 Add SecurityHintsRegistrar
An interface for registering hints based on Security infrastructure
beans.

Closes gh-15772
2024-09-10 11:57:31 -07:00
Josh Cummings 927de0d3b8
Use AuthorizationProxy Interface for Class Proxying
Issue gh-15747
2024-09-10 07:58:21 -06:00
Marcus Hert Da Coregio 2ff29dc229 Throw AuthorizationDeniedException when AuthorizationResult is available
Closes gh-15706
2024-09-10 09:14:50 -03:00
Josh Cummings fce2eb1531
Add AuthorizationProxy Interface
Closes gh-15747
2024-09-09 15:39:03 -06:00
Marcus Hert Da Coregio 4855287743 Merge branch '6.3.x'
Closes gh-15768
2024-09-09 08:54:14 -03:00
Marcus Hert Da Coregio aeae740926 Merge branch '6.2.x' into 6.3.x
Closes gh-15767
2024-09-09 08:54:00 -03:00
Marcus Hert Da Coregio a268b78473 Merge branch '5.8.x' into 6.2.x
Closes gh-15766
2024-09-09 08:53:39 -03:00
Marcus Hert Da Coregio a0e6c17512 Do not log exception if CasJackson2Module is not present
Closes gh-15749
2024-09-09 08:32:40 -03:00
Josh Cummings c0a10b90ba
Merge remote-tracking branch 'origin/6.3.x' 2024-09-04 14:48:23 -06:00
DingHao 5c20505b0e Support Class Attributes in Annotation Template Processing
Closes gh-15721
2024-09-04 13:41:46 -07:00
Josh Cummings c53ee19a83 Polish Abstract Deserializer 2024-09-04 07:55:09 -07:00
hyunmin0317 fee79ccb51 Abstract Jackson2 Set and List Deserializers 2024-09-04 07:55:09 -07:00
Niels Basjes 2dc787a573 Fix adding more implied roles in the RoleHierarchy Builder.
Closes gh-15717

Signed-off-by: Niels Basjes <niels@basjes.nl>
2024-09-04 10:28:50 -03:00
Marcus Hert Da Coregio 00e4a8fb54 Add support for One-Time Token Login
Closes gh-15114
2024-09-03 10:07:56 -03:00
DingHao fd05c5ad76 Remove Advised Methods from Authorization Proxy Objects
Closes gh-15561
2024-08-30 10:40:25 -07:00
Josh Cummings 626610a975
Polish Annotation API
Rename to a class that isn't focused on the synthesis implementation detail.
Also add Security to the front of the name to clarify that it is only intended
for security annotations, reminiscent of SecurityMetadataSource.

Refine method signatures to better articulate supported use cases.

Issue gh-15286
2024-08-30 08:51:49 -06:00
Josh Cummings cc6de8fa5d
Hide MergedAnnotation Implementation Details
Issue gh-15286
2024-08-29 17:27:14 -06:00
DingHao 84fc5a70ee Fix variable targetClassToUse not used
Closes gh-15567
2024-08-26 15:49:22 -07:00
Josh Cummings 1118b0ec63
Defer Sorting AuthorizationAdvisors in addAdvisor
Issue gh-15658
2024-08-20 17:23:10 -06:00
Josh Cummings 4da13f6091
Merge branch '6.3.x' 2024-08-20 16:47:48 -06:00
Josh Cummings 0cab7c8f15
Defer Sorting AuthorizationAdvisors
Invoking AnnotationAwareOrderComparator#sort while the
AuthorizationAdvisors are still being computed causes those
advisors to be eagerly instantiated, making components
like ObservationRegistry ineligible for post processing.

This commit defers the sorting of the advisors until
after they are all fully instantiated and available in
the application context.

Closes gh-15658
2024-08-20 16:47:29 -06:00
Josh Cummings f398be793d
Simplify AuthorizationAdvisorProxyFactory Configuration
Closes gh-15497
2024-08-19 12:34:38 -06:00
Marcus Hert Da Coregio 912062d307 Merge branch '6.2.x' into 6.3.x 2024-08-19 09:11:10 -03:00
Daniel Garnier-Moiroux 79fb0113c8 Bump io-spring-javaformat from 0.0.42 to 0.0.43
Bumps `io-spring-javaformat` from 0.0.42 to 0.0.43.

Updates `io.spring.javaformat:spring-javaformat-checkstyle` from 0.0.42 to 0.0.43
- [Release notes](https://github.com/spring-io/spring-javaformat/releases)
- [Commits](spring-io/spring-javaformat@v0.0.42...v0.0.43)

Updates `io.spring.javaformat:spring-javaformat-gradle-plugin` from 0.0.42 to 0.0.43
- [Release notes](https://github.com/spring-io/spring-javaformat/releases)
- [Commits](spring-io/spring-javaformat@v0.0.42...v0.0.43)

---
updated-dependencies:
- dependency-name: io.spring.javaformat:spring-javaformat-checkstyle
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.spring.javaformat:spring-javaformat-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

---
Manual updates:
- Adhere to rule where `@Deprecated` annotations and `@deprecated` javadoc comments MUST
  be used together

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 09:11:05 -03:00
Daniel Garnier-Moiroux 2caf1fb6b4 Bump io-spring-javaformat from 0.0.42 to 0.0.43
Bumps `io-spring-javaformat` from 0.0.42 to 0.0.43.

Updates `io.spring.javaformat:spring-javaformat-checkstyle` from 0.0.42 to 0.0.43
- [Release notes](https://github.com/spring-io/spring-javaformat/releases)
- [Commits](spring-io/spring-javaformat@v0.0.42...v0.0.43)

Updates `io.spring.javaformat:spring-javaformat-gradle-plugin` from 0.0.42 to 0.0.43
- [Release notes](https://github.com/spring-io/spring-javaformat/releases)
- [Commits](spring-io/spring-javaformat@v0.0.42...v0.0.43)

---
updated-dependencies:
- dependency-name: io.spring.javaformat:spring-javaformat-checkstyle
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.spring.javaformat:spring-javaformat-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

---
Manual updates:
- Adhere to rule where `@Deprecated` annotations and `@deprecated` javadoc comments MUST
  be used together

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 09:08:24 -03:00
Rob Winch 13125d0745 Add AuthorizationDeniedException(String)
Closes gh-15607
2024-08-14 13:57:07 -05:00
Josh Cummings 59ec1f6480
Revert "Polish AuthorizationAdvisorProxyFactory advisor configuration"
This commit had some unintended consequences when the advisor
interceptor was published in a Spring Boot application. As such,
15497 will be reopened to investigate. In the meantime, this commit
reverts the previous change so as to allow the build to pass.

Issue gh-15497
2024-08-12 10:12:14 -06:00
Josh Cummings 08b8b09066
Update Copyright
Issue gh-15286
2024-08-10 11:48:14 -06:00
Josh Cummings e40c98e6d7 Deprecate PrePostTemplateDefaults
Since there is nothing specific to configuring pre/post
annotations, there is no need for the extra class.

If a need like this does arise in the future,
either AnnotationTemplateExpressionDefaults can be sub-
classed, or it can have introduced a Map field holding
custom properties.

Issue gh-15286
2024-08-10 11:46:51 -06:00
MrJovanovic13 6d657ea3da InMemoryUserDetailsManager preserve user type
Closes gh-3192
2024-08-09 10:09:41 -06:00
MrJovanovic13 503d653cea Add InMemoryUserDetailsManager tests
Tests added:
createUserWhenUserAlreadyExistsThenException
updateUserWhenUserDoesNotExistThenException
loadUserByUsernameWhenUserNullThenException

Issue gh-3192
2024-08-09 10:09:41 -06:00
Josh Cummings 34d964eb08
Default Handler Resolution to Reflection-Based
Closes gh-15496
2024-08-07 14:50:33 -06:00
Josh Cummings de77e054fd
Default Handler Resolution to Reflection-Based
Closes gh-15496
2024-08-07 14:34:40 -06:00
Josh Cummings 02cca6f737
Polish AuthorizationAdvisorProxyFactory advisor configuration
Closes gh-15497
2024-08-07 10:09:51 -06:00
Josh Cummings 37a2812d1a
Mimic Annotation Fallback Logic
For backward compatibility, this commit changes the annotation traversal
logic to match what is found in PrePostAnnotationSecurityMetadataSource.

This reverts gh-13783 which is a feature that unfortunately regressess
pre-existing behavior like that found in gh-15352. As such, that
functionality has been removed.

Issue gh-15352
2024-07-31 16:17:42 -06:00
Josh Cummings 77bce14462
Polish Annotation Test
This new arrangement of the test better matches the class
hierarchy described by the original ticket.

Issue gh-13234
2024-07-31 16:17:42 -06:00
Josh Cummings 90335bd0a6
Polish Annotation Test
This test was made more effective by having it focus on the real
scenario of resolving annotations from the standpoint of a bean
2024-07-31 16:17:42 -06:00
Josh Cummings f20ae1a71c
Revert gh-13783
This feature unfortunately regresses pre-existing behavior
like that found in gh-15352. As such, this functionality
has been removed.

Closes gh-15352
2024-07-31 16:16:34 -06:00
KyeongHoon Lee 4036e910c7 Add @FunctionalInterface to AuthenticationManager 2024-07-18 17:25:44 -07:00
Josh Cummings c736e075c1
Add AnnotationSythesizer API
Closes gh-13234
Closes gh-13490
Closes gh-15097
2024-07-18 09:55:17 -06:00
Josh Cummings e3438aa36a
Support AliasFor
Closes gh-15436
2024-07-18 09:46:39 -06:00
Josh Cummings 03bcc6776a
Correct Authorization Tests
Issue gh-9289
2024-07-18 09:46:38 -06:00
Josh Cummings 56c93afc66
Correct Tests About Conflicting Annotations
Issue gh-9289
2024-07-18 09:46:38 -06:00
Juliana Hachmann 9a714424d5 Adds missing translated messages for PT-BR
Partially fix #spring-projectsgh-9315

Adds Brazilian Portuguese translation missing for following messages in messages_pt_BR.properties;
- ExceptionTranslationFilter.insufficientAuthentication 
- LdapAuthenticationProvider.badLdapConnection
- PersistentTokenBasedRememberMeServices.cookieStolen
2024-05-31 12:36:52 -06:00
Josh Cummings aa9bf83c6d
Polish Exception Handling
Issue gh-15093
2024-05-31 12:34:33 -06:00