Commit Graph

1468 Commits

Author SHA1 Message Date
kostya05983 950e6422a1
Migrate DefaultFilters,Issue55Tests groovy->java
Issue gh-4939
2019-09-16 13:37:22 -06:00
Josh Cummings 101e0a21a8 Bearer WebClient Filter Authentication Propagation
Fixes: gh-7418
2019-09-11 16:27:21 +01:00
Rob Winch 96d44cd4b7 Add Default RSocketSecurity
Fixes gh-7361
2019-09-09 16:10:55 -05:00
Rob Winch 5d0815bc76 Allow RSocketMessageHandlerITests to timeout
Fixes gh-7415
2019-09-09 16:10:50 -05:00
Rob Winch 6296e6e896 RSocketSecurity delegates to correct matcher
Fixes gh-7414
2019-09-09 16:09:23 -05:00
Rob Winch 1b699a49fb Polish RSocket packaging
Fixes gh-7413
2019-09-09 16:07:14 -05:00
Eleftheria Stein aa533c2565 Add missing javadoc to session fixation 2019-09-06 16:33:51 -04:00
Rob Winch 316380e622 Allow Custom PayloadInterceptor to be Added
Fixes gh-7362
2019-09-06 14:52:47 -05:00
Joe Grandja a60446836b OAuth2AuthorizeRequest supports attributes
Fixes gh-7341
2019-09-05 21:04:25 -04:00
Filip Hanik 08d50868c9
Merge pull request #7260 from fhanik/feature/saml2-sp-mvp
Add SAML Service Provider Support
2019-09-05 17:04:14 -07:00
Filip Hanik e9a44bc0ce HttpSecurity.saml2login() - MVP Core Code
Implements minimal SAML 2.0 login/authentication functionality with the
following feature set:

  - Supports IDP initiated login at the default url of /login/saml2/sso/{registrationId}
  - Supports SP initiated login at the default url of /saml2/authenticate/{registrationId}
  - Supports basic java-configuration via DSL
  - Provides an integration sample using Spring Boot

Not implemented with this MVP

  - Single Logout
  - Dynamic Service Provider Metadata

Fixes gh-6019
2019-09-05 14:40:08 -07:00
Rob Winch 9639962e27 Fix RSocket Package Tangle
Issue gh-7360
2019-09-05 16:27:57 -05:00
Rob Winch 7ad641d106 RSocket Tests use Available Port
Issue gh-7360
2019-09-05 09:16:07 -05:00
Josh Cummings 26a65249f9
Remove invalid characters 2019-09-05 04:32:34 -06:00
Rob Winch 5a4eded696 Add RSocket Support
Fixes gh-7360
2019-09-04 19:24:01 -05:00
Joe Grandja dcd997ea43 Add support for Resource Owner Password Credentials grant
Fixes gh-6003
2019-09-04 14:07:45 -04:00
Josh Cummings de672e3ae9
Polish oauth2ResourceServer() Error Messaging
Fixes: gh-6876
2019-09-04 11:49:22 -06:00
Josh Cummings 1fc5b27fa2
Update LogoutConfigurerClearSiteData Tests
Issue gh-7347
2019-09-04 03:30:37 -06:00
Josh Cummings 068f4f0147 Polish Opaque Token
Use OAuth2AuthenticatedPrincipal
Use BearerTokenAuthentication
Update names to reflect more generic approach.

Fixes gh-7344
Fixes gh-7345
2019-09-03 15:58:05 -06:00
Eddú Meléndez 8773c7994f Allow to set default securityContextRepository for each authentication mechanisms
Fixes gh-7249
2019-09-03 07:46:59 -06:00
kostya05983 f6c650db47
Replace Streams with Loops
First version of replacing streams

fix wwwAuthenticate and codestyle

fix errors in implementation to pass tests

Fix review notes

Remove uneccessary final to align with cb

Short circuit way to authorize

Simplify error message, make code readably

Return error while duplicate key found

Delete check for duplicate, checkstyle issues

Return duplicate error

Fixes gh-7154
2019-09-02 15:30:48 -06:00
Josh Cummings d6d0d89ff8
NamespaceRememberMeTests groovy->java
Issue gh-4939
2019-09-02 13:08:21 -06:00
Josh Cummings bf5b693549
NamespaceHttpOpenIDLoginTests groovy->java
Issue gh-4939
2019-08-30 15:54:43 -06:00
Lars Grefer 95511331fa fix checkstyle 2019-08-26 22:42:26 +02:00
watsta 2c2e8e5f24 Remove internal Optional usage in favor of null checks
Issue gh-7155
2019-08-26 09:27:40 -04:00
Lars Grefer 34dd5fea30 Remove redundant throws clauses
Removes exceptions that are declared in a method's signature but never thrown by the method itself or its implementations/derivatives.
2019-08-23 01:03:54 +02:00
Joe Grandja 46756d2e6b Introduce Reactive OAuth2AuthorizedClient Manager/Provider
Fixes gh-7116
2019-08-21 14:12:38 -04:00
John Lin 9876b66f99
Polish GlobalMethodSecurityConfiguration
Initialize ExpressionBasedPreInvocationAdvice for
PreInvocationAuthorizationAdviceVoter only when needed.
2019-08-17 16:35:30 -06:00
Rob Winch 71444ff5dc RequestCache ignores multipart requests
Fixes gh-7060
2019-08-15 09:21:41 -05:00
Rob Winch 08ea2348d6 Polish RequestCache ignores multipart requests 2019-08-15 09:20:45 -05:00
Ahmed Sayed 1ab05dae02 added test 2019-08-14 21:35:34 +02:00
Rob Winch abc90280e0
Add unbounid support in xml
Add unbounid support in xml

Fixes gh-6011
2019-08-14 10:05:49 -05:00
Lars Grefer cb4f3d2f44 Use UTF-8 for Java sources and XML 2019-08-14 08:47:00 -05:00
Eddú Meléndez 2e63def05b Add tests 2019-08-14 00:56:26 -05:00
Eddú Meléndez 93142f3e30 Remove unboundid dependency 2019-08-13 20:39:25 -05:00
Eddú Meléndez c03fb701ce Improve logic to pick embedded server 2019-08-13 20:36:46 -05:00
Eddú Meléndez 3511c0ea4f Update xsd 2019-08-13 20:17:51 -05:00
Josh Cummings 4ed197e515 Rename OAuth2TokenIntrospectionClient
Renamed to OpaqueTokenIntrospector

Fixes gh-7245
2019-08-12 18:05:28 -04:00
Rob Winch c1db1aad91
Cleanup Code Style Issues
Cleanup Code Style Issues
2019-08-12 13:06:49 -05:00
Eddú Meléndez 9b2af944fa Add unbounid support in xml
Currently, spring-security provides apacheds integration by default. This
commit introduces a new `mode` in the `ldap-server` tag which allows to choose
beetween `apacheds` and `unboundid`. In order to keep backward compatibility
if `mode` is not set and apacheds jars are in the classpath apacheds is used
as a embedded ldap.

Fixes gh-6011
Currently, unboundid was added as a support for embbeded LDAP and it
is used on the Java Config. This commit introduces support from XML side.
Also, give the chance to users to move from apacheds to unboundid using
a new attribute `mode`.

Fixes gh-6011
2019-08-10 19:07:45 -05:00
Francesco Chicchiriccò 0410bac559 Add support for oauth2Login().securityContextRepository(...)
Fixes gh-7222
2019-08-10 15:56:20 -04:00
Lars Grefer ff1070df36 remove redundant modifiers found by checkstyle 2019-08-10 00:18:56 +02:00
Lars Grefer bbefc491b2 unused imports 2019-08-09 16:59:07 -05:00
Lars Grefer 38de737663 Java 8: Statement lambda can be replaced with expression lambda 2019-08-09 16:59:07 -05:00
Lars Grefer 3a5d8ba696 Java 8: Collections.sort() can be replaced with List.sort() 2019-08-09 16:59:07 -05:00
Lars Grefer 91c846756e Java 5: Unnecessary Boxing 2019-08-09 16:59:07 -05:00
Lars Grefer 578d628774 'Collection.toArray()' call style 2019-08-09 16:57:31 -05:00
Lars Grefer 40bee457f9 Unnecessary enum modifier 2019-08-09 00:42:07 +02:00
Lars Grefer eddcd1622f Type parameter extends Object
Reports any type parameters and wildcard type arguments explicitly declared to extend java.lang.Object.
2019-08-09 00:40:13 +02:00
Lars Grefer fb39d9c255 Anonymous type can be replaced with lambda 2019-08-08 17:09:09 -04:00
Lars Grefer 05f42a4995 Remove unused imports 2019-08-08 14:22:31 -04:00
Josh Cummings 65f6025cef
Polish OAuth2LoginConfigurer
Improve way of accessing ApplicationContext to ensure backward
compatibility.

Issue gh-7232
2019-08-07 13:25:38 -06:00
Josh Cummings a00ad37168
OAuth2LoginConfigurer UserService Beans
Fixes gh-7232
2019-08-07 10:58:23 -06:00
Lars Grefer f5cd0ec302 Use try-with-resources instead of try-finally 2019-08-06 15:33:04 -05:00
Lars Grefer 2056834432 Cleanup unnecessary unboxing
Unboxing is unnecessary under Java 5 and newer, and can be safely removed.
2019-08-06 10:17:38 -04:00
Lars Grefer 2306d987e9 Cleanup unnecessary boxing 2019-08-06 10:17:38 -04:00
Eddú Meléndez 2c836a171a Add authenticationFailureHandler method in OAuth2LoginSpec
Allow to customize the failure handler.

Fixes gh-7051
2019-08-05 14:09:11 -05:00
Lars Grefer 776a4c3760 Use org.mockito.ArgumentMatchers in favor of org.mockito.Matchers 2019-08-03 12:28:37 -04:00
Eddú Meléndez 50adb6abcb Fix javadoc 2019-07-31 15:36:30 -04:00
Sam Simmons e88c5c0eee Fix CSRF session authentication strategy since version 2019-07-31 07:45:51 -05:00
Ahmed Sayed 0591403dea ignore Multipart requests in HttpSessionRequestCache.requestMatcher 2019-07-31 12:17:55 +02:00
Eleftheria Stein 0b4502b2c5 Remove exceptions from lambda security configuration
Fixes: gh-7128
2019-07-30 08:31:37 -05:00
Joe Grandja c05b0765c1 Introduce OAuth2AuthorizedClient Manager/Provider
Fixes gh-6845
2019-07-25 11:12:54 -04:00
Eleftheria Stein 7e845409f1 Fix Javadoc for headers configurer methods
Fixes: gh-7123
2019-07-24 09:11:44 -04:00
Eleftheria Stein a288ce4b00 Support nested builder in DSL for reactive apps
Fixes: gh-7107
2019-07-23 15:57:10 -05:00
Eleftheria Stein d5e5ac0503 Add JavaDoc to reactive oauth2ResourceServer 2019-07-18 10:48:47 -04:00
Eleftheria Stein fbf6d22343 Add JavaDoc to reactive oauth2Login 2019-07-18 08:49:08 -04:00
Édouard Hue e8dd1325fd Fixed misleading OAuth2 error messages
Error messages sent by BearerTokenAccessDeniedHandler included
information about the scopes of the rejected token instead of
the scopes required by the resource.
* Removal of token scopes from error_description attribute.
* Removal of scope attribute from WWW-Authenticate response header.

Fixes gh-7089
2019-07-18 07:01:33 -04:00
Eleftheria Stein b153d92b23 Fix JavaDoc for formLogin in ServerHttpSecurity 2019-07-18 06:23:04 -04:00
Michael Vitz 09e8ae42ed Allow configuration of SessionAuthenticationStrategy for CSRF
Closes gh-5300
2019-07-16 07:47:13 -05:00
Rob Winch ea54d9014d
DSL nested builder for HTTP security
DSL nested builder for HTTP security

Fixes gh-5557
2019-07-12 16:09:19 -05:00
Eleftheria Stein 7961b819aa Allow configuration of session fixation and concurrency through nested builder
Issue: gh-5557
2019-07-12 13:53:55 -04:00
Clement Ng 28855e9cd6 Changed docs to reflect that init should apply configurers 2019-07-10 11:54:56 -05:00
Lars Grefer 3ea9d376b2 Cleanup explicit type arguments 2019-07-10 09:32:41 -05:00
Lars Grefer c5b5cc507c Cleanup redundant type casts 2019-07-10 09:31:09 -05:00
Eleftheria Stein 4b2539df10 Allow configuration of oauth2 resource server through nested builder
Issue: gh-5557
2019-07-09 16:11:26 -04:00
Eleftheria Stein 415760838f Allow configuration of oauth2 client through nested builder
Issue: gh-5557
2019-07-09 16:03:46 -04:00
Eleftheria Stein e47389e60b Allow configuration of oauth2 login through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein bf1bbd14e9 Allow configuration of openid login through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein c3dad06ea6 Allow configuration of request matchers through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein 1ad9f15e19 Allow configuration of requires channel through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein ae8e12f049 Allow configuration of anonymous through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein a5943fbafb Allow configuration of servlet api through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein 04e0dcfe61 Allow configuration of security context through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein 81d3cf1e7b Allow configuration of authorize requests through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein 1445d1b012 Allow configuration of request cache through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein fcb119b94e Allow configuration of remember me through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein ae9eb6f56b Allow configuration of x509 through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein bfc9538da1 Allow configuration of jee through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein 86f0f84740 Allow configuration of port mapper through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein 6fbea88e1e Allow configuration of session management through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein 6fd515813c Allow configuration of cors through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein a9a1f8ee53 Allow configuration of form login through nested builder
Issue: gh-5557
2019-07-09 15:37:28 -04:00
Eleftheria Stein 758397f102 Allow configuration of headers through nested builder
Issue: gh-5557
2019-07-09 15:35:37 -04:00
Eleftheria Stein 6986cf3ef3 Allow configuration of csrf through nested builder
Issue: gh-5557
2019-07-09 10:14:18 -04:00
Eleftheria Stein 1a31376dda Allow configuration of exception handling through nested builder
Issue: gh-5557
2019-07-09 10:14:18 -04:00
Eleftheria Stein 92314b0956 Allow configuration of logout through nested builder
Issue: gh-5557
2019-07-09 10:14:18 -04:00
Eleftheria Stein d66d895e60 Migrate ServletApiConfigurerTests groovy->java
Issue: gh-4939
2019-07-04 12:14:49 -04:00
Clement Ng 491da9db03 Added OAuth2TokenAttributes to wrap attributes
To simplify access to OAuth 2.0 token attributes

Fixes gh-6498
2019-07-02 07:45:56 -06:00
Josh Cummings ee8182dceb
NamespaceSessionManagementTests groovy->java
Issue: gh-4939
2019-07-02 07:34:36 -06:00