Commit Graph

1073 Commits

Author SHA1 Message Date
Marcus Da Coregio
af3d70f130 Remove GlobalMethodSecurityRuntimeHints
Closes gh-11714
2022-08-17 08:07:28 -03:00
Evgeniy Cheban
ba50c50b4b Add remaining methods from ExpressionUrlAuthorizationConfigurer to MessageMatcherDelegatingAuthorizationManager
- Added fullyAuthenticated
- Added rememberMe
- Added anonymous

Closes gh-11509
2022-08-16 15:14:08 -06:00
Evgeniy Cheban
5ecd513a57 Add remaining methods from ExpressionUrlAuthorizationConfigurer to MessageMatcherDelegatingAuthorizationManager
- Added fullyAuthenticated
- Added rememberMe
- Added anonymous

Closes gh-11509
2022-08-16 15:12:47 -06:00
Rob Winch
8ad20b1768 Add CsrfFilter.csrfRequestAttributeName
Previously the CsrfToken was set on the request attribute with the name
equal to CsrfToken.getParameterName(). This didn't really make a lot of
sense because the CsrfToken.getParameterName() is intended to be used as
the HTTP parameter that the CSRF token was provided. What's more is it
meant that the CsrfToken needed to be read for every request to place it
as an HttpServletRequestAttribute. This causes unnecessary HttpSession
access which can decrease performance for applications.

This commit allows setting CsrfFilter.csrfReqeustAttributeName to
remove the dual purposing of CsrfToken.parameterName and to allow deferal
of reading the CsrfToken to prevent unnecessary HttpSession access.

Issue gh-11699
2022-08-16 13:47:31 -05:00
Rob Winch
5b64526ba9 Add CsrfFilter.csrfRequestAttributeName
Previously the CsrfToken was set on the request attribute with the name
equal to CsrfToken.getParameterName(). This didn't really make a lot of
sense because the CsrfToken.getParameterName() is intended to be used as
the HTTP parameter that the CSRF token was provided. What's more is it
meant that the CsrfToken needed to be read for every request to place it
as an HttpServletRequestAttribute. This causes unnecessary HttpSession
access which can decrease performance for applications.

This commit allows setting CsrfFilter.csrfReqeustAttributeName to
remove the dual purposing of CsrfToken.parameterName and to allow deferal
of reading the CsrfToken to prevent unnecessary HttpSession access.

Issue gh-11699
2022-08-15 17:07:02 -05:00
Rob Winch
425b3501b7 Remove @Configuration from @Enable* Annotations
This removes `@Configuration` from all `@Enable` Annotations and explicitly
adds `@Configuration` to wherever the `@Enable*` Annotations are used.

Closes gh-11653
2022-08-09 17:00:24 -05:00
Rob Winch
a5069d7e35 Fix Add @Configuration to @Enable*Security Usage
Issue gh-6613
2022-08-09 17:00:16 -05:00
Igor Bolic
2e66b9f6cc Allow customization of redirect strategy
The default redirect strategy will provide authorization redirect
URI within HTTP 302 response Location header.
Allowing the configuration of custom redirect strategy will provide
an option for the clients to obtain the authorization URI from e.g.
HTTP response body as JSON payload, without a need to handle
automatic redirection initiated by the HTTP Location header.

Closes gh-11373
2022-08-08 15:44:01 -05:00
Igor Bolic
efaee4e56b Allow customization of redirect strategy
The default redirect strategy will provide authorization redirect
URI within HTTP 302 response Location header.
Allowing the configuration of custom redirect strategy will provide
an option for the clients to obtain the authorization URI from e.g.
HTTP response body as JSON payload, without a need to handle
automatic redirection initiated by the HTTP Location header.

Closes gh-11373
2022-08-08 15:35:49 -05:00
Josh Cummings
ed58ac7d78 Add Conditions to Generating AuthnRequest
Closes gh-11657
2022-08-03 17:49:48 -06:00
Josh Cummings
9e8a04d414 Polish Tests
Issue gh-11657
2022-08-03 17:49:46 -06:00
Josh Cummings
c2d79fcbd6 Add Conditions to Generating AuthnRequest
Closes gh-11657
2022-08-03 17:34:31 -06:00
Josh Cummings
aa225943d2 Polish Tests
Issue gh-11657
2022-08-03 17:34:26 -06:00
Joshua Sattler
040111ae9e Remove Configuration meta-annotation from Enable* annotations
Before, Spring Security's @Enable* annotations were meta-annotated with @Configuration.
While convenient, this is not consistent with the rest of the Spring projects and most notably
Spring Framework's @Enable annotations. Additionally, the introduction of support for
@Configuration(proxyBeanMethods=false) in Spring Framework provides a compelling reason to
remove @Configuration meta-annotation from Spring Security's @Enable annotations and allow
users to opt into their preferred configuration mode.

Closes gh-6613

Signed-off-by: Joshua Sattler <joshua.sattler@mailbox.org>
2022-07-30 03:48:42 +02:00
Josh Cummings
d27322c9e0 Polish HttpSecurity Formatting
Issue gh-11360
2022-07-14 13:00:08 -06:00
Evgeniy Cheban
c4b0e9bd74 Add remaining methods from ExpressionUrlAuthorizationConfigurer to AuthorizeHttpRequestsConfigurer
- Added fullyAuthenticated
- Added rememberMe
- Added anonymous

Closes gh-11360
2022-07-14 13:00:07 -06:00
Josh Cummings
5dff157755 Polish HttpSecurity Formatting
Issue gh-11360
2022-07-14 12:50:40 -06:00
Evgeniy Cheban
400cd60368 Add remaining methods from ExpressionUrlAuthorizationConfigurer to AuthorizeHttpRequestsConfigurer
- Added fullyAuthenticated
- Added rememberMe
- Added anonymous

