Commit Graph

8305 Commits

Author SHA1 Message Date
Eleftheria Stein 22c222005b Add custom release notes configuration file 2019-12-31 14:19:40 -05:00
BELHAKEL Ammar b4619f31ee
Fix return type
AbstractConfiguredSecurityBuilder.objectPostProcessor() should cast to
B, the type of SecurityBuilder, instead of O, the type of object being
built.

Without this change, calls like
http.objectPostProcessor(...).getFilters() will fail with a
ClassCastException.
2019-12-30 12:01:56 -07:00
Eleftheria Stein f109388211 Use lambda DSL in all samples in documentation
Issue: gh-7774
2019-12-30 17:49:35 +01:00
Rafael Renan Pacheco 0295b51e78 Fix var typo and code readability 2019-12-27 15:25:04 +01:00
Eleftheria Stein 2c7f2c2117 Fix Javadoc error in oauth2ResourceServer
Fixes: gh-7670
2019-12-27 14:24:46 +01:00
Josh Cummings e1fdb24b5d
Add opaqueToken MockMvc Test Support
Fixes gh-7712
2019-12-20 15:34:11 -07:00
Onur Kağan Özcan 2015f392ef Set secure when cancelling remember-me cookie
AbstractRememberMeServices is setting remember-me cookie with checking request is secure or secure usage is independently set to a fixed flag.
But when cancelling a cookie, cookie is not being marked secure or not. It produces an inconsistency when using secure flag as a part to identity of cookie.
2019-12-20 16:04:31 +01:00
Josh Cummings 40d4dce329
Polish Documentation
Changed indentation on saml2Login() snippets to align more closely
with surrounding documentation.

Also removed call to super.configure as this would enable formLogin as
well as httpBasic. Replaced with default endpoint authorization
statement.

Issue gh-7654
2019-12-18 10:53:59 -07:00
Josh Cummings c745889ae7
Update to nimbus-jose-jwt:8.3
Fixes gh-7720
2019-12-18 10:23:51 -07:00
Tao Sun f18d0fd1a7 Test details using isEqualTo 2019-12-18 17:35:51 +01:00
Tao Sun 6b0981549b Add test for details deserialization 2019-12-18 17:35:51 +01:00
Tao Sun 156fc294bf Deserialize details field in UsernamePasswordAuthenticationToken
Before this commit, the details field was set to a JsonNode, but now it is deserialized correctly.

Fixes gh-7482
2019-12-18 17:35:51 +01:00
Filip Hanik af415948b1 Allow configuration of AuthenticationManagerResolver in saml2Login()
Fixes gh-7654

https://github.com/spring-projects/spring-security/issues/7654
2019-12-17 13:34:27 -08:00
Filip Hanik b7eebabce6 Ensure that both matchers carry the same pattern.
AbstractAuthenticationProcessingFilter.setRequiresAuthenticationRequestMatcher is public and final,
so there is a risk that the underlying matcher can become different if one is not careful.
2019-12-17 13:34:27 -08:00
Filip Hanik 9aa333ca4d Use the custom ServerRequestCache that the user configures
on for the default authentication entry point and authentication
success handler

Fixes gh-7721

https://github.com/spring-projects/spring-security/issues/7721

Set RequestCache on the Oauth2LoginSpec default authentication success handler

import static ReflectionTestUtils.getField

Feedback incorporated per

https://github.com/spring-projects/spring-security/pull/7734#pullrequestreview-332150359
2019-12-17 13:33:56 -08:00
Rafael Garcia 65f5c29316 Check hashes of byte array passwords
Fixes gh-7661
2019-12-13 17:57:49 +01:00
Rob Winch 83d796cf1a Docs ServerRSocketFactoryCustomizer->ServerRSocketFactoryProcessor
The documentation incorrectly used ServerRSocketFactoryCustomizer which
was renamed to ServerRSocketFactoryProcessor. The docs now use the correct
class name

Fixes gh-7737
2019-12-12 15:30:33 -06:00
Eleftheria Stein da3f18017d Polish SAML2 principal classes
Update @since

Issue: gh-7681
2019-12-12 20:22:58 +01:00
Rob Winch a8331ba7ed CompositeServerHttpHeadersWriter Executes Sequentially
Fixes gh-7731
2019-12-12 11:23:56 -06:00
Clement Stoquart 31b999e9b4 fix: make Saml2Authentication serializable 2019-12-12 17:11:00 +01:00
Josh Cummings 02f161aba7
Use OidcIdToken.Builder
Issue gh-7592
2019-12-12 07:37:15 -07:00
David Herberth 64e063d948 switches web authentication principal resolver to use reactive context
gh #6598

