Commit Graph

944 Commits

Author SHA1 Message Date
Rob Winch fda0220fad Provide default reactive HttpSecurity
Fixes gh-4396
2017-06-15 13:00:19 -05:00
Rob Winch 9141a8a7c0 Add Multiple Reactive HttpSecurity
Fixes gh-4395
2017-06-15 13:00:19 -05:00
Rob Winch 406e1e6951 Extract out HttpSecurityConfiguration
Fixes gh-4394
2017-06-15 13:00:19 -05:00
stonio 335a01577a Typo "he" -> "the" 2017-06-15 12:47:41 -05:00
Rob Winch 30132892a0 Polish UserDetailsResourceFactoryBean Support
Issues: gh-4380 gh-4381 gh-4382
2017-06-13 15:15:21 -05:00
Rob Winch 337317a060 WebFlux now uses ParsingPathMatcher
Fixes gh-4388
2017-06-09 22:25:45 -05:00
Rob Winch 6428cb411e Add UserDetailsRepositoryResourceFactoryBean
Add the ability to easily create a UserDetailsRepository from a Properties
in the standard Spring Security user format.

Fixes gh-4382
2017-06-09 16:07:18 -05:00
Rob Winch 4cb77e5386 Add UserDetailsManagerResourceFactoryBean
Add the ability to easily create a UserDetailsManager from a Properties
in the standard Spring Security user format.

Fixes gh-4381
2017-06-09 16:07:18 -05:00
Rob Winch 256d14ede0 Add UserDetailsResourceFactoryBean
Add the ability to create a Collection<UserDetails> from a Properties
Resource using the standard Spring Security user format.

Fixes gh-4380
2017-06-09 16:07:18 -05:00
Rob Winch d09fb5b500 Move UserDetailsRepository to core.userdetails
Fixes gh-4383
2017-06-09 16:07:09 -05:00
Joe Grandja 6c0ecea494 Use java.util.Function instead of Converter
Fixes gh-4323
2017-06-01 17:25:39 -04:00
Rob Winch e5eda24054 Add ServerWebExchangeMatcherEntry 2017-05-31 16:13:20 -05:00
Joe Grandja 68368c87ca Resolve compile errors -> WebTestClient methods removed
Fixes gh-4355
2017-05-25 11:14:29 -04:00
Rob Winch bc141febdb Demo mock support with RouterFunction 2017-05-23 16:29:30 -05:00
Thomas Darimont 9e6b10ce46 Fix JavaDoc for HeadersConfigurer
Corrected copy-paste error.
2017-05-22 00:32:19 +02:00
Rob Winch 247635ed92 WebFluxSecurityConfiguration defaults HTTP Basic
Fixes gh-4346
2017-05-19 21:50:06 -05:00
Rob Winch 1cec497a50 Add method chaining for AuthorizeExchangeBuilder
Fixes gh-4345
2017-05-19 21:25:50 -05:00
Rob Winch 0428cdd934 Add @EnableWebFluxSecurity
Fixes gh-4344
2017-05-19 21:11:42 -05:00
Rob Winch d81b436e5d Remove pom.xml from build
Gradle is easy enough to import into IDEs, so pom.xml should no
longer be necessary.

This commit removes the pom.xml files from the build.

Fixes gh-4283
2017-05-11 14:32:36 -05:00
Vedran Pavic 85719fcd64 Use Base64 implementation provided by Java 8 2017-05-10 00:27:36 -05:00
Rob Winch b4f2777755 Add WebFlux
Fixes gh-4128
2017-05-10 00:13:02 -05:00
Joe Grandja 829c386756 Add support for OAuth 2.0 Login
Fixes gh-3907
2017-04-28 10:58:59 -04:00
Rob Winch dd6fc48dd8 Standardize Build
The build now uses spring build conventions to simplify the build

Fixes gh-4284
2017-04-21 10:55:05 -05:00
Rob Winch 5a65da400d Use ReflectionTestUtils rather than Whitebox
This is better because it no longer uses Mockito's internal API

Fixes gh-4305
2017-04-21 10:54:58 -05:00
Joe Grandja 2ce174dbf0 Update poms to 5.0.0.BUILD-SNAPSHOT 2017-04-07 16:49:50 -04:00
Rob Winch d2524eadfc Update poms to new to SNAPSHOT version 2017-03-02 09:20:34 -06:00
Spring Buildmaster 081f0c4d94 Release version 4.2.2.RELEASE 2017-03-02 07:29:42 +00:00
Rob Winch f3edaa673a Fix SecurityNamespaceHandler Version Error Message
Fixes gh-4210
2017-03-02 00:25:51 -06:00
Joris Kuipers 546d44d6e7 Fix NPE in WebSocketMessageBrokerSecurityBeanDefinitionParser
Fixes gh-4112
Closes gh-4194
2017-03-01 23:58:02 -06:00
Kazuki Miyahara 2ac51c9c7f Fix class name in comment 2017-03-01 23:31:32 -06:00
Rob Winch 9c03571bbb Use message in all Assert
This ensures compatibility with Spring 5.

Fixes gh-4193
2017-01-30 19:58:24 -06:00
Spring Buildmaster 7a7ce11ebb Release version 4.2.1.RELEASE 2016-12-21 17:23:28 +00:00
Rob Winch fc516b55a6 Fix Build Against Spring 5.0.0.BUILD-SNAPSHOT
Change Bean definition to static to avoid SPR-12646

Fixes gh-4150
2016-12-08 15:54:46 -06:00
Johnny Lim f94399cff9 Polish 2016-11-17 09:49:41 -06:00
Spring Buildmaster 24fcb6c45a Release version 4.2.0.RELEASE 2016-11-09 23:42:11 +00:00
Eddú Meléndez 23294c4c57 Add Referrer-Policy header support
Fixes gh-4110
2016-11-08 13:21:35 -06:00
Spring Buildmaster 97b4cb0b73 Release version 4.2.0.RC1 2016-10-26 02:49:23 +00:00
Rob Winch df3b8bc284 Add Spring MVC test for override cache control
Issue gh-3975
2016-10-24 15:57:32 -05:00
Rob Winch f432c04111 Create UserBuilder
This commit creates a UserBuilder and updates samples to use it. We do not
leverate it for JdbcUserDetailsManager because it requires the schema to
be created which is difficult with a single bean definition and
unpredicatble ordering. For this, it is still advised to use
AuthenticationManagerBuilder

Fixes gh-4095
2016-10-21 16:42:03 -05:00
Rob Winch 94e580fe64 Add Support for Custom Default Configuration in Web Security
Fixes gh-4102
2016-10-19 16:15:56 -05:00
Rob Winch af9139b613 Add intercept-url@request-matcher-ref
Fixes gh-4097
2016-10-18 22:27:31 -05:00
Rob Winch f019ea89e7 Remove unused lowercase-comparisons from XSD
Fixes gh-3932
2016-10-18 22:27:28 -05:00
Rob Winch 0d700628dc Add spring-security-4.2.xsd to spring.schemas
Fixes gh-4098
2016-10-18 22:27:22 -05:00
Rob Winch aaa9708b95 Add BeanResolver to AuthenticationPrincipalArgumentResolver
Previously @AuthenticationPrincipal's expression attribute didn't support
bean references because the BeanResolver was not set on the SpEL context.

This commit adds a BeanResolver and ensures that the configuration
sets a BeanResolver.

Fixes gh-3949
2016-10-18 19:45:54 -05:00
Rob Winch badb466cc5 AuthenticationConfiguration imports ObjectPostProcessor
Fixes gh-4086
2016-10-17 20:00:27 -05:00
Rob Winch 1222fc5f10 XML ref to bean
Spring 5 removes ref XML attribute in favor of bean XML attribute. This
commit updates all the samples and tests to use bean instead of ref.

Issue gh-4080
2016-10-17 17:00:17 -05:00
Rob Winch 08c1f500a7 Version bumps for Spring 5
Issue gh-4080
2016-10-17 17:00:17 -05:00
Spring Buildmaster c1b8150439 Release version 4.2.0.M1 2016-09-23 19:39:33 +00:00
Rob Winch b443baef04 Polish GrantedAuthorityDefaults
* Move GrantedAuthorityDefaults to config module
* Move setting of default role into config module vs
  ApplicationContextAware

Issue gh-3701
2016-09-22 15:13:05 -05:00
Eddú Meléndez eabeaf35d6 Make single definition of `defaultRolePrefix` and `rolePrefix`
Previous to this commit, role prefix had to be set in every class
causing repetition. Now, bean `GrantedAuthorityDefaults` can be used to
define the role prefix in a single point.

Fixes gh-3701
2016-09-21 14:55:41 -05:00
Rob Winch 49f7c98c3e Fix headers@defaults-disabled=true with no children
Previously <headers defaults-disabled="true"/> would fail if there were
no children with an IllegalArgumentException. This allows using
defaults-disabled="true" and no children as an alias for disabled="true".

Fixes gh-3986
2016-09-19 14:53:51 -05:00
Fred Cooke 4cc899feab Fix Typo in Javadoc
Issue gh-4063
2016-09-19 10:09:48 -05:00
Rob Winch 6650429283 Polish SessionInformationExpiredStrategy
* Fix passivity and add tests
* Introduce SessionInformationExpiredEvent as a value object
* Rename ExpiredSessionStrategy to SessionInformationExpiredStrategy
  to account for the need of SessionInformation
* Switch to Constructor Injection
* Move the changes to the xsd to 4.2 xsd instead of 4.1

Issue gh-3808
2016-09-15 14:30:52 -05:00
Marten Deinum 67c9f12964 Configuration of session management strategies
This commit adds the possibility to configure the AuthenticationFailureHandler
of the SessionManagementFilter.

Fixes gh-3794
2016-09-15 11:10:36 -05:00
Marten Deinum b88418b94a Configuration of session management strategies
This commit adds an ExpiredSessionStrategy for the ConcurrentSessionFilter
analogous to the InvalidSessionStrategy for the SessionManagementFilter. It also
adds a configuration option for both the InvalidSessionStrategy and
ExpiredSessionStrategy to the XML namespace and Java configuration.

Fixes gh-3794
Fixes gh-3795
2016-09-15 11:10:17 -05:00
Rob Winch 4d02a5c0a0 Update pom.xml dependencies 2016-08-30 11:27:29 -05:00
Rob Winch c6366baee2 Remove MvcRequestMatcher.afterPropertiesSet()
The validation does not work due to restrictions within the servlet
container. Specifically we cannot access the servlets that are registered.

This commit reverts the validation logic for MvcRequestMatcher to determine
if servletPath is required.

Fixes gh-4027
2016-08-19 14:18:07 -04:00
novotnyr f8bfe19a98 Fix typo in autowiring warning (#4026)
Fixes a misleading message that warns about
PermissionEvaluator when MethodSecurityExpressionHandler
should be mentioned instead.

Fixes gh-3402
2016-08-16 08:39:49 -05:00
Rob Winch bb997eecde Fix defaultMethodExpressionHandler autowiring
Previously if a Bean for GlobalMethodSecurityConfiguration's
defaultMethodExpressionHandler was found on a Configuration that also
@Autowired a Bean that enabled method security, the Bean that was
@Autowired would not have security enabled.

This fixes the issue by delaying the lookup of Beans populated on
GlobalMethodSecurityConfiguration's defaultMethodExpressionHandler.

Fixes gh-4020
2016-08-10 23:48:07 -05:00
Joe Grandja e080905a79 MvcRequestMatcher servletPath Polish / XML Config
Fixes gh-4014
2016-08-09 16:29:30 -05:00
Rob Winch 3befb1c8a6 MvcRequestMatcher servletPath / JavaConfig
Issue: gh-3987
2016-08-09 16:29:30 -05:00
Rob Winch 519c15efb3 Logout is 204 for XMLHttpRequest
Fixes gh-3997
2016-08-02 11:26:52 -07:00
Rob Winch c23c7982ca Add ObjectPostProcessor support for SmartInitializingSingleton 2016-07-21 08:59:17 -05:00
Rob Winch ca170f8479 DummyRequest supports methods for MvcRequestMatcher
To support MvcRequestMatcher DummyRequest needs to support
getCharacterEncoding() and getAttribute(String)
2016-07-14 14:18:31 -05:00
Rob Winch ada146244e Add HttpSecurity.mvcMatcher
Fixes gh-3970
2016-07-14 10:50:49 -04:00
Rob Winch 945e2e2ad4 Fix NPE requestMatchers().mvcMatchers
Fixes gh-3969
2016-07-14 10:50:49 -04:00
Marten Deinum 80ff267749 Check RememberMe in ExceptionTranslationFilter
This commit adds a check for rememberme to the ExceptionTranslationFilter.
Using this when someone isn't fully authenticated he will be prompted with a
login screen and after that will be redirected to the original requested URI.

Fixes gh-2427
2016-07-13 16:58:00 -04:00
Eddú Meléndez 1effc1882a Add CompositeLogoutHandler
Fixes gh-3895
2016-07-08 13:30:38 -05:00
Rob Winch 885f074ddf Fix XsdDocumentedTests 2016-07-07 15:05:04 -05:00
Rob Winch e297706e8b Polish allow unlimitted sessions
Update the rnc file

Issue gh-3900
2016-07-07 14:31:40 -05:00
Michael J. Simons e3ff4130a5 Allow negative values to configure unlimited sessions 2016-07-07 14:29:18 -05:00
Rob Winch 50d7d3287f Add spring-security-4.2.xsd 2016-07-07 14:19:01 -05:00
Eddú Meléndez 13b0ddb7e6 Fix test assertions 2016-07-07 13:29:00 -05:00
Spring Buildmaster 919f000c80 Release version 4.1.1.RELEASE 2016-07-07 00:57:35 +00:00
Johnny Lim 310bb39a0d Fix typo 2016-07-06 16:22:33 -05:00
Rob Winch 764a4d8414 Fix Error Message typo
Fixes gh-3953
2016-07-06 16:19:29 -05:00
Jakob Englisch b17870ee07 LogoutConfigurer: only allow suitable http methods 2016-07-06 16:17:11 -05:00
Rob Winch e4c13e3c0e Add MvcRequestMatcher
Fixes gh-3964
2016-07-06 15:47:23 -05:00
Rob Winch 13bc70f693 Add CorsFilter support 2016-07-05 14:28:04 -05:00
Rob Winch c935d857eb Add mvc namespace to XmlApplicationContext 2016-07-01 22:04:55 -05:00
Rob Winch 7f3b3a8b59 Polish
Issue gh-180
2016-07-01 13:17:52 -05:00
Rob Winch bd5f71bb0d Polish
Fix checkstyle for LDAP JavaConfig Authority mapping

Issue gh-2768
2016-06-21 17:08:37 -05:00
Tony Dalbrekt b76e3be822 LDAP Java Config supports GrantedAuthoritiesMapper
Fixes gh-2768
2016-06-21 16:43:13 -05:00
Rob Winch 26ad1cb4a5 Polish RememberMe Validation
Issue gh-3909
2016-06-21 14:57:15 -05:00
Eddú Meléndez 87224f62e4 RememberMe JavaConfig Validation
Add validation when rememberMeServices and rememberMeCookieName are
provided

Fixes gh-3909
2016-06-21 14:57:01 -05:00
Rob Winch 66858e22ad Disable XMLHttpRequest for formLogin entry point
Previously the following:

http http://localhost:8080/user \
  "X-Requested-With:XMLHttpRequest" "Accept:text/plain"

Produced a 302 instead of a 401

Fixes gh-3887
2016-06-20 15:30:00 -05:00
Eddú Meléndez 39ed7d0eca Propagate rolePrefix to LdapAuthoritiesPopulator
Previous to this commit, custom rolePrefix was not propagated to
LdapAuthoritiesPopulator populating  a wrong authority. Now, rolePrefix
is propagated and the authority is as expected.

Fixes gh-3921
2016-06-20 12:44:02 -05:00
Eddú Meléndez a2ead4cf7a Polish
Fixes gh-3892
2016-06-20 12:35:43 -05:00
Rob Winch 2d6051625f Update pom.xml 2016-06-17 14:30:11 -05:00
Rob Winch 477573b3bc Fix @EnableGlobalAuthentication & method seucrity on @Configuration class
Fixes gh-3934
2016-06-17 14:05:11 -05:00
Rob Winch fa1c484587 AuthenticationConfiguration.getAuthenticationManager() supports recursion
AuthenticationConfiguration.getAuthenticationManager() now supports
recursion. This is necessary in instances where something using
@EnableGlobalAuthentication requires an object using method level security.

Fixes gh-3935
2016-06-17 14:02:36 -05:00
Rob Winch 9e3d2e2d99 HTTP Basic default logout ignores text/html
This fixes an issue where Chrome sends an accept header of application/xml
which triggers an HTTP 204 to be returned

Fixes gh-3902
2016-06-14 16:27:56 -05:00
Sola d3b3f8e004 Fix WebSecurityConfigurerAdapter Javadoc
The constructor's Javadoc was incorrect. This commit
fixes it.
2016-05-23 08:12:50 -05:00
Spring Buildmaster 001b05569a Release version 4.1.0.RELEASE 2016-05-05 04:25:46 +00:00
Joe Grandja e68d8bfaea Clarifies sessionAuthenticationStrategy setter
Fixes gh-234
2016-05-02 13:21:58 -05:00
Joe Grandja 491abf2600 Revert "Fix test for SessionManagementConfigurer"
This reverts commit 17b25d1477.

Issue gh-234
2016-05-02 13:21:58 -05:00
Joe Grandja 0d2b797c2a Revert "Fix sessionAuthenticationStrategy setter"
This reverts commit 8f5d46ad68.

Issue gh-234
2016-05-02 13:21:58 -05:00
Joe Grandja 17b25d1477 Fix test for SessionManagementConfigurer
Fixes gh-234
2016-04-21 16:50:03 -04:00
didiez 8f5d46ad68 Fix sessionAuthenticationStrategy setter
sessionAuthenticationStrategy was setting sessionFixationAuthenticationStrategy instead

Fixes gh-234
2016-04-21 16:21:54 -04:00
Spring Buildmaster 24d0069668 Release version 4.1.0.RC2 2016-04-21 01:47:25 +00:00
Rob Winch 7fe0a135ec Default AntPathRequestMatcher to be case sensitive
Issue gh-3831
2016-04-20 13:29:18 -05:00
Rob Winch 510cd59980 Default logout negotiation in Java Configuration
This commit adds content negotiation for log out.

Fixes gh-3282
2016-04-20 10:59:14 -05:00
Rob Winch 51995dc187 Add Java Configuration InvalidSessionStrategy (#3827)
Allow configuring the InvalidSessionStrategy in Java Configuration.

Fixes gh-3371
2016-04-20 09:59:27 -04:00
Rob Winch a5a8aeb550 Message SecurityExpressionHandler is post processed (#3820)
Previously the SecurityExpressionHandler for message based configuration
did not have a beanResolver set.

This commit post processes the default message SecurityExpressionHandler
to ensure the beanResolver is set.

Fixes gh-3797
2016-04-19 13:21:58 -04:00
Rob Winch c872a77ad1 RoleHiearchy Bean used in GlobalMethodSecurity (#3394)
Previously it required quite a bit of extra work to use RoleHiearchy
within Java Based Spring Security configuration.

Now if a single RoleHiearchy Bean is defined it will automatically
be picked up and used by method security.

Fixes gh-3394
2016-04-19 12:47:38 -04:00
Johnny Lim 933a7e8363 Remove duplicate words
Fixes gh-3826
2016-04-18 23:21:20 -05:00
Rob Winch fb5776cb5c Support Camel case URI variables (#3814)
Perviously there were issues with case insenstive patterns and URI
variables that contained upper case characters. For example, the pattern
"/user/{userId}" could not resolve the variable #userId Instead it was
forced to lowercase and #userid was used.

Now if the pattern is case insensitive then so is the variable. This means
that #userId will work as will #userid.

Fixes gh-3786
2016-04-18 17:54:48 -04:00
Matthias Merdes b6800bdb4d Update ExpressionUrlAuthorizationConfigurer Error Message
Update error message
2016-04-14 15:33:48 -05:00
Rob Winch 59db9413aa Add SpEL Bean reference test (#3815)
Issue gh-3797
2016-04-14 12:11:40 -05:00
Rob Winch 6f169267c4 HttpSecurity comparitor->comparator
Rename HttpSecurity's comparitor to comparator

Fixes gh-3810
2016-04-13 15:04:22 -05:00
Rob Winch a7fb6d2e58 Add HttpSecurity.addFilterAt (#3809)
Fixes gh-3784
2016-04-13 16:01:25 -04:00
Rob Winch d3a9cc6eae Add CsrfTokenRepository (#3805)
* Create LazyCsrfTokenRepository

Fixes gh-3790

* Add CookieCsrfTokenRepository

Fixes gh-3009
2016-04-12 17:26:53 -04:00
Leon Radley b82df4ecf3 Add alwaysRemember to RememberMe Java Config
Allow setting alwaysRemember from RememberMeConfigurer

Fixes gh-180
2016-04-12 13:37:44 -05:00
Jeffrey Walraven bd0c8a7baa Fix HttpSecurity logout JavaDoc
Removed error provoking extra logout() from example code
2016-04-12 13:24:40 -05:00
Johnny Lim fe94d654ed Fix typos (#228) 2016-04-12 11:11:51 -05:00
Nicolai Ehemann c57dba6b77 Fix typo in setMessageExpessionHandler (#3803) 2016-04-12 11:08:52 -05:00
Joe Grandja b90242f2fa Updates all POM versions to 4.1.0 snapshot build.
Fixes gh-3804
2016-04-12 10:35:43 -04:00
Quinten De Swaef d05fe8ec07 Fix typo in xsd
Fixes gh-3229
2016-04-05 09:47:48 -05:00
Spring Buildmaster 044acf7e27 Release version 4.1.0.RC1 2016-03-23 07:15:15 -07:00
Joe Grandja 2f7f2ff589 Adds support for Content Security Policy
Fixes gh-2342
2016-03-22 21:59:13 -05:00
Rob Winch 4b650dc58d Allow AuthenticationProvider Bean in Java Config
This commit adds support for defaulting java configuration's
authentication by providing an AuthenticationProvider Bean.

Fixes gh-3091
2016-03-22 16:17:25 -05:00
Rob Winch 533a5f0905 Fix <password-encoder> when authentication-manager@id specified
When <authentication-manager> specifies an id, the <password-encoder> is
not used because the parser changes the bean id without aliasing it to
BeanIds.AUTHENTICATION_MANAGER which is used by
AuthenticationManagerBeanDefinitionParser to look up the
AuthenticationManager bean.

This commit updates AuthenticationManagerBeanDefinitionParser to ensure
there is an alias to BeanIds.AUTHENTICATION_MANAGER when the id is
specified.

Fixes gh-3296
2016-03-21 22:48:49 -05:00
Rob Winch 7bf014f678 Path Variables fail with different case
Fixes gh-3329
2016-03-21 10:09:50 -05:00
Rob Winch cf66487d3a Add Java Configuration Test
Issue SEC-2256
2016-03-18 14:03:47 -05:00
Eddú Meléndez 41c6a797c3 Add RememberMeConfigurer set domain
Fixes gh-3408
2016-03-17 08:30:18 -05:00
Rob Winch ec4e6c7453 Update pom.xml to 4.1.0.BUILD-SNAPSHOT 2016-03-14 00:51:35 -05:00
Rob Winch f221920a19 Clean up code to conform to basic checkstyle
Issue gh-3746
2016-03-14 00:15:12 -05:00
Rob Winch 35eff94e3d Add Both Config names to duplicate WebSecurityConfigurer order
Previously the error message when multiple WebSecurityConfigurer with the
same Order did not include both WebSecurityConfigurer classes that were
involved in the duplicate Order. This made resolving errors difficult.

This commit ensures both WebSecurityConfigurers are include in the error
message.

Fixes gh-3380
2016-03-11 12:12:55 -06:00
Shazin Sadakath e33e21fe6b Add Forward after authentication attempt config support
Fixes gh-3728
2016-03-11 10:49:30 -06:00
Rob Winch 5d6e8bc3c8 Remove SPR-11251 workaround from WebSecurityConfiguration
Fixes gh-3348
2016-03-09 16:48:24 -06:00
Rob Winch be36ddb614 Some formatting fixes for HttpSecurity Javadoc 2016-03-09 16:45:43 -06:00
Rob Winch 2f4610e8b7 Update HttpSecurity.requestMatcher() Javadoc
Fixes gh-3365
2016-03-09 16:45:29 -06:00
Billy Korando 71d4ce96ad Convert to assertj
Fixes gh-3175
2016-03-09 14:30:17 -06:00
Rob Winch bb600a473e Start AssertJ Migration
Issue gh-3175
2016-03-09 14:26:30 -06:00
Rob Winch 3164bd6f8d Polish Sorting ObjectPostProcessor
* Add Test
* Only sort on adding new entry

Issue gh-3572
2016-03-08 15:51:13 -06:00
Wallace Wadge a366489c3c Sort ObjectPostProcessors prior to invoking them
Fixes gh-3572
2016-03-08 10:39:56 -06:00
Rob Winch db81977a1a Polish HPKP
* Javadoc polish
* Whitespace cleanup

Issue gh-3706
2016-03-03 15:11:40 -06:00
Tim Ysewyn 331c7e91b7 HTTP Public Key Pinning
HTTP Public Key Pinning (HPKP) is a security mechanism which allows HTTPS websites
to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates.
(For example, sometimes attackers can compromise certificate authorities,
 and then can mis-issue certificates for a web origin.)
The HTTPS web server serves a list of public key hashes, and on subsequent connections
clients expect that server to use 1 or more of those public keys in its certificate chain.

This commit will add this new functionality.

Fixes gh-3706
2016-03-03 14:21:46 -06:00
Rob Winch 337f1885ea SEC-3170: Polish
* Prevent a null LogoutHandler from being set when RememberMeServices
does not implement LogoutHandler
* Fix test which invoked Mock from outside spock which failed
* Add explicit test for adding null LogoutHandler to
RememberMeConfigurer
2015-12-15 09:50:54 -06:00
Nikos Kastamoulas b28c62a6fe SEC-3170: Null check for Java Config of RememberMeServices
Added a null check in LogoutConfigurer.addLogoutHandler() method to
ensure that a logout handler is always provided..
2015-12-15 09:50:54 -06:00
William Gorder 1182d35d3c SEC-3159: Fix Javadoc
The HttpSecurity#headers() Javadoc did not accurately reflect changes made to the
HeadersConfigurer in Spring Security 4.x.
2015-11-21 19:39:15 -05:00
Kazuki Shimizu 205ef42cfb SEC-3147: Add error parameter for default authentication-failure-url 2015-11-12 15:00:21 -06:00
Rob Winch 53f85e2151 SEC-2848: LogoutConfigurer allows setting clearAuthentication 2015-10-30 13:54:01 -05:00
Rob Winch 15b4406015 SEC-3135: antMatchers(<method>,new String[0]) now passive 2015-10-30 10:08:42 -05:00
Rob Winch 6f1bb705ac SEC-3135: antMatchers now allows method and no pattern
Previously, antMatchers(POST).authenticated() was not allowed. Instead
users had to use antMatchers(POST, "/**").authenticated().

Now we default the patterns to be "/**" if it is null or empty.
2015-10-29 12:48:29 -05:00
Rob Winch f76bf96e14 SEC-3132: securityBuilder cannot be null
If a custom SecurityConfiguererAdapter applies another
SecurityConfigurerAdapter it caused an error securityBuilder cannot be null.

This commit fixes this.
2015-10-23 10:27:09 -05:00
Rob Winch b9f8af3096 SEC-3063: rm ConditionalOnMissingBean for @Primary
ConditionalOnMissingBean can only work in a Spring Boot environment. This
means this approach is flawed.

Instead users that wish to override requestDataValueProcessor can use
@Primary.
2015-10-21 15:40:43 -05:00
izeye 8baafbb2f2 SEC-3116: Polish WebSecurity Javadoc 2015-10-01 15:50:22 -05:00
zhanhb 29f2cc0ab1 snasphot -> snapshot 2015-09-25 15:28:39 -05:00
Rob Winch bac980cbcb SEC-2868: Simplify custom UserDetailsService Java Config
Exposing a UserDetailsService as a bean is now all that is necessary
for Java based configuration. Additionally, an optional PasswordEncoder
bean can be used to configure password encoding.
2015-08-27 20:41:15 -05:00
Rob Winch 6b05b298ff SEC-2059: Support Path Variables in Web Expressions 2015-08-20 17:11:01 -05:00
Rob Winch cbed1d75ee SEC-3076: Add Method Level Security Meta Annotations 2015-08-19 16:07:03 -05:00
Rob Winch 41c9431fcc Test that form log in requires CSRF 2015-08-03 12:24:37 -05:00
Rob Winch 453e6332da Fix indentation of CsrfConfigTests 2015-08-03 12:03:05 -05:00
Rob Winch 969f3a7d1b Update pom.xml to latest snapshots 2015-08-03 09:46:01 -05:00
Thomas Darimont ad1d858e2b SEC-3056 - Fix JavaDoc errors.
Fixed JavaDoc errors accross multiple modules in order to make javadoc happy with Java 8.
2015-08-03 08:02:24 -05:00
Rob Winch dab4cf18b8 SEC-3032: Correct documented logout-success-url default 2015-07-22 13:48:07 -05:00
Rob Winch e8c9f75f9c Update pom.xml to latest versions 2015-07-22 12:51:04 -05:00
Rob Winch 07fb2af74b SEC-3011: AbstractUrlAuthorizationConfigurer postProcess default AccessDecisionManager 2015-07-21 08:52:36 -05:00
Rob Winch ab1b7a1eb6 Remove unnecessary @SuppressWarnings 2015-07-21 08:51:32 -05:00
Rob Winch 9654df2cc3 SEC-3045: Conditionally add MethodSecurityMetadataSourceAdvisor 2015-07-17 15:16:09 -05:00
Rob Winch a3df41b380 Clean Import Statements 2015-07-17 14:52:23 -05:00
Rob Winch 0e36f85dab SEC-3019: Java Config for Http Basic supports Rememberme 2015-07-16 11:12:44 -05:00
Rob Winch 474d624e8e SEC-2988: Renamed OnBeanCondition.java to OnMissingBeanCondition.java 2015-07-13 22:51:45 -05:00
Rob Winch 64938ebcfc SEC-2996: Suport configuring SecurityExpressionHandler<Message<Object>> 2015-07-13 22:45:35 -05:00
Stijn ca0ffb8b5d SEC-2948: Fix error message for wrong xsd schema
When using the wrong xsd schema < 4.0 a message was shown that the
schema needed to be version 3.2.

In reality this schema had to be version 4.0.
2015-07-09 23:17:16 -05:00
Rob Winch 1f74ac811e Fix Spring IO Tests 2015-07-08 11:09:29 -05:00
Rob Winch 197ddb3cd1 SEC-3029: Fix Compatibility with Spring 4.2.x 2015-07-07 22:46:31 -05:00
Alex Panchenko 0a118336d4 SEC-2955: Convert to "static" for inner classes 2015-04-30 12:54:52 -05:00
Rob Winch f1352ba492 SEC-2942: Add test EnableWebSecurity supports AuthenticationPrincipal 2015-04-23 16:34:04 -05:00
Rob Winch f548d89b27 SEC-2932: SecurityContextConfigurer defaults SecurityContextRepository 2015-04-22 16:50:51 -05:00
Rob Winch 09acc2b7a5 SEC-2962: SecurityContextHolderAwareRequestFilter default rolePrefix 2015-04-21 11:42:48 -05:00
Rob Winch 38e2e23b86 Fix indentation of InterceptUrlConfigTests 2015-04-21 09:38:17 -05:00
Rob Winch d5dfeeca49 SEC-2927: Update chat-jc pom so Maven Builds
Previously there were some incorrect dependency versions. This commit fixes
that.

We added dependencyManagement for Spring Framework and corrected
Thymeleaf and embedded redis versions.
2015-04-20 15:53:26 -05:00
Rob Winch 0bfbd2923a SEC-2915: Fix defaut login page tests with tabs 2015-04-17 12:13:44 -05:00
Rob Winch 4fdfb8caba SEC-2915: More Tabs -> Spaces 2015-04-17 11:34:34 -05:00
Rob Winch 5fa5630bc3 Polish ordering of Config and test in NamespaceRememberMeTests
The convention is to put the config just below the test.

This commit fixes the convention for NamespaceRememberMeTests
2015-04-17 11:20:39 -05:00
Kazuki Shimizu 0c77c2071b SEC-2880: Add a setter method to override the cookie name of remember-me 2015-04-17 11:14:58 -05:00
Rob Winch ec89fdcfaa SEC-2919: Polish
Remove now unnecessary AuthenticationConfig.Builder#getLoginFormUrl
method.
2015-04-17 11:12:08 -05:00
Rob Winch 052bd32f40 SEC-2919: DefaultLoginPageGeneratingFilter disabled when login-page specified 2015-04-17 11:12:08 -05:00
Rob Winch 4ca936bb76 SEC-2913: Polish 2015-03-25 21:18:12 -05:00
Rob Winch 6c541468f6 SEC-2913: Post Process default session fixation AuthenticationStrategy
Before the default session fixation AuthenticationStrategy used a
NullEventPublisher when using the Java Configuration. This was due to the
fact that it is not exposed as a Bean and is not post processed.

We now post process the default session fixation AuthenticationStrategy
which initializes the EventPublisher properly.
2015-03-25 21:11:52 -05:00
Rob Winch 7b25b3e40d SEC-2864: Default Spring Security WebSocket PathMatcher XML Namespace 2015-03-25 16:32:03 -05:00
Rob Winch db531d9100 SEC-2917: Update to Spring 4.1.6 2015-03-25 15:18:59 -05:00
Rob Winch 57b06fb0b5 SEC-2864: Default Spring Security WebSocket PathMatcher 2015-03-25 13:14:15 -05:00
Rob Winch c94a5cf8e2 SEC-2916: disable-url-rewriting=true by default 2015-03-25 13:14:15 -05:00
Rob Winch ae6af5d73c SEC-2915: Updated Java Code Formatting 2015-03-25 13:09:18 -05:00
Rob Winch 0a2e496a84 SEC-2915: groovy/gradle spaces->tabs 2015-03-25 13:08:59 -05:00
Rob Winch cf9f58a4ac SEC-2915: XML spaces->tabs 2015-03-25 13:08:52 -05:00
Rob Winch fbf3672eca SEC-2908: mulitple invocations of http.requetMatchers() properly chains 2015-03-20 15:30:19 -05:00
Rob Winch e776a1fd35 SEC-2803: Add HttpStatusEntryPoint 2015-03-11 14:45:59 -05:00
Rob Winch bed20db905 Remove Unnecessary @Override 2015-02-27 16:18:31 -06:00
Romain Fromi 8b78194f31 SEC-2876: HttpSecurityBuilder addFilterAfter javadoc before->after 2015-02-24 22:19:50 -06:00
Michael Cramer c8b79289c9 add setter for using a custom name for the rememberMeParameter 2015-02-24 21:45:23 -06:00
Rob Winch 5f57e5b0c3 SEC-2873: Remember Me XML Configuration Defaults Should Match Java Config 2015-02-24 20:49:56 -06:00
Kazuki Shimizu 67cd8465c3 SEC-2826: Add remember-me-cookie attribute in xml namespace 2015-02-24 17:54:54 -06:00
Rob Winch d2fd852711 SEC-2832: Fix config tests 2015-02-24 17:53:39 -06:00
Rob Winch 2bf4f28db9 Fix .properites user 2015-02-24 16:25:24 -06:00
Rob Winch df96e5573f Add test .properties Authentication Java Config 2015-02-24 16:14:15 -06:00
Rob Winch 37740cd020 SEC-2861: Add WebSocket Documentation & Sample 2015-02-24 10:29:47 -06:00
Rob Winch b9563f6102 SEC-2830: Cleanup disabling Same Origin SockJS
- Defaults for properties false
- Add XML Namespace support
2015-02-24 10:28:33 -06:00
Rob Winch b9e2a57131 SEC-2854: Add intercept-message@message-type 2015-02-20 11:43:16 -06:00
Rob Winch fea03536d6 SEC-2853: Rename WebSocket XML Namespace elements 2015-02-20 11:43:15 -06:00
Rob Winch 706e7fd7a2 SEC-2863: Update to Spring 4.1.5 2015-02-20 11:43:04 -06:00
Rob Winch fb085cae25 Add session-management@session-fixation-protection=none test 2015-02-19 13:01:59 -06:00
Rob Winch 6a8475adbb SEC-2830: Provide Same Origin support for SockJS 2015-02-18 11:21:02 -06:00
Rob Winch a27c33754c SEC-2859: Add CsrfTokenArgumentResolver 2015-02-18 10:51:30 -06:00
Rob Winch 36fe0d0357 SEC-2845: SecurityContextChannelInterceptor support anonymous 2015-02-18 10:00:22 -06:00
Rob Winch c4fe630f8e SEC-2846: Security HTTP Response Headers Configuration Cleanup 2015-02-10 10:36:00 -06:00
Rob Winch 9b5f76f3d6 SEC-2833: Rossen's feedback on WebSocket 2015-02-04 10:43:12 -06:00
Rob Winch 72e256b95a Fix unchecked warning in AbstractSecurityWebSocketMessageBrokerConfigurer 2015-02-04 10:43:12 -06:00
Michael Oberwasserlechner 55fde81a0f SEC-2838 2015-01-31 11:04:55 +01:00
Rob Winch 6627f76df7 SEC-2758: Make ROLE_ consistent 2015-01-29 17:08:43 -06:00
Rob Winch 414f98bee0 SEC-2827: Clean up MessageMatcher Ambiguities 2015-01-23 17:29:54 -06:00
Rob Winch 5b0f8918ce Fix Eclipse import 2015-01-23 17:29:54 -06:00
Rob Winch 1e5f7023c6 SEC-2822: Make EnableGlobalAuthenticationAutowiredConfigurer static Bean
This ensures that EnableGlobalAuthenticationAutowiredConfigurer is actually
used in newer versions of Spring. See SPR-12646
2015-01-20 14:28:17 -06:00
Rob Winch 62649af0aa SEC-2815: Delay looking up AuthenticationConfiguration 2015-01-20 10:23:43 -06:00
Rob Winch 8f0001f59a Next Development Version 2014-12-11 20:39:26 -06:00
Spring Buildmaster 49b69196de Release version 4.0.0.RC1 2014-12-11 20:36:55 -06:00
Rob Winch 1677836d53 SEC-2790: Deprecate @EnableWebMvcConfig 2014-12-10 21:10:27 -06:00
Rob Winch 62e127e978 SEC-2789: Add Default WebSecurityConfigurerAdapter 2014-12-10 21:10:26 -06:00
Rob Winch 3171cc4364 SEC-2788: Add @Configuration as meta annotation to @Enable* annotations 2014-12-10 21:10:15 -06:00
Rob Winch 11116c2b80 SEC-2787: Update Versions 2014-12-10 16:37:19 -06:00
Rob Winch c67ff42b8a SEC-2783: XML Configuration Defaults Should Match JavaConfig
* j_username -> username
* j_password -> password
* j_spring_security_check -> login
* j_spring_cas_security_check -> login/cas
* j_spring_cas_security_proxyreceptor -> login/cas/proxyreceptor
* j_spring_openid_security_login -> login/openid
* j_spring_security_switch_user -> login/impersonate
* j_spring_security_exit_user -> logout/impersonate
* login_error -> error
* use-expressions=true by default
2014-12-08 15:09:15 -06:00
Rob Winch b56e5edbbd SEC-2784: Fix build plugins 2014-12-08 14:24:34 -06:00
Rob Winch 87a52ffbfd SEC-2784: Update to Gradle 2.2.1 2014-12-08 13:29:07 -06:00
Rob Winch 6e204fff72 SEC-2781: Remove deprecations 2014-12-04 15:28:40 -06:00
Rob Winch 5bb0ce9a8f SEC-2773: Add Test for static delegatingApplicationListener 2014-12-01 12:06:09 -06:00
Oliver Gierke 0f7c2e4128 SEC-2773: Prevent premature container initialization in WebSecurityConfiguration.
Changed the bean definition method for the DelegatingApplicationListener
to be static to avoid the need to instantiate the configuration class which
caused further premature initializations to satisfy the dependencies
expressed in setFilterChainProxySecurityConfigurer(…).
2014-12-01 11:38:19 -06:00
Rob Winch 2cb2657f5b SEC-2702: Clean WebSocket Namespace documentation 2014-11-25 12:27:29 -06:00
Rob Winch 8ad16b01f5 SEC-2702: Add WebSocket Security XML Namespace Support 2014-11-25 09:45:32 -06:00
Rob Winch 3c487c0348 SEC-2348: Update doc headers enabled by default with XML 2014-11-21 21:55:03 -06:00
Rob Winch 4392205f63 SEC-2347: CSRF Enabled by default w/ XML Config 2014-11-21 21:32:56 -06:00
Rob Winch eedbf44235 SEC-2348: Security HTTP Response Headers enabled by default w/ XML 2014-11-21 16:06:29 -06:00
Rob Winch dfa17bdb98 SEC-2747: Remove spring-core dependency from spring-security-crypto 2014-11-20 16:16:22 -06:00
Rob Winch 30c5788b8b SEC-1897: Remove raw types from AbstractAccessDecisionManager 2014-11-20 15:36:53 -06:00
Rob Winch 1cca72e6d8 SEC-2749: CsrfConfigurer.requireCsrfProtectionMatcher correct null check 2014-11-20 14:40:51 -06:00
Rob Winch 05882b5f24 SEC-2574: Polish
Handle null DelegatingApplicationListener
2014-11-19 17:09:24 -06:00
Rob Winch 5810681b06 SEC-2574: JavaConfig default SessionRegistry processes SessionDestroyedEvents 2014-11-19 16:48:19 -06:00
Rob Winch 24dec7ec3e SEC-2737: Remove WebSocket Outbound Authorization 2014-10-10 15:56:25 -05:00
Rob Winch 5ba8f000a7 SEC-2714: Add AuthenticationPrincipal resolver for messaging support 2014-09-23 16:28:48 -05:00
Rob Winch d2fa019fe5 SEC-2704: Separation of inbound and outbound security rules 2014-09-19 16:39:43 -05:00
Rob Winch 28446284a6 SEC-2713: Support authorization by SimpMessageType 2014-09-19 16:38:56 -05:00
Rob Winch 02c3565e22 Fix compiling in Eclipse 2014-09-16 10:18:46 -05:00
Nándor István Krácser a932d6ecf3 Removed unnecessary params from anyRequest()'s javadoc 2014-08-20 11:24:15 +02:00
Rob Winch b9df7ba01f SEC-2179: Allow customize PathMatcher for SimpDestinationMessageMatcher 2014-08-18 11:04:04 -05:00
Rob Winch 6321665353 SEC-2676: Update to Spring Data Evans RC1 2014-08-15 20:46:59 -05:00
Rob Winch 3f30529039 SEC-2179: Add Spring Security Messaging Support 2014-08-15 20:46:58 -05:00
Rob Winch 3187ee8bf3 SEC-2700: Register WithSecurityContextTestExecutionListener by default 2014-08-15 16:41:33 -05:00
Rob Winch 1f861f512a SEC-2676: Add SpEL Spring Security Integration 2014-07-29 20:04:37 -05:00