Commit Graph

2984 Commits

Author SHA1 Message Date
Josh Cummings 52dfbfb5b3 Add Authorization Proxy Support
Closes gh-14596
2024-03-13 14:35:07 -06:00
Marcus Hert Da Coregio d17cbf4342 Merge branch '6.2.x'
Closes gh-14724
2024-03-12 10:19:05 -03:00
Marcus Hert Da Coregio 940efe76fc Merge branch '6.1.x' into 6.2.x
Closes gh-14723
2024-03-12 10:18:51 -03:00
Marcus Hert Da Coregio 8fe0303bad Merge branch '5.8.x' into 6.1.x
Closes gh-14722
2024-03-12 10:18:33 -03:00
Marcus Hert Da Coregio 8f42c86a57 Use AuthorizationInterceptorsOrder for Post Authorize Method Interceptors
Closes gh-14720
2024-03-12 10:17:45 -03:00
Josh Cummings c5a4405c54 Polish JavaDoc
Issue gh-14521
2024-02-26 10:59:54 -07:00
ruabtmh 09010f3f51 Add ContinueOnError Support For Failed Authentications
Closes gh-14521
2024-02-26 10:59:54 -07:00
Josh Cummings 4d383023cb Add meta-annotation parameter support
Closes gh-14480
2024-02-26 10:50:35 -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 915d68e216 Remove includeExpiredSessions parameter
The reactive implementation of max sessions does not keep track of expired sessions, therefore we do not need such parameter

Issue gh-6192
2024-02-06 10:43:00 -03:00
DingHao b0da37d4fa Have Method Security Start at Target Class
Closes gh-13783
2024-02-01 09:33:25 -07:00
Sam Brannen 2b7d296994 Revise AuthorizationAnnotationUtils
This commit revises AuthorizationAnnotationUtils as follows.

- Removes code duplication by treating both Class and Method as
  AnnotatedElement.

- Avoids duplicated annotation searches by processing merged
  annotations in a single Stream instead of first using the
  MergedAnnotations API to find possible duplicates and then again
  searching for a single annotation via AnnotationUtils (which
  effectively performs the same search using the MergedAnnotations API
  internally).

- Uses `.distinct()` within the Stream to avoid the need for the
  workaround introduced in gh-13625. Note that the semantics here
  result in duplicate "equivalent" annotations being ignored. In other
  words, if @⁠PreAuthorize("hasRole('someRole')") is present multiple
  times as a meta-annotation, no exception will be thrown and the first
  such annotation found will be used.

- Improves the error message when competing annotations are found by
  including the competing annotations in the error message.

- Updates AuthorizationAnnotationUtilsTests to cover all known,
  supported use cases.

- Configures correct role in @⁠RequireUserRole.

Please note this commit uses
`.map(MergedAnnotation::withNonMergedAttributes)` to retain backward
compatibility with previous versions of Spring Security. However, that
line can be deleted if the Spring Security team decides that it wishes
to support merged annotation attributes via custom composed
annotations. If that decision is made, the
composedMergedAnnotationsAreNotSupported() test should be renamed and
updated as explained in the comment in that method.

See gh-13625
See https://github.com/spring-projects/spring-framework/issues/31803
2024-01-18 07:42:58 -07:00
Marcus Hert Da Coregio 85177c0178 Merge branch '6.2.x'
Closes gh-14408
2024-01-05 14:22:49 -03:00
Steve Riesenberg a32cd66179
Polish gh-14263 2023-12-26 11:56:42 -06:00
Federico Herrera 10e0f98d5e
Add doc and javadoc for CachingUserDetailsService
Close gh-10914
2023-12-26 10:57:58 -06:00
Taehong Kim ec02c22459 Add Request Path Extraction Support
Closes gh-13256
2023-12-19 18:15:49 -07:00
Angel Aguilera 13ad66807e Update messages_es_ES.properties
Uncomment and translate message property.
2023-12-14 10:24:19 -06:00
Josh Cummings db7c5d128b
Fix Typos
Closes gh-14268
2023-12-11 11:34:52 -07:00
ahmd-nabil dfef781e33 Add default implementation in UserDetails
Closes gh-14275