Signed-off-by: David Herberth <github@dav1d.de>
2019-12-12 15:33:23 +01:00
Rob Winch 8e53c3f269 DelegatingServerAuthenticationSuccessHandler Executes Sequentially
Fixes gh-7728
2019-12-12 08:32:44 -06:00
Rafael Garcia c71e84bdac Replace test vectors with list of objects 2019-12-12 12:42:44 +01:00
Rob Winch 73babc3314 DelegatingServerLogoutHandler Executes Sequentially
Fixes gh-7723
2019-12-11 15:39:27 -06:00
Phil Clay cffad1be02 Polish #7589
Rename OAuth2AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager to AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager.

Handle empty mono returned from contextAttributesMapper.

Handle empty map returned from contextAttributesMapper.

Fix DefaultContextAttributesMapper so that it doesn't access ServerWebExchange.

Fix unit tests so that they pass.

Use StepVerifier in unit tests, rather than .subscribe().

Fixes gh-7569
2019-12-10 13:59:51 -05:00
Ankur Pathak c29309d744 Reactive Implementation of AuthorizedClientServiceOAuth2AuthorizedClientManager
ReactiveOAuth2AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager is reactive
version of AuthorizedClientServiceOAuth2AuthorizedClientManager

Fixes: gh-7569
2019-12-10 13:59:51 -05:00
Clement Stoquart 0c47bfb1e3 Remove empty relay state from redirect url 2019-12-10 09:49:54 -08:00
Joe Grandja 24500fa3ca Remove redundant validation for redirect-uri
Fixes gh-7706
2019-12-06 11:55:31 -05:00
Rob Winch 9c991a5430 Start Servlet Authentication Cleanup
Issue gh-7628
2019-12-06 10:52:38 -06:00
Joe Grandja 4d9cee116c Display general error message when WebFlux oauth2Login() fails
Issue gh-5562 gh-6484
2019-12-05 16:54:31 -05:00
Joe Grandja c40a17b4d1 WebFlux oauth2Login() redirects on failed authentication
Fixes gh-5562 gh-6484
2019-12-05 16:50:43 -05:00
Josh Cummings d102cae243
oidcLogin MockMvc Documentation
Remove documentation requiring a valid ClientRegistrationRepository

Issue: gh-7618
2019-12-02 22:49:17 -07:00
Josh Cummings 8c32d5fe48
Add oidcLogin WebFlux Test Support
Fixes: gh-7680
2019-12-02 22:28:24 -07:00
Josh Cummings bb8706977d
Polish DefaultOAuth2AuthorizedClientManager 2019-12-02 16:05:17 -07:00
Eleftheria Stein 55f1c695e1 Include security configuration context in test sample
Fixes: gh-7688
2019-12-02 10:13:24 +01:00
Alexey Nesterov d8d59e97ac Correctly configure authorization requests repository for OAuth2 login
To use custom ServerAuthorizationRequestRepository both OAuth2AuthorizationRequestRedirectWebFilter and
OAuth2LoginAuthenticationWebFilter should use the same repo provided in the configuration. Currently the former filter is
correctly configured, but the latter always uses default, WebSession based repository. So authorization code created
before redirect to authorization endpoint will never be found to complete OAuth2 login when custom
ServerAuthorizationRequestRepository is used.

This change also makes OAuth2Client and OAuth2Login authentication converters consistent.

Fixes gh-7675
2019-11-29 12:05:15 -05:00
Joe Grandja 65513f2e3b Polish OAuth2AuthorizedClientArgumentResolver 2019-11-28 09:48:01 -05:00
Joe Grandja 80f256e425 ServerOAuth2AuthorizedClientExchangeFilterFunction works with UnAuthenticatedServerOAuth2AuthorizedClientRepository
Fixes gh-7544
2019-11-28 09:48:01 -05:00
Joe Grandja 07b8aa0b1f DefaultReactiveOAuth2AuthorizedClientManager requires non-null serverWebExchange
Issue gh-7544
2019-11-28 09:48:01 -05:00
Eleftheria Stein b7cb93f671 Fix WebFlux logout disabling
Fixes: gh-7682
2019-11-28 14:40:25 +01:00
Ruslan Stelmachenko c38e57fa42 Fix class and variable names 2019-11-28 09:23:38 +01:00
Ruslan Stelmachenko 8ebc7ca0ea Fix InitializeAuthenticationProviderBeanManagerConfigurer Javadoc 2019-11-28 09:23:38 +01:00
Rob Winch af01fdce7e Fix security.tld 2019-11-27 10:20:00 -06:00
Rob Winch 17449cbf60 Fix next development version 2019-11-27 08:16:23 -06:00
Rob Winch a7871cfce4 Next Development Version 2019-11-27 08:06:16 -06:00
Rob Winch e5932131a9 Next Development Version 2019-11-27 08:05:44 -06:00
Filip Hrisafov 796859333f Log full failed authentication exception in BasicAuthenticationFilter 2019-11-27 14:56:24 +01:00
David Eisner 56f5242595 Fix minor typo. 2019-11-27 09:43:41 +01:00
Josh Cummings b35e18ff31
Add oidcLogin MockMvc Test Support
Fixes gh-7618
2019-11-26 16:12:06 -07:00