Closes gh-11360
2022-07-14 12:48:39 -06:00
Josh Cummings
35fc437559 Add AuthorizationManager for protect-pointcut
Closes gh-11323
2022-07-14 09:25:49 -06:00
Josh Cummings
624fdfa731 Add AuthorizationManager for protect-pointcut
Closes gh-11323
2022-07-13 17:58:16 -06:00
Marcus Da Coregio
7abea4a964 Add RuntimeHints suffix for RuntimeHintsRegistrar
Closes gh-11497
2022-07-13 10:14:43 -03:00
Joe Grandja
177baba8c9 RuntimeHintsPredicates moved to predicate package 2022-07-12 16:00:50 -04:00
Marcus Da Coregio
6455e98745 FilterSecurityInterceptor applies to every request by default
Closes gh-11466
2022-07-12 10:53:03 -03:00
Rob Winch
d2d5313bba Fix Formatting
Issue gh-11327
2022-07-08 09:21:53 -05:00
Josh Cummings
c9a3d21b9b Add Configuration Test
Issue gh-11327
2022-07-07 14:46:37 -06:00
Josh Cummings
e8a7b654b4 Add Configuration Test
Issue gh-11327
2022-07-07 14:42:07 -06:00
Josh Cummings
01ffc93062 Add AuthorizationFilter to filter chain validator
Closes gh-11327
2022-07-07 14:40:53 -06:00
Josh Cummings
ec8c13392c Clarify variable names
Issue gh-11327
2022-07-07 14:26:40 -06:00
Josh Cummings
d27d431bbc Add AuthorizationFilter to filter chain validator
Closes gh-11327
2022-07-07 13:52:36 -06:00
Josh Cummings
cdafa4ee21 Clarify variable names
Issue gh-11327
2022-07-07 13:38:42 -06:00
Josh Cummings
148c926de0 Support AuthorizationManager for intercept-methods Element
Closes gh-11328
2022-07-06 13:01:57 -06:00
Josh Cummings
74a007dc91 Support AuthorizationManager for intercept-methods Element
Closes gh-11328
2022-07-06 12:54:05 -06:00
Igor Bolic
d96b4a0463 Set the useTrailingSlashMatch to true for tests
The Spring MVC changed the default behavior for trailing slash match
with https://github.com/spring-projects/spring-framework/issues/28552.
This causes failures in Spring Security's tests.

Setting the `useTrailingSlashMatch` to `true` ensures that Spring
Security will work for users who have modified the default configuration.
Specifing the request mapper with trailing slash path ensures that the tests
are successful when default behavior is used.

Closes gh-11451
2022-07-05 11:29:36 -06:00
Josh Cummings
d24a89ad53 Pick up SecurityContextHolderStrategy for WebClient integration
Issue gh-11061
2022-06-28 15:07:16 -06:00
Josh Cummings
e8723f1f43 Pick up SecurityContextHolderStrategy for WebClient integration
Issue gh-11061
2022-06-28 14:58:53 -06:00
Josh Cummings
a218d3e140 Use SecurityContextHolderStrategy for Async Requests
Issue gh-11060
Issue gh-11061
2022-06-28 14:56:55 -06:00
Josh Cummings
27de315e5e Use SecurityContextHolderStrategy for Async Requests
Issue gh-11060
Issue gh-11061
2022-06-28 14:46:52 -06:00
Josh Cummings
83b3bb3209 Add SecurityContextHolderStrategy to Pre-authenticated scenarios
Issue gh-11060
Issue gh-11061
2022-06-28 12:10:07 -06:00
Josh Cummings
98995f2225 Add SecurityContextHolderStrategy to Pre-authenticated scenarios
Issue gh-11060
Issue gh-11061
2022-06-28 12:04:37 -06:00
Josh Cummings
944f565c16 Use SecurityContextHolderStrategy for Remember-me
Issue gh-11060
Isuse gh-11061
2022-06-28 11:09:38 -06:00
Josh Cummings
4a2d77d3f2 Use SecurityContextHolderStrategy for Remember-me
Issue gh-11060
Isuse gh-11061
2022-06-28 11:08:57 -06:00
Josh Cummings
bffe08465a Add SecurityContextHolderStrategy XML Configuration for Messaging
Issue gh-11061
2022-06-27 16:24:27 -06:00
Josh Cummings
484f35ca39 Add SecurityContextHolderStrategy Java Configuration for Messaging
Issue gh-11061
2022-06-27 16:17:29 -06:00
Josh Cummings
74167d62b1 Add SecurityContextHolderStrategy XML Configuration for Messaging
Issue gh-11061
2022-06-27 15:55:28 -06:00
Josh Cummings
9292a13146 Add SecurityContextHolderStrategy Java Configuration for Messaging
Issue gh-11061
2022-06-27 15:55:28 -06:00
Josh Cummings
5e4e7abf15 Add SecurityContextHolderStrategy XML Configuration for Method Security
Issue gh-11061
2022-06-27 13:40:55 -06:00
Josh Cummings
74d646f569 Add SecurityContextHolderStrategy Java Configuration for Method Security
Issue gh-11061
2022-06-27 13:17:46 -06:00
Josh Cummings
ef29d3944e Polish SecurityContextHolderStrategy Java Configuration for Defaults
Issue gh-11061
2022-06-27 13:17:44 -06:00
Josh Cummings
652c35db2f Add SecurityContextHolderStrategy XML Configuration for OAuth2
Issue gh-11061
2022-06-27 13:05:13 -06:00
Josh Cummings
1d22316574 Add SecurityContextHolderStrategy Java Configuration for OAuth2
Issue gh-11061
2022-06-27 13:05:13 -06:00