Signed-off-by: ahmd-nabil <ahm3dnabil99@gmail.com>
2023-12-11 11:00:57 -07:00
Marcus Da Coregio 57ab15127a Add Max Sessions on WebFlux
Closes gh-6192
2023-12-11 09:48:34 -03:00
Josh Cummings 4a50d5aab3
Merge branch '6.2.x' 2023-12-09 11:52:31 -07:00
Josh Cummings 6e636e6abb
Merge branch '6.1.x' into 6.2.x
Closes gh-14267
2023-12-09 11:50:58 -07:00
Josh Cummings 9f90661b6f
Merge branch '5.8.x' into 6.1.x
Closes gh-14266
2023-12-09 11:43:04 -07:00
Josh Cummings be11812fe4
Account for Super-super-interface Inheritance
Closes gh-13625
2023-12-09 11:41:02 -07:00
Josh Cummings 92be497d24 Polish RoleHierachyImpl#of
- Change to #fromHierarchy to match naming convention
- Keep existing test methods the same
- Deprecate setHierarchy and default constructor
- Add private Map constructor
- Change Adjust RoleHierarchyBuilder to use Map constructor

Issue gh-13788
2023-12-08 11:49:50 -07:00
Toshiaki Maki c1b3351569 Add RoleHierarchyImpl#of
Closes gh-13788
2023-12-08 11:49:50 -07:00
Josh Cummings bb6b55aca3 Add Not Support
Closes gh-14058
2023-12-07 16:24:19 -07:00
Yuriy Savchenko e49ae096e6 Add AuthorizationManager factory methods
Factory methods to create AuthorizationManager with a configurable default AuthorizationDecision.

Closes gh-13085
2023-12-07 15:20:08 -07:00
Josh Cummings ee8bc78cbc Polish RoleHierarchyImpl#Builder
- Added documentation
- Removed withNoRolePrefix for now; let's see how folks
use the minimal API first
- Adjusted class hierarchy to match AuthorizeHttpRequests more
closely
- Adjusted to match Spring Security style guide
- Added needed @since attributes

Issue gh-13300
2023-12-07 15:18:13 -07:00
Federico Herrera 7d366242ce Add RoleHierarchyImpl.Builder
Closes gh-13300
2023-12-07 15:18:13 -07:00
Angel Aguilera 1ce1ff92de Update messages_ca.properties
Add translation for new message properties
2023-12-07 15:28:06 -06:00
Josh Cummings d50698a269
Prepare for Spring Security 6.3
Closes gh-14210
2023-12-05 15:49:42 -07:00
YangSiJun528 3f6b6aa523 Update Javadoc for getAuthorizationDecision method
Added missing description for `@return` tag.
2023-11-21 10:07:42 -03:00
Marcus Hert Da Coregio e3ab1c94d7 Use assertj assertions 2023-11-17 09:04:50 -03:00
Marcus Hert Da Coregio a7da9491d9 Use assertj assertions 2023-11-17 09:03:36 -03:00
Josh Cummings 97516727a4
Add Coroutine Support
Closes gh-12080
2023-11-15 11:48:37 -07:00
Josh Cummings 24abf45128
Merge remote-tracking branch 'origin/6.1.x' 2023-11-07 13:13:29 -07:00
Josh Cummings f295e9d28f
Merge branch '6.0.x' into 6.1.x
Closes gh-14111
2023-11-07 13:09:20 -07:00
Josh Cummings bb354f1895
Merge branch '5.8.x' into 6.0.x
Closes gh-14110
2023-11-07 13:07:25 -07:00
Josh Cummings 11a21896dd
Defer SecurityContextHolderStrategy Lookup
Due to how early method interceptors are loaded during startup
it's reasonable to consider scenarios where applications are
changing the global security context holder strategy during
startup.

Closes gh-12877
2023-11-07 12:36:16 -07:00
Marcus Hert Da Coregio 6e0fb2fc96 Merge branch '6.1.x' 2023-11-06 15:03:06 -03:00
Marcus Hert Da Coregio 99c84aa935 Merge branch '6.0.x' into 6.1.x 2023-11-06 15:02:09 -03:00
Marcus Hert Da Coregio 3893136084 Remove Gradle deprecations
Stop using JavaPluginConvention type and replace outputFile with destinationFile

Issue gh-13864
2023-11-06 15:01:38 -03:00
Steve Riesenberg d0a5ada2da
Fix formatting 2023-10-31 15:38:44 -05: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
Martin Lukas 1589d19c8b Fix typos in spring-security core module 2023-10-31 09:48:43 -03:00
valery1707 cc86afe658 Use same case for all fields in toString 2023-10-16 14:42:53 -06:00