Commit Graph

3226 Commits

Author SHA1 Message Date
Rob Winch 751b5580a1
TestOneTimeTokenGenerationSuccessHandler.lastToken to non-static variable
Previously there were race conditions on the static member lastToken of
TestOneTimeTokenGenerationSuccessHandler. This is because the tests run in
parallel and one test may override the other tests lastToken and thus
make the assertion on it incorrect.

This commit changes lastToken to be a non-static variable to ensure that
each test has it's own lastToken for asserting the expected value.

Closes gh-16471
2025-01-23 12:43:22 -06:00
Steve Riesenberg 4f860a5481
Merge branch '6.4.x'
# Conflicts:
#	config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurer.java
2025-01-22 17:30:29 -06: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
Steve Riesenberg d97e01d1de
Merge branch '6.3.x' into 6.4.x
Closes gh-16466
2025-01-22 17:09:34 -06:00
Steve Riesenberg 211fa52649
Favor provided instances over shared objects
Prior to this commit, providing oauth2Login() and oauth2Client() with
clientRegistrationRepository() and authorizedClientRepository() caused
objects to be shared across both configurers.

These configurers will now prefer explicitly provided instances of
those objects when they are available.

Closes gh-16105
2025-01-22 17:07:44 -06:00
Rob Winch 68c8a5ad99
Remove debug test
Issue gh-16443
2025-01-22 16:11:25 -06:00
Rob Winch 6149489b70
Merge branch '6.4.x'
fix flakey test in WebAuthnWebDriverTests

Closes gh-16464
2025-01-22 14:46:05 -06:00
Daniel Garnier-Moiroux 028c212be4
fix flakey test in WebAuthnWebDriverTests
Closes gh-16463

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
2025-01-22 14:45:44 -06:00
Rob Winch 4ee9358900
Add serializeAndDeserializeAreEqual
Checks that serialization/deserialization can be performed.

Issue gh-16443
2025-01-22 14:06:11 -06:00
Tran Ngoc Nhan e5ea75f7f4 Implement Serial
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-01-21 18:14:52 -06:00
Rob Winch a2abe3c33e
Add HttpMessageConverter WebAuthnDsl Support
Issue gh-16397
2025-01-17 21:07:46 -06:00
Rob Winch 4314e68329
Add WebAuthenticationDsl.creationOptionsRepository
Issue gh-16396
2025-01-17 20:51:43 -06:00
Rob Winch bea232237f
Fix whitespace 2025-01-17 20:51:43 -06:00
DingHao f4491f388e
Set PublicKeyCredentialCreationOptionsRepository by DSL or Bean
Closes gh-16369

Signed-off-by: DingHao <dh.hiekn@gmail.com>
2025-01-17 18:57:08 -06:00
Rob Winch 5462b4c358
webauthnWhenConfiguredMessageConverter uses mock
Issue gh-16397
2025-01-17 18:29:23 -06:00
Rob Winch 0d4f786484
Fix WebAuthnConfigurer Javadoc
Issue gh-16397
2025-01-17 18:29:23 -06:00
DingHao 8181cec06c
Set HttpMessageConverter by DSL
Closes gh-16369

Signed-off-by: DingHao <dh.hiekn@gmail.com>
2025-01-17 18:29:23 -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
Max Batischev 17fb4d1c0d Fixed typo in WebAuthnDsl
Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-01-16 14:33:57 -07:00
Josh Cummings 443af32314
Move Servlet Mocks to Web
Issue gh-13551
2025-01-15 17:32:58 -07:00
Josh Cummings 8827b2e564
Polish Using Request ServletContext
Issue gh-14418
2025-01-15 17:27:08 -07:00
Josh Cummings 75a35793dc
Polish requestMatchers Logic
Issue gh-13551
2025-01-15 17:27:00 -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 8035815e56
Merge branch '6.4.x' 2025-01-14 16:29:06 -07:00
Josh Cummings feea103050
Formatting
Issue gh-16276
2025-01-14 16:28:53 -07:00
Josh Cummings 28644aa966
Merge branch '6.4.x' 2025-01-14 16:17:34 -07:00
Josh Cummings 6f379aa907
Add Serializable to Csrf Components
Issue gh-16276
2025-01-14 16:07:20 -07:00
Max Batischev 7fae738a9b Add support fullyAuthenticated to Kotlin DSL
Closes gh-16162
2025-01-13 17:03:14 -07:00
Rob Winch 85b854c61c Merge branch '6.4.x'
- Fix Kotlin DSL webAuthn { }
- Add Support disableDefaultRegistrationPage to WebAuthnDsl

Closes gh-16403
Closes gh-16404
2025-01-12 22:17:10 -06:00
Max Batischev decf4def95 Add Support disableDefaultRegistrationPage to WebAuthnDsl
Closes gh-16395

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-01-12 22:16:55 -06:00
Max Batischev 882766e54f Fix Kotlin webAuthn {}
Fixes the default configuration for WebAuthn Kotlin DSL

Closes gh-16338

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-01-12 22:16:55 -06:00
Max Batischev bf9b95a481 Add Support OAuth2AuthorizationRequestResolver As Bean
Closes gh-16380

Signed-off-by: Max Batischev <mblancer@mail.ru>
2025-01-10 16:25:03 -06:00
Rob Winch 72a2831f76 CustomBeanPostProcessor -> CountHttpSecurityBeanPostProcessor
Issue gh-16370

Signed-off-by: Rob Winch <362503+rwinch@users.noreply.github.com>
2025-01-09 17:23:58 -06:00
DingHao c631afcf5b Avoid unnecessary instantiation of HttpSecurity when a SecurityFilterChain bean is provided
Signed-off-by: DingHao <dh.hiekn@gmail.com>
2025-01-09 17:23:58 -06:00
DingHao 6cfc372f70 Polish remove unused code
Signed-off-by: DingHao <dh.hiekn@gmail.com>
2025-01-09 14:27:22 -06:00
DingHao 5937ba9a06 Polish use getBeanProvider instead of getBeanNamesForType 2025-01-07 13:20:39 -06:00
Josh Cummings 9ae432f0d2 Add Filter Chain Validation Test
Issue gh-15982
2024-12-19 15:04:01 -07:00
Max Batischev 624a8fb252 Add Alerting About Deprecated Authorize Config
Closes gh-16213
2024-12-19 15:04:01 -07:00
Max Batischev e257af8854 Add Support Same Request Matchers Checking
Closes gh-15982
2024-12-19 15:04:01 -07:00
Max Batischev e9bdb5b96e Polish SecurityFilterChain Validation
Issue gh-15982
2024-12-19 15:04:01 -07:00
Josh Cummings fa58ebbc0c
Merge branch '6.4.x' 2024-12-19 08:55:44 -07:00
Josh Cummings 05076db53a
Merge branch '6.3.x' into 6.4.x 2024-12-19 08:55:35 -07:00
Josh Cummings a9f8a23e50
Merge branch '6.2.x' into 6.3.x 2024-12-19 08:55:25 -07:00
Josh Cummings 643a3f1206
Test Setting logoutRequestRepository
Issue gh-16093
2024-12-19 08:55:18 -07:00
Steven Williams 7aafe2ed5a
Set Saml2RelyingPartyInitiatedLogoutSuccessHandler#logoutRequestRepository
Closes gh-16093
2024-12-19 08:53:02 -07:00
Josh Cummings 1104b45832
Polish SessionLimit
- Move to the web.authentication.session package since it is only needed
by web.authentication.session elements and does not access any other web
element itself.
- Add Kotlin support
- Add documentation

Issue gh-16206
2024-12-18 18:32:28 -07:00
Claudenir Machado 1864577e98 Address SessionLimitStrategy
Closes gh-16206
2024-12-18 18:32:12 -07:00
Josh Cummings 3eeb4317f6 Add setFavorRelativeUris
This places the new functionality behind a setting so that
we can remain passive until we can change the setting in
the next major release.

Issue gh-7273
2024-12-17 22:35:41 -07:00
Michal Okosy 7848b959da Use relative URLs in /login redirects
Closes gh-7273
2024-12-17 22:35:41 -07:00
Josh Cummings 25740db819
Merge branch '6.4.x' 2024-12-17 13:10:52 -07:00
Josh Cummings 27c2a8ad11
Add Serializable Compatibility to Web Authentication Exceptions
Issue gh-16276
2024-12-17 13:05:23 -07:00
Josh Cummings d233b70285
Merge branch '6.4.x' 2024-12-17 09:37:01 -07:00
Josh Cummings 841c03fe3b
Add Serializable Compatilibity to Saml 2.0 Exceptions
Issue gh-16276
2024-12-17 09:36:29 -07:00
Josh Cummings b9f3a28678 Add UserDetailsService Constructor
Closes gh-15973
2024-12-16 17:59:16 -07:00
Evgeniy Cheban f45cc22e11 Allow configuring custom ServerHttpHeadersWriter for Kotlin DSL
Closes gh-16009
2024-12-16 17:54:04 -07:00
Josh Cummings a5b0304596
Move AnyRequest Validation
This will make way for other adding other checks

Issue gh-15982
2024-12-13 18:24:57 -07:00
Josh Cummings c1f5eb3192
Merge branch '6.4.x' 2024-12-13 18:24:39 -07:00
Josh Cummings 5ee1586a5a
Remove Unexposed Inner Classes from Serialization Test
The following inner classes are used only internally by a non-Serializable component

Issue gh-16276
2024-12-13 18:18:09 -07:00
Josh Cummings 9d02949fa9
Merge branch '6.4.x' 2024-12-13 16:58:17 -07:00
Josh Cummings 018e1ae1a4
Added Serialization Values
Issue gh-16276
2024-12-13 16:41:32 -07:00
Josh Cummings b9911fd522
Add serialVersionUID to Authentication classes
Issue gh-16276
2024-12-13 16:41:32 -07:00
Josh Cummings 77f76f8465
Merge branch '6.4.x' 2024-12-13 11:53:51 -07:00
Josh Cummings e3cd4339b2
Add Serial Version
Closes gh-16163
2024-12-13 11:53:15 -07:00
Rob Winch a6354e5137 Merge branch '6.4.x'
Closes gh-16283
2024-12-13 10:10:21 -06:00
Daniel Garnier-Moiroux fb954063bf Fix WebAuthnWebdriverTests
Closes gh-16279
2024-12-13 10:08:27 -06:00
Rob Winch 5a81a1fe66 Merge branch '6.4.x' 2024-12-12 22:21:44 -06:00
Rob Winch 2a76a09552 Disable Flaky WebAuthnWebDriverTests 2024-12-12 22:21:36 -06:00
Rob Winch 2fcd305509 Increment to 6.5.0-SNAPSHOT
Closes gh-16221
2024-12-12 21:47:11 -06:00
Josh Cummings 7592483654
Add Test to Report Missing serialVersionUID
Issue gh-16276
2024-12-12 18:12:11 -07:00
Josh Cummings f7b9b7228f
Include Classes Listed in Generator Map
This allows testing of classes that are serializable,
but do not use Security's serialVersionUID.

Issue gh-16276
2024-12-12 18:07:53 -07:00
Josh Cummings 82cc3ad5ec
Arrange Class Generators by Module
Issue gh-16276
2024-12-12 18:07:52 -07:00
Josh Cummings 47b5ab400a
Add 6.4.x Serialization Files
Closes gh-16274
2024-12-12 18:07:52 -07:00
Daniel Garnier-Moiroux 99cc65d74c webauthn: add webdriver test
- These tests verify the full end-to-end flow, including the javascript
  code bundled in the default login and logout pages. They require a full
  web browser, with support for Virtual Authenticators for automated testing.
  At this point in time, only Chrome supports virutal authenticators.
2024-12-11 16:53:38 -06:00
Josh Cummings 4cbaabb239 Added Testing
Issue gh-16177
2024-12-10 14:09:46 -07:00
Josh Cummings aa85ebc65f
Remove Extraneous Field
Issue gh-15678
2024-12-09 08:00:22 -07:00
Josh Cummings 4dd00fe146
Merge branch '6.3.x' 2024-12-06 15:19:19 -07:00
Josh Cummings dd8ee38194
Merge branch '6.2.x' into 6.3.x
Closes gh-16229
2024-12-06 15:18:42 -07:00
Josh Cummings 87de6cea1b
Use Reactive JSON Encoder
Closes gh-16177
2024-12-06 15:14:07 -07:00
Josh Cummings 3d1e4b5f18
Polish Tests
Confirm that responses are a valid JSON map

Issue gh-16177
2024-12-06 15:14:07 -07:00
Josh Cummings 3e20f7b5b5 Polish Error Messages
- aligned the grammar
- formatted using gradlew format
- updated copyright year

Issue gh-16193
2024-12-05 17:37:46 -07:00
Dmitry Spikhalsky 32e1d4c990 Improve AuthorizationManager configuration error messages
Closes gh-16193
2024-12-05 17:37:46 -07:00
Tran Ngoc Nhan 39cd8d9faf Update copyright headers 2024-12-05 14:52:59 -07:00
Josh Cummings 96b3c77ce0
Merge branch '6.3.x' 2024-12-05 12:30:37 -07:00
DingHao ef7b11ac01 Delay initialization UserDetailsService in Global Authentication 2024-12-05 12:26:04 -07:00
Tran Ngoc Nhan 5966baf9bf Update copyright headers 2024-12-04 16:51:05 -07:00
Josh Cummings 2ed1cafed8 Restore Deprecated ObjectPostProcessor Usage
Closes gh-16174
2024-12-04 16:51:05 -07:00
Tran Ngoc Nhan 8c0ea3e630 Add Deprecated ObjectPostProcessor constructor
Issue gh-16174
2024-12-04 16:51:05 -07:00
Josh Cummings 2b5a2eef82
Address Observation Bean Name Collisions
Closes gh-16161
2024-11-25 13:26:52 -07:00
Josh Cummings a55021539a
Add RSocket and WebFlux Observation Tests
Issue gh-11989
Issue gh-11990
2024-11-25 13:26:52 -07:00
Josh Cummings 315aafd464
Merge remote-tracking branch 'origin/6.3.x' 2024-11-22 17:23:43 -07:00
DingHao e8ba039a61 Delay initialization AuthenticationProvider in Global Authentication 2024-11-22 17:22:14 -07:00
Tran Ngoc Nhan b896a74669 Resolve Observation Bean Name Collisions
Closes gh-16011
2024-11-20 13:28:06 -07:00
Josh Cummings 91832bfc8e Add EnableWebSecurity + EnableWebSocketSecurity Test
Issue gh-16011
2024-11-20 13:28:06 -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
Daniel Garnier-Moiroux 2639ac6545 webauthn: introduce WebAuthnConfigurer#disableDefaultRegistrationPage 2024-11-14 12:11:43 -06:00
Daniel Garnier-Moiroux de7c452e42 webauthn: use DefaultResourcesFilter#webauthn
- Unconditionally use the DefaultResourcesFilter, because the javascript file is required by the
  DefaultWebAythnPageGeneratingFilter, which is always registered.
2024-11-14 12:11:43 -06:00
Rob Winch 5a95952c95 Merge branch '6.3.x'
Closes gh-16063
2024-11-11 15:17:02 -06:00
Rob Winch e1ad989d38 Merge branch '6.2.x' into 6.3.x
Closes gh-16062
2024-11-11 14:58:39 -06:00
Rob Winch 81e74e65d4 Support ServerExchangeRejectedHandler @Bean
Closes gh-16061
2024-11-11 14:58:00 -06:00
Josh Cummings f46e56de78 Improve Error Message for Conflicting Filter Chains
Closes gh-15874
2024-11-07 13:01:16 -07:00
Josh Cummings 8a6e1297a1
Add Warning Message for Missing Leading Slashes
Closes gh-16020
2024-10-31 12:22:17 -06:00
Cedric Montfort d9d77bed82 Allow logout+jwt JWT type for reactive
The OIDC back-channel spec recommends using a logout token typ `logout+jwt`
(see [here](https://openid.net/specs/openid-connect-backchannel-1_0-final.html#LogoutToken).

Support of this type was recently added [on the servlet side]([on the Servlet side](9101bf1f7d)), so back
porting the same on the reactive side to close the gap.

Closes gh-15702
2024-10-28 14:21:48 -07:00
Josh Cummings 27294b2e11
Allow RelyingPartyRegistration Placeholder Resolution in XML
Closes gh-14645
2024-10-25 16:12:27 -06:00
Tran Ngoc Nhan 689a4141df Remove unused import 2024-10-25 13:42:33 -07:00
Tran Ngoc Nhan ffed4ea1dc Polish diamond usage 2024-10-25 13:42:33 -07:00
Rob Winch 1ba6301afa Support ServerWebExchangeFirewall @Bean
Closes gh-15987
2024-10-25 12:13:41 -05:00
Rob Winch 8d5fddda9d Merge branch '6.3.x'
Support ServerWebExchangeFirewall @Bean

Closes gh-15974in 6.4.x
2024-10-25 12:07:01 -05:00
Rob Winch adc66e134b Merge branch '6.2.x' into 6.3.x
Support ServerWebExchangeFirewall @Bean

Closes gh-15991
2024-10-25 11:56:53 -05:00
Rob Winch 3ba1263d64 Support ServerWebExchangeFirewall @Bean
Closes gh-15987
2024-10-24 16:47:36 -05:00
Tomasz Letachowicz b2e0539ff5 Add localization to DefaultLoginPageConfigurerTests test in order to avoid failure when system language is different 2024-10-24 11:34:34 -05:00
Josh Cummings 8bac87fb20 Merge branch '6.3.x' 2024-10-23 15:24:32 -07:00
Josh Cummings c104f44546 Merge branch '6.2.x' into 6.3.x 2024-10-23 15:23:15 -07:00
Scott Murphy Heiberg 18dba34bde Make RequestMatcherDelegatingAuthorizationManager Post-Processable
Closes gh-15948
2024-10-23 15:15:10 -07:00
Rob Winch b0e8730d70 Add Passkeys Support
Closes gh-13305
2024-10-20 22:54:53 -05:00
xhaggi 7f537241e7 Use SessionAuthenticationStrategy for Remember-Me authentication
Closes gh-2253
2024-10-15 14:07:07 -07:00
Max Batischev d37d41c130 Polish One-Time Token API Names and Doc
The names of variables and methods have been adjusted in accordance with the names of the one-time token login API components.

Issue gh-15114
2024-10-15 14:04:56 -07:00
Max Batischev e9fe6360bc Add Reactive One-Time Token Login Kotlin DSL Support
Closes gh-15887
2024-10-15 14:04:56 -07:00
Josh Cummings c40334317d
Polish One-Time Token Component Names
Aligning parts of speech so that names are using nouns/verbs
where comparable components are using nouns/verbs.

Issue gh-15114
2024-10-14 14:07:47 -06: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
DingHao ef1226ddf8 Use Oauth2UserService bean in OidcReactiveOAuth2UserService
Closes gh-15846
2024-10-14 11:41:04 -07:00
Max Batischev 2edaedf099 Improve encapsulation for jwtValidators 2024-10-07 16:41:50 -07: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
Cedric Montfort aceb5fa6bb Allow logout+jwt JWT type for reactive
The OIDC back-channel spec recommends using a logout token typ `logout+jwt`
(see [here](https://openid.net/specs/openid-connect-backchannel-1_0-final.html#LogoutToken).

Support of this type was recently added [on the servlet side]([on the Servlet side](9101bf1f7d)), so back
porting the same on the reactive side to close the gap.

Closes gh-15702
2024-09-30 16:32:45 -07:00
Josh Cummings 29331a0d8c
Merge branch '6.3.x' 2024-09-30 17:24:03 -06:00
Josh Cummings 746464e035
Merge branch '6.2.x' into 6.3.x 2024-09-30 17:21:13 -06:00
Josh Cummings c1857c0308 Fix Formatting
Issue gh-15771
2024-09-30 16:19:26 -07:00
chao.wang 690e012fb1 Improve OidcBackChannelLogoutTokenValidator error when provider issuer is missing
Closes gh-15771
2024-09-30 16:19:26 -07:00
Thomas Darimont 8b97fdde43 Polish OAuth2ClientConfiguration 2024-09-30 16:16:45 -07:00
Josh Cummings ee9a887ae5
Fix Package Tangle
Move ObjectPostProcessor to be alongside Customizer, another
functional interface for describing Spring Security object
configuration.
2024-09-26 14:08:25 -06:00
Josh Cummings d6b620b9f7
Make Observations Selectable
Closes gh-15678
2024-09-26 11:30:40 -06:00
Josh Cummings 69e3c248fa
Abstract ObservationRegistry Behind ObjectPostProcessor
Issue gh-15678
2024-09-26 11:30:40 -06:00
Josh Cummings 1ed20aa210
Add ObservationRegistry Tests
Issue gh-11989
Issue gh-11990
2024-09-26 11:30:40 -06:00
Josh Cummings 717529deb4
Add Generic Type to ObjectPostProcessor Lookups
Issue gh-15678
2024-09-26 11:30:39 -06:00
Tran Ngoc Nhan e618fc425d Favor ObjectProvider
Closes gh-15805
2024-09-23 16:11:43 -07:00
Tran Ngoc Nhan 9dda65a5e3 Polish CorsSpecTests
Use concrete ApplicationContext to simplify future maintenance.

Issue gh-4832
2024-09-23 16:11:43 -07:00
Steve Riesenberg cd7f6e09b0
Look up ReactiveOAuth2AccessTokenResponseClient as a bean
Closes gh-11097
2024-09-23 11:06:12 -05:00
Rob Winch 22dffc0a98 Run format 2024-09-20 09:06:37 -07:00
Ryan Scheidter 0a0721b030 Complete HttpSecurity Deprecation notices 2024-09-20 09:06:37 -07:00
Marcus Hert Da Coregio a88a7744ed Require GeneratedOneTimeTokenHandler on constructor
Issue gh-15114
2024-09-17 08:21:26 -03:00
Josh Cummings b311b811a1 Pick Up OidcSessionRegistry Bean
Closes gh-15813
2024-09-15 21:30:55 -07:00
Josh Cummings 590aef0af1 Configure OidcSessionRegistry in Kotlin
Closes gh-15814
2024-09-15 21:30:55 -07:00
Josh Cummings 8bb5875595 Expose OidcBackChannelLogoutHandler
This component already uses by default a URI that doesn't require
a CSRF token and aalready allows for configuring a cookie name.

So, by making it public and configurable in the DSL, both
of these tickets quite naturally close.

Closes gh-13841
Closes gh-14904
2024-09-15 21:30:55 -07:00
Josh Cummings 2d4c498c3b Test Meta-Annotation Class Type Support in Reactive
Issue gh-15747
2024-09-15 21:30:55 -07:00
Josh Cummings 75fd84ce16 Test Reactive Method Security Exactly-One Invocation Semantics
Issue gh-15651
2024-09-15 21:30:55 -07:00
Josh Cummings 1aec571a81 Test Reactive Method Security Exactly Once Semantics
Issue gh-15592
2024-09-15 21:30:55 -07:00
Josh Cummings 3e1f8bb960 Test Reactive Method Security with Abstract Classes
Issue gh-15352
2024-09-15 21:30:55 -07:00
Josh Cummings fee5dd30c0 Test AuthorizeReturnObject in Reactive
Issue gh-14597
2024-09-15 21:30:55 -07:00
Josh Cummings fc2ad34e5d Test meta-annotation parameter support in Reactive
Issue gh-14480
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
Josh Cummings 86f64e7e86 Add Reactive Authorization Proxy Data Hints
Issue gh-15709
2024-09-15 21:30:55 -07:00
Josh Cummings 2bb3787d2b Use addAdvisors in Reactive Proxy Configuration
Issue gh-15497
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
Steve Riesenberg 51c226f24c
Add loginPage() to DSL in reactive oauth2Login()
Closes gh-15674
2024-09-11 15:56:54 -05:00
Rob Winch 9e5cc5f267 Merge remote-tracking branch 'origin/6.3.x' 2024-09-11 15:14:45 -05:00
Daniel Garnier-Moiroux 51d0a8b57d Fix getBeansWithName in global authentication configurers 2024-09-11 10:46:24 -07:00
Daniel Garnier-Moiroux 7e41785dfc Remove trailing spaces in default UIs
- Default UIs had blank lines with only spaces. These get deleted by the
  spring-javaformat plugin. In order to avoid this behavior, an extra \s
  had been inserted in the tests. The reason for those \s is not obvious.
- This commit cleans up the \s but changing the HTML templates.
2024-09-11 10:44:45 -07:00
Daniel Garnier-Moiroux 85693b2806 Add DefaultResourcesFitler to XML configuration 2024-09-11 10:21:12 -07:00
Steve Riesenberg 63f018eb18
Update tests using deprecated classes
Issue gh-15737
2024-09-10 15:10:42 -05:00
Daniel Garnier-Moiroux c1b9035544 Use static CSS in OneTimeToken default UI 2024-09-10 12:46:13 -07:00
Daniel Garnier-Moiroux 45d53973ab Serve static content (css, js) for reactive default UIs from DefaultResourcesWebFilter 2024-09-10 12:46:13 -07:00
Daniel Garnier-Moiroux 11616a1d78 Use static CSS in servlet default UI 2024-09-10 12:46:13 -07:00
Daniel Garnier-Moiroux c5c5cd5ed0 Serve static content (css, js) for default UIs from DefaultResourcesFilter 2024-09-10 12:46:13 -07:00
Josh Cummings be6dc1d2bf
Polish MethodSecurityExpressionHandler Test
- Rename to follow convention
- Use a mock object to verify usage

Issue gh-15715
2024-09-10 13:12:47 -06:00
DingHao ef8b0addbb Support custom MethodSecurityExpressionHandler
Closes gh-15715
2024-09-10 12:01:29 -07:00
Josh Cummings e29058c7e4 Add AuthorizeReturnObject Spring Data Hints
Issue gh-15709
2024-09-10 11:57:31 -07:00
Josh Cummings fd5d03d384 Add AuthorizeReturnObject Hints
Closes gh-15709
2024-09-10 11:57:31 -07:00
Daniel Garnier-Moiroux 6428bf2bd8 Add test for rendering "request token" form in OneTimeTokenLoginConfigurerTests 2024-09-06 09:13:30 -03:00
Daniel Garnier-Moiroux 803c32eb4e Remove unused logger in OneTimeTokenLoginConfigurer 2024-09-06 09:13:30 -03:00
Daniel Garnier-Moiroux 8d47906191 Render default UIs using lightweight templates 2024-09-05 15:02:42 -07:00
Marcus Hert Da Coregio a953a3d162 Remove log message 2024-09-05 16:40:26 -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
Max Batischev 81e4c7273a Add One-Time Token Login support to Kotlin DSL
Closes gh-15698
2024-09-04 09:13:38 -03:00
Josh Cummings db04b5a248
Merge branch '6.3.x' 2024-09-03 16:34:09 -06:00
Josh Cummings ff41521e1e
Merge branch '6.2.x' into 6.3.x 2024-09-03 16:33:46 -06:00
Josh Cummings b22061d0b6
Merge branch '5.8.x' into 6.2.x 2024-09-03 16:33:22 -06:00
Josh Cummings 97cefa6830 Update Formatting
Issue gh-15714
2024-09-03 15:32:59 -07:00
tugjg f836efb912 Address unnecessary method invocation
Closes gh-15714
2024-09-03 15:32:59 -07:00
Marcus Hert Da Coregio 00e4a8fb54 Add support for One-Time Token Login
Closes gh-15114
2024-09-03 10:07:56 -03:00
Yanming Zhou f0f47b54ec Improve warning message 2024-08-31 16:48:59 -07:00
Josh Cummings d2e8c19789
Merge branch '6.3.x' 2024-08-26 16:33:04 -06:00
Josh Cummings 279cb89eac
Merge branch '6.2.x' into 6.3.x 2024-08-26 16:32:58 -06:00
Hero Wanders f372f5cf52 Replace OidcSessionStrategy References with OidcSessionRegistry 2024-08-26 15:32:35 -07:00
Josh Cummings dff3780c5e
Merge branch '6.3.x' 2024-08-22 12:38:17 -06:00
Josh Cummings 4c0d969f1f
Merge branch '6.2.x' into 6.3.x
Closes gh-15676
2024-08-22 12:37:45 -06:00
Josh Cummings 3ee5a96e53
Merge branch '5.8.x' into 6.2.x
Closes gh-15675
2024-08-22 12:24:56 -06:00
Josh Cummings 5c604b95fb
Correct PostFilterAuthorizationMethodInterceptor Target Type
Previously, `postFilterAuthorizationMethodInterceptor` mistakenly
was published as an `Advisor`. Because `MethodSecurityAdvisorRegistrar`
re-publishes each pre/post annotation interceptor also as an `Advisor`,
this resulted in a duplicate advisor for `@PostFilter`.

Closes gh-15651
2024-08-22 12:10:25 -06:00
Josh Cummings f398be793d
Simplify AuthorizationAdvisorProxyFactory Configuration
Closes gh-15497
2024-08-19 12:34:38 -06:00
Josh Cummings 6352877bc4
Merge branch '6.3.x' 2024-08-19 12:34:32 -06:00
Josh Cummings ae8e4d148e
Produce Exactly One AuthorizationAdvisor Per Annotation
Closes gh-15592
2024-08-19 12:30:03 -06:00
Josh Cummings 27af1df87d
Simplify Method Interceptor Configuration
Simplifies to use only one ObjectProvider for easier
future maintenance

Issue gh-15592
2024-08-19 12:27:56 -06:00
Daniel Garnier-Moiroux b731623b3a Fix checkstyle errors with @Deprecated 2024-08-19 10:55:58 -03:00
Daniel Garnier-Moiroux b92ed92548 Fix checkstyle errors with @Deprecated 2024-08-19 10:55:28 -03: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
DingHao ed16c86115 Improve @CurrentSecurityContext meta-annotations
Closes gh-15551
2024-08-13 13:18:15 -06: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 2b33f6f04a Add Config Tests for AuthenticationPrincipal Templates
Issue gh-15286
2024-08-10 11:46:51 -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
DingHao 2c02d8aec7 Update Copyright 2024-08-10 11:46:51 -06:00
DingHao 895978c818 Auto config AuthenticationPrincipalArgumentResolver When AnnotationTemplateExpressionDefaults bean is Present 2024-08-10 11:46:51 -06:00
Rob Winch 71f40f2bc4 Merge branch '6.3.x'
Use explicit types instead of var

Closes gh-155537
2024-08-08 15:30:16 -05:00
Daniel Garnier-Moiroux 3b8cdc323f Remove unused method 2024-08-08 15:29:41 -05:00
Daniel Garnier-Moiroux 109da2719f Use explicit types everywhere instead of var 2024-08-08 15:29:41 -05:00
Josh Cummings 02cca6f737
Polish AuthorizationAdvisorProxyFactory advisor configuration
Closes gh-15497
2024-08-07 10:09:51 -06:00
Josh Cummings 816ebe38b5
Add OpenSAML to Config Build
Issue gh-11658
2024-08-06 18:14:12 -06:00
Josh Cummings 1da383b360
Add OpenSAML 5 Support
Issue gh-11658
2024-08-06 18:14:11 -06:00
Josh Cummings 78a0173cc1
Use OpenSAML API for web
Issue gh-11658
2024-08-06 18:14:11 -06:00
Josh Cummings 51fc05630d
Use OpenSAML API for web.authentication.logout
Issue gh-11658
2024-08-06 18:14:10 -06:00
Josh Cummings ff9a925e88
Use OpenSAML API for metadata
Issue gh-11658
2024-08-06 18:14:10 -06:00
Josh Cummings 416859e70e
Use OpenSAML API in authentication.logout
Issue gh-11658
2024-08-06 18:14:10 -06:00
Daniel Garnier-Moiroux bc8ba7f3b7 Inline CSS for default login and logout page
- Remove the dependency on Bootstrap CSS. Results in faster load times, no failures
  in air-gapped or offline scenarios, and no dependency on an external CDN that may
  go away some day.
2024-08-05 09:27:18 -05: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 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
Marcus Hert Da Coregio 304685521c Fix tags order 2024-07-29 15:35:48 -03:00
Marcus Hert Da Coregio 8231b8a03b Merge branch '6.3.x' 2024-07-29 14:56:16 -03:00
Marcus Hert Da Coregio c1b3b329af Merge branch '6.2.x' into 6.3.x 2024-07-29 14:56:09 -03:00
baezzys 3d4bcf1b44 fix: Restrict automatic CORS configuration to UrlBasedCorsConfigurationSource
- Update CORS configuration logic to automatically enable .cors() only if a UrlBasedCorsConfigurationSource bean is present.
- Modify applyCorsIfAvailable method to check for UrlBasedCorsConfigurationSource instances.
2024-07-29 14:55:55 -03:00
Marcus Hert Da Coregio 98af8d1123 Add permissionsPolicyHeader
This method is a replacement of `permissionsPolicy(Customizer)` that returns its own configurer instead of `HeadersConfigurer`.

Closes gh-14803
2024-07-29 09:26:42 -03:00
Josh Cummings 9d8888c5f0 Use AssertingPartyMetadata
Issue gh-15394
2024-07-19 18:48:23 -07:00
Josh Cummings fdcf3c6df9
Merge branch '6.3.x' 2024-07-18 15:51:21 -06:00
Josh Cummings ba714d78ab
Merge branch '6.2.x' into 6.3.x
Closes gh-15440
2024-07-18 15:51:10 -06:00
Josh Cummings 3daeeb8789
Merge branch '5.8.x' into 6.2.x
Closes gh-15439
2024-07-18 15:50:58 -06:00
Josh Cummings dab48d25b0
Improve Error Message When Registration Missing
Closes gh-15363
2024-07-18 15:50:41 -06:00
Josh Cummings 796e4d6b6c
Add query parameter support for authn requests
Closes gh-15017
2024-07-13 23:57:57 -06:00
Josh Cummings 8ee497f4c5
Merge branch '6.2.x' into 6.3.x
Closes gh-15410
2024-07-12 11:04:08 -06:00
Josh Cummings 7422a1134a Allow logout+jwt JWT type
Closes gh-15003
2024-07-12 10:03:40 -07:00
Josh Cummings 773e86701e
Add ParameterRequestMatcher
Closes gh-15342
2024-07-02 15:17:54 -06:00
Marcus Hert Da Coregio aa9c1bab67 Upgrade to Spring Framework 6.2.0-M4
Closes gh-15266
2024-06-18 14:07:05 -03:00
Josh Cummings 0e7566ede3
Adjust any-request check
Storing the request matcher outside of the for loop means that
if one of the SecurityFilterChain instances is not of type
DefaultSecurityFilterChain, then the error may print out an
earlier request matcher instead of the current one.

Instead, this commit changes to print out the entire filter chain
so that it can be inside of the for loop, regardless of type.

Issue gh-15220
2024-06-17 14:34:03 -06:00
Max Batischev 4c780bf8d4 Add support checking AnyRequestMatcher securityFilterChains
Closes gh-15220
2024-06-17 13:05:36 -06:00
Steve Riesenberg 7eaab95639
Polish gh-15237 2024-06-13 16:05:15 -05:00
Max Batischev 4e52eda0f5
Add support configuring OAuth2AuthorizationRequestResolver as bean
Closes gh-15236
2024-06-13 16:05:15 -05:00
Marcus Hert Da Coregio b4c8fdf91d Add missing @Test annotation 2024-06-10 15:43:52 -03:00
Marcus Hert Da Coregio 7c43fc111f Support RoleHierarchy Bean in authorizeHttpRequests Kotlin DSL
Closes gh-15136
2024-06-10 15:41:28 -03:00
Josh Cummings 4ca0de9c2d
Sync XSD with RncToXsd Task 2024-06-06 15:17:56 -06:00
Josh Cummings a7f9ccb6d6
Use GrantedAuthorityDefaults Bean in Kotlin DSL
Closes gh-15171
2024-06-06 15:16:32 -06:00
Josh Cummings 87ee464dce
Merge branch '6.3.x' 2024-06-06 13:36:39 -06:00
Josh Cummings 22c7b8760a
Merge branch '6.2.x' into 6.3.x
Closes gh-15211
2024-06-06 13:36:20 -06:00
Josh Cummings f231ea277d
Merge branch '5.8.x' into 6.2.x
Closes gh-15210
2024-06-06 13:35:56 -06:00
Josh Cummings 6aabd768a8
Pick MvcRequestMatcher for MockMvc requests
Closes gh-13849
2024-06-06 13:17:43 -06:00
Josh Cummings 81abc453fe
Merge branch '6.3.x' 2024-06-03 17:43:12 -06:00
Josh Cummings 0aed8df549
Merge branch '6.2.x' into 6.3.x
Closes gh-15197
2024-06-03 17:42:58 -06:00
Josh Cummings d6228e0882
Merge branch '5.8.x' into 6.2.x
Closes gh-15196
2024-06-03 17:42:25 -06:00
Josh Cummings cdd626644e Use Request-Level Servlet Context
Spring Security cannot use the ServletContext attached
to the ApplicationContext since there may be child
ApplicationContext's with their own ServletContext.

Because of that, it is necessary to always use the
ServletContext attached to the request.

Closes gh-14418
2024-06-03 17:41:51 -06:00
Josh Cummings 5a798e93f1 Polish MVC Tests
Issue gh-14418
2024-06-03 17:41:51 -06:00
Josh Cummings 9101bf1f7d
Allow logout+jwt JWT type
Closes gh-15003
2024-05-31 14:41:05 -06:00
Josh Cummings f104d1aeea
Update Copyright
PR gh-15013
2024-05-31 12:39:17 -06:00
earlgrey02 3b7f714f00 Add SecurityContextRepository to Kotlin Reactive DSL 2024-05-31 12:38:17 -06:00
Marcus Hert Da Coregio c89647a56e Deprecate shouldFilterAllDispatcherTypes from Kotlin DSL
Issue gh-12138
2024-05-27 09:00:54 -03:00
Marcus Hert Da Coregio 9f44f3b79a Deprecate authorizeRequests from Kotlin DSL
Closes gh-15173
2024-05-27 08:51:32 -03:00
Marcus Hert Da Coregio f6ea99d8a3 Prepare for Spring Security 6.4
Closes gh-15155
2024-05-24 11:41:28 -03:00
Marcus Hert Da Coregio ddcaeb5c20 Serialize objects from 6.3.x
Issue gh-3737
2024-05-24 09:47:29 -03:00
Marcus Hert Da Coregio 08f11f06ab Revert unnecessary commits from main
Issue gh-15016
2024-05-08 13:49:18 -03:00
Marcus Hert Da Coregio b3c7f3ff19 Rename CompromisedPasswordCheckResult to CompromisedPasswordDecision
Issue gh-7395
2024-04-30 08:38:03 -03:00
Josh Cummings 47775f5167
Merge branch '6.2.x' 2024-04-26 17:09:29 -06:00
Josh Cummings 29d3b438b9
Merge branch '6.1.x' into 6.2.x 2024-04-26 17:09:17 -06:00
Josh Cummings 1ecb036fba
Merge branch '5.8.x' into 6.1.x 2024-04-26 17:09:05 -06:00
sheheryarumair 0e211382ee Remove useBase64 parameter 2024-04-26 17:05:49 -06:00
Josh Cummings 11421c6385
Merge branch '6.2.x' 2024-04-25 14:03:27 -06:00
Josh Cummings 664dfd9b45
Defer Anonymous Filter Construction
By delaying when the AnonymousAuthenticationFilter is constructed,
it's now possible to call the principal and filter methods inside
of a custom DSL implementation.

This does not extend to setting the key or the authentication provider
though, as these must be set during the init phase.

Closes gh-14941
2024-04-25 14:03:10 -06:00
Daniel Garnier-Moiroux 7ddc00521e Improve logging for Global Authentication
Closes gh-14663
2024-04-25 11:35:59 -06:00
Josh Cummings 2bcbef1695
Add Saml2Logout DSL Support
Closes gh-14935
2024-04-22 11:12:45 -06:00
Josh Cummings a4dbf458ab
Add relying-party-registrations#id
Closes gh-14487
2024-04-18 12:56:56 -06:00
Marcus Hert Da Coregio 2fbbcc4bd0 Polish Method Authorization Denied Handling
- Renamed @AuthorizationDeniedHandler to @HandleAuthorizationDenied
- Merged the post processor interface into MethodAuthorizationDeniedHandler , it now has two methods handleDeniedInvocation and handleDeniedInvocationResult
- @HandleAuthorizationDenied now handles AuthorizationDeniedException thrown from the method

Issue gh-14601
2024-04-12 15:55:25 -03:00
Steve Riesenberg fd891d8fe3
Add proxyBeanMethods=false
Addresses too early creation warning of a configuration imported by
ReactiveOAuth2ClientConfiguration.

Closes gh-14900
2024-04-12 11:17:41 -05:00
Marcus Hert Da Coregio 61eba00654 Move HaveIBeenPwnedRestApiPasswordChecker to spring-security-web
Prior to this commit, the implementation was placed in spring-security-core, however we do not want to introduce a dependency on spring-web and spring-webflux for that module.

Issue gh-7395
2024-04-10 14:58:01 -03:00
Marcus Hert Da Coregio 8d914ef145 Add @AuthorizationDeniedHandler for Method Authorization Denied Handling
Issue gh-14601
2024-04-08 14:42:13 -03:00
DingHao 75197ca531 inject PasswordEncoder into DaoAuthenticationProvider constructor
Closes gh-14691
2024-04-08 09:39:25 -05:00
Marcus Hert Da Coregio d6ae058ee1 Merge branch '6.2.x'
Closes gh-14866
2024-04-08 11:16:30 -03:00
Marcus Hert Da Coregio 697d0c9af4 Merge branch '6.1.x' into 6.2.x
Closes gh-14865
2024-04-08 11:16:15 -03:00
Marcus Hert Da Coregio 472c9f8275 Avoid initializing raw bean during runtime in native-images
Closes gh-14825
2024-04-08 11:11:23 -03:00
Steve Riesenberg 61e93ee68b
Merge branch '6.2.x' 2024-04-04 14:56:32 -05:00
Steve Riesenberg 16e2bdc9bc
Merge branch '6.1.x' into 6.2.x 2024-04-04 14:55:45 -05:00
Steve Riesenberg c2447ec257
Merge branch '5.8.x' into 6.1.x 2024-04-04 14:55:03 -05:00
Steve Riesenberg 39dbd24dcb
Polish gh-14742 2024-04-04 14:51:19 -05:00
Josh Cummings bb43174752
Fix Bean Name
Issue gh-14480
2024-04-04 13:30:30 -06:00
Josh Cummings 3f7355abc6
Synthesize all annotation attributes
Issue gh-14601
2024-04-04 13:30:29 -06:00
sheheryarumair 33ebd5405a
Removed dataSource null validation
Fixed data source validation
2024-04-04 14:21:18 -05:00
Josh Cummings 6f07d63938
Support SpEL Returning AuthorizationDecision
Closes gh-14598
2024-04-04 11:32:00 -06:00
Josh Cummings 0a9c482f62
Revert "Support SpEL Returning AuthorizationDecision"
This reverts commit 77f2977c55.
2024-04-04 11:31:45 -06:00
Josh Cummings 77f2977c55 Support SpEL Returning AuthorizationDecision
Closes gh-14599
2024-04-04 09:52:15 -07:00
Marcus Hert Da Coregio d85857f905 Add Authorization Denied Handlers for Method Security
Closes gh-14601
2024-04-03 09:25:12 -03:00
Max Batischev ff19f04fca Add JwtValidators append to default
Implemented simplified creation of default OAuth2TokenValidator with additional validators.

Closes gh-14831
2024-04-02 14:41:35 -07:00
Marcus Hert Da Coregio 7d66525e23 Add Compromised Password Checker
Closes gh-7395
2024-04-01 09:48:07 -03:00
Steve Riesenberg abf9dc165a
Merge branch '6.2.x' 2024-03-26 10:55:48 -05:00
Steve Riesenberg 614123e6f9
Update tests that fail on Windows
Issue gh-14609
2024-03-26 10:49:47 -05:00
Josh Cummings 44033cd8b9
Make Internal Logout URI Configurable
Closes gh-14609
2024-03-22 16:31:44 -06:00
Josh Cummings e18ec48134
Fix Test
Issue gh-14553
2024-03-22 16:31:42 -06:00
Josh Cummings 662cfed349
Make Internal Logout URI Configurable
Closes gh-14609
2024-03-22 16:28:21 -06:00
Josh Cummings c95f009b23
Fix Test
Issue gh-14553
2024-03-22 16:27:16 -06:00
Josh Cummings 9898e0e993 Move AuthorizationAdvisorProxyFactory
To prevent package tangles

Issue gh-14596
2024-03-22 11:00:39 -06:00
Josh Cummings 795e44d11f Add Value-Type Ignore Support
Issue gh-14597
2024-03-22 11:00:39 -06:00
Josh Cummings ce54a6db18 Add TestAuthentication convenience method
Issue gh-14597
2024-03-19 10:27:03 -06:00
Josh Cummings d169d5a835 Add AuthorizeReturnObject
Closes gh-14597
2024-03-19 10:27:03 -06:00
Josh Cummings c611b7e33b
Add AuthorizationProxyFactory Reactive Support
Issue gh-14596
2024-03-15 11:44:30 -06:00
Josh Cummings f541bce492
Polish AuthorizationAdvisorProxyFactory
- Ensure Reasonable Defaults
- Simplify Construction

Issue gh-14596
2024-03-15 11:44:30 -06:00
Steve Riesenberg 77c30c431e
Polish tests
Issue gh-11783
Issue gh-13763
2024-03-14 15:40:43 -05:00
Steve Riesenberg 80a8d3831a
Simplify reactive OAuth2 Client configuration
Closes gh-13763
2024-03-14 15:40:43 -05:00
Josh Cummings 52dfbfb5b3 Add Authorization Proxy Support
Closes gh-14596
2024-03-13 14:35:07 -06:00
Steve Riesenberg d6382b83dc
Configure token-exchange via a bean
Issue gh-5199
Issue gh-11783
Closes gh-14701
2024-03-07 11:03:10 -06:00
Josh Cummings bade66e588
Fix Circular Dependency
Closes gh-14674
2024-03-01 14:21:13 -07:00
Marcus Hert Da Coregio f8ff056eb6 Update Max Sessions on WebFlux
Delete WebSessionStoreReactiveSessionRegistry.java and gives the responsibility to remove the sessions from the WebSessionStore to the handler

Issue gh-6192
2024-02-28 10:06:45 -03:00
Marcus Hert Da Coregio a5ce8ae87f Polish Max Sessions on WebFlux
This commit changes the PreventLoginServerMaximumSessionsExceededHandler to invalidate the WebSession in addition to throwing the error, this is needed otherwise the session would still be saved with the security context. It also changes the SessionRegistryWebSession to first perform the operation on the delegate and then invoke the needed method on the ReactiveSessionRegistry

Issue gh-6192
2024-02-27 11:12:50 -03:00
Josh Cummings c639d0a514
Add AOP Integration Test
Closes gh-14637
2024-02-26 13:56:56 -07:00
Josh Cummings 4d383023cb Add meta-annotation parameter support
Closes gh-14480
2024-02-26 10:50:35 -07:00
Josh Cummings 347eeb17d5
Merge branch '6.2.x' 2024-02-26 10:17:18 -07:00
Josh Cummings 2471df4d36
Merge branch '6.1.x' into 6.2.x 2024-02-26 10:17:04 -07:00
Josh Cummings 27cd9fa86c
Don't Use Deprecated Class
Issue gh-14628
2024-02-26 10:06:59 -07:00
Josh Cummings 093b5572af
Merge branch '6.2.x' 2024-02-22 12:15:42 -07:00
Josh Cummings bb6045ebea
Merge branch '6.1.x' into 6.2.x
Closes gh-14648
2024-02-22 12:15:17 -07:00
Josh Cummings 2fdd541ea5
Merge branch '5.8.x' into 6.1.x
Closes gh-14647
2024-02-22 12:15:00 -07:00
DingHao 45c37c4454 Remove duplicate setSecurityContextHolderStrategy
Closes gh-14592
2024-02-22 12:14: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
Josh Cummings 7f0433c805
Merge branch '6.2.x' 2024-02-12 17:01:38 -07:00
Josh Cummings 2702a64be7
Use Localhost for Internal Logout Endpoint
Closes gh-14553
2024-02-12 17:00:58 -07:00
Josh Cummings 34526c3e01
Merge branch '6.2.x' 2024-02-12 12:54:29 -07:00
Josh Cummings 3ab323663a
Do Not Wire Default OidcSessionStrategy without OidcLogoutConfigurer
Closes gh-14558
2024-02-12 12:53:48 -07:00
Marcus Hert Da Coregio ccb2f06d0d Partially revert fc658d10
OpenIDAuthenticationFilter exists in versions < 6.0

Issue gh-14531
2024-02-07 10:13:34 -03:00
Marcus Hert Da Coregio dea6d6b49c Merge branch '6.2.x'
Closes gh-14566
2024-02-07 09:38:10 -03:00
Marcus Hert Da Coregio ad96837e59 Merge branch '6.1.x' into 6.2.x
Closes gh-14565
2024-02-07 09:38:02 -03:00
Marcus Hert Da Coregio ba1068e368 Merge branch '5.8.x' into 6.1.x
Closes gh-14564
2024-02-07 09:37:52 -03:00
DingHao fc658d10d3 fix security filter sort in javadoc
Closes gh-14531
2024-02-07 09:37:01 -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
Josh Cummings a282887906
Merge branch '6.2.x' 2024-02-05 15:42:09 -07:00
Josh Cummings b43b3b144e
Merge branch '6.1.x' into 6.2.x 2024-02-05 15:41:58 -07:00
Josh Cummings ffe9577487
Merge branch '5.8.x' into 6.1.x 2024-02-05 15:41:35 -07:00
Josh Cummings 7c3a6a567e Fix Compilation Errors
Issue gh-14525
2024-02-05 15:18:31 -07:00
Andreas Asplund 07e0b1dc37 Saml2 LogoutFilter Is Placed Before Common LogoutFilter
Closes gh-14525
2024-02-05 15:18:31 -07:00
Josh Cummings 3a53422478
Fix Failing Test
Closes gh-14467
2024-01-29 17:14:30 -07:00
Josh Cummings 27ebeefb14
Fix Failing Test
Closes gh-14467
2024-01-26 11:24:00 -07:00
y-tomida bdc0bd6b78 Add usernameParameter and passwordParameter to FormLoginDsl
Closes gh-14474
2024-01-24 09:56:38 -03:00
DingHao 3f65f600de Use AuthorizationEventPublisher Bean
- For Jsr250MethodInterceptor and SecuredMethodInterceptor

Closes gh-14401
2024-01-17 17:40:38 -07:00
Marcus Hert Da Coregio 1daa9e27e2 Merge branch '6.2.x' 2024-01-05 15:17:01 -03:00
Marcus Hert Da Coregio e2bab7b7ef Add .serialized suffix and consider them as binary in Git
Issue gh-3737
2024-01-05 15:14:22 -03:00
Marcus Hert Da Coregio 85177c0178 Merge branch '6.2.x'
Closes gh-14408
2024-01-05 14:22:49 -03:00
Marcus Hert Da Coregio 4fb6a33d36 Verify Serializable Objects Are Deserializable Between Minor Versions
This commit introduces a test that verifies that Spring Security domain classes that implements Serializable and have the same serialVersionUID as SpringSecurityCoreVersion#SERIAL_VERSION_UID can be deserialized between minor versions.

This commit also introduces another test that should be used to generate the files containing the serialized content of the objects.

Closes gh-3737
2024-01-05 12:00:02 -03:00
Steve Riesenberg eeb2f5d108
Merge branch '6.2.x' 2023-12-28 12:56:52 -06:00
Steve Riesenberg 428a3a2703
Merge branch '6.1.x' into 6.2.x 2023-12-28 12:56:36 -06:00
Steve Riesenberg 3beb583207
Merge branch '5.8.x' into 6.1.x 2023-12-28 12:56:25 -06:00
Steve Riesenberg 16dc6be3c8
Update copyright year
Issue gh-14329
2023-12-28 12:54:29 -06:00
Geir Hedemark c88aaedb48
Updated broken documentation link in javadocs 2023-12-28 12:54:29 -06:00
Marcus Hert Da Coregio 707588f870 Merge branch '6.2.x' 2023-12-26 15:58:51 -03:00
Marcus Hert Da Coregio d385b53e3c Merge branch '6.1.x' into 6.2.x 2023-12-26 15:58:39 -03:00
Marcus Hert Da Coregio 92af758f1f Make springSecurityHandlerMappingIntrospectorBeanDefinitionRegistryPostProcessor passive
Instead of excluding the bean from AOT processing, we avoid redefining the beans if they are present or in the expected state.

Issue gh-14362
2023-12-26 15:58:16 -03:00
Marcus Hert Da Coregio 778a63a763 Revert "Exclude SpringSecurityHandlerMappingIntrospectorBeanDefinitionRegistryPostProcessor from AOT processing"
This reverts commit 8a93178da7.
2023-12-26 15:10:15 -03:00
Marcus Hert Da Coregio 5ad34d1f92 Merge branch '6.2.x'
Closes gh-14381
2023-12-26 11:20:51 -03:00
Marcus Hert Da Coregio dd20f0694d Merge branch '6.1.x' into 6.2.x
Closes gh-14380
2023-12-26 11:20:41 -03:00
DingHao 7cd626fe25 Fix FilterChainProxy cannot be found when @EnableWebSecurity(debug = true)
Closes gh-14370
2023-12-26 11:20:09 -03:00
Marcus Hert Da Coregio 08d764dc84 Merge branch '6.2.x'
Closes gh-14378
2023-12-26 10:42:45 -03:00
Marcus Hert Da Coregio f95cda6be7 Merge branch '6.1.x' into 6.2.x
Closes gh-14377
2023-12-26 10:42:37 -03:00
Marcus Hert Da Coregio 364bc10e78 Add hints for CompositeFilterChainProxy
Closes gh-14359
2023-12-26 10:41:56 -03:00
Marcus Hert Da Coregio a628384d20 Merge branch '6.2.x'
Closes gh-14368
2023-12-22 08:40:24 -03:00
Marcus Hert Da Coregio 737678c66e Merge branch '6.1.x' into 6.2.x
Closes gh-14367
2023-12-22 08:40:15 -03:00
Marcus Hert Da Coregio 8a93178da7 Exclude SpringSecurityHandlerMappingIntrospectorBeanDefinitionRegistryPostProcessor from AOT processing
Closes gh-14362
2023-12-22 08:40:07 -03:00
Taehong Kim ec02c22459 Add Request Path Extraction Support
Closes gh-13256
2023-12-19 18:15:49 -07:00
Yan Kardziyaka 99218db84a Add order offset to @EnableMethodSecurity
Closes gh-13214
2023-12-19 17:57:24 -07:00
Josh Cummings c19f3d9d06
Merge branch '6.2.x' 2023-12-18 15:19:54 -07:00
Josh Cummings 74860c4aff
Merge branch '6.1.x' into 6.2.x 2023-12-18 15:19:48 -07:00
Josh Cummings fbafe41991
Merge branch '5.8.x' into 6.1.x 2023-12-18 15:19:40 -07:00
Josh Cummings b7f10cd50a
Merge branch '6.2.x' 2023-12-18 15:19:07 -07:00
Josh Cummings b031a4c0f6
Merge branch '6.1.x' into 6.2.x
Closes gh-14350
2023-12-18 15:18:48 -07:00
Josh Cummings e058b559b8
Polish Method Security Eager-Loading
Issue gh-11596
2023-12-18 15:18:09 -07:00
Josh Cummings 9a5d991383
Address eager-loading of infrastructure beans
Closes gh-11596
2023-12-18 15:16:00 -07:00
Josh Cummings 33800c0124
Address eager-loading of infrastructure beans
Closes gh-11596
2023-12-18 14:25:48 -07:00
Josh Cummings fc007aa373
Check OpenSAML Version in XML Support
Closes gh-12483
2023-12-18 11:51:15 -07:00
Josh Cummings d7a9a19161
Merge branch '6.2.x' 2023-12-18 11:47:39 -07:00
Josh Cummings 03e48905c7
Merge branch '6.1.x' into 6.2.x
Closes gh-14346
2023-12-18 11:47:23 -07:00
Josh Cummings b855ccdb09
Merge branch '5.8.x' into 6.1.x
Closes gh-14345
2023-12-18 11:46:04 -07:00
Josh Cummings eaaa813ede
Fix header value typo
Closes gh-11948
2023-12-18 10:42:50 -07:00
Josh Cummings 8a34e32a24 Polish IpAddressAuthorizationManager
Closes gh-10577
2023-12-15 16:54:58 -07:00
brunodmartins ea7c720ce7 Add hasIpAddress to Kotlin DSL
Closes gh-10577
2023-12-15 16:54:58 -07:00
Rob Winch 9f33d43097 Merge branch '6.2.x'
Use CompositeFilterChainProxy
2023-12-15 01:17:14 -06:00
Rob Winch c7047add5d Merge branch '6.1.x' into 6.2.x
Use CompositeFilterChainProxy
2023-12-15 01:16:21 -06:00
Rob Winch 142b268a21 Use CompositeFilterChainProxy
By extending FilterChainProxy CompositeFilterChainProxy is more passive since
users often depend on the type of the springSecurityFilterChain Bean being
FilterChainProxy (even though it can already be other types - when debug is
enabled).

Issue gh-14128
2023-12-15 01:15:38 -06:00
Rob Winch 465642828a Merge branch '6.2.x'
Add HandlerMappingIntrospector Caching

Closes gh-14333
2023-12-14 16:11:08 -06:00
Rob Winch 6dd29520b0 Merge branch '6.1.x' into 6.2.x
Add HandlerMappingIntrospector Caching

Closes gh-14332
2023-12-14 16:10:50 -06:00
Rob Winch 70dfb3d391 Add HandlerMappingIntrospector Caching
Closes gh-14128
2023-12-14 16:08:36 -06:00
Marcus Da Coregio 57ab15127a Add Max Sessions on WebFlux
Closes gh-6192
2023-12-11 09:48:34 -03:00
DerChris173 e6bea1cfa1 Polish RoleHierarchy Bean Usage
Issue gh-12783
2023-12-07 16:27:14 -07:00
kandaguru17 b76f7c029d Use available RoleHierachy Bean for MethodSecurity Config
Closes gh-12783
2023-12-07 16:27:14 -07:00
Josh Cummings bb6b55aca3 Add Not Support
Closes gh-14058
2023-12-07 16:24:19 -07:00
Josh Cummings d50698a269
Prepare for Spring Security 6.3
Closes gh-14210
2023-12-05 15:49:42 -07:00
Josh Cummings 3ab235cd56
Merge branch '6.1.x' 2023-12-01 15:54:44 -07:00
Josh Cummings 641722823e
Merge branch '6.0.x' into 6.1.x 2023-12-01 15:45:32 -07:00
Josh Cummings f536b2652f
Merge branch '5.8.x' into 6.0.x 2023-12-01 15:45:03 -07:00
Josh Cummings c623303ca5
Add Logging
Now if the ServletRegistration API available message is shown, it will
also be accompanied with a startup warning in the logs.

Closes gh-14221
2023-12-01 12:57:46 -07:00