5705 Commits

Author SHA1 Message Date
Shannon Carey
9fa2c64737 Documentation SecurityConfig->WebSecurityConfig
Rename SecurityConfig to WebSecurityConfig in the documentation.

Fixes gh-153
2016-06-17 16:55:46 -05:00
Filip Hanik
6b436ff409 Avoid duplicate attribute search.
When using search-and-bind strategy, the user attributes are already returned in the first search.
If the user happens to not have privileges to perform a search, the second search may fail.
(user only has bind privileges)
See https://github.com/cloudfoundry/uaa/issues/342
2016-06-17 16:43:06 -05:00
Ruben Dijkstra
ca76e8d784 Remove null-check inside afterPropertiesSet() since it's never null 2016-06-17 16:40:39 -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
Rob Winch
e7fd6f6c3f Remove the CLA confirmation from template
We now use the new CLA tooling which automates this
2016-06-13 13:20:22 -05:00
Pedro Vilaça
208f898403 Improve csrf login caveats
Add a suggestion to retrieve a fresh csrf token right before the
form submission in order to avoid problems with invalid csrf tokens
due session timeouts.

Fixes gh-3925
2016-06-13 16:26:16 +01:00
Rob Winch
a7369bf71b Update to CLA tooling 2016-06-08 21:56:22 -05:00
Rob Winch
cf78793f8f Fixes for Documentation
Fixes for the Documentation
2016-05-31 21:40:21 -05:00
Ryan W. Moore
8aea83011d Docs: Remove broken link
I think the originally intended destination no longer exists in the
documentation.
2016-05-28 21:09:15 -04:00
Ryan W. Moore
fd65652bbe Docs: Fix broken link to security database schema 2016-05-28 21:09:15 -04:00
Ryan W. Moore
38e9f6a851 Docs: Fix broken link to csrfInput tag info
ID names are case sensitive.
2016-05-28 21:09:15 -04:00
Ryan W. Moore
cdb04c50e8 Docs: Fix broken link to websocket security info 2016-05-28 21:09:15 -04:00
Ryan W. Moore
057ea4fb17 Docs: Make 'Getting Started' a level 1 section heading
This fixes the following build error:

  asciidoctor: ERROR: index.adoc: line 26: invalid part, must have at least one
  section (e.g., chapter, appendix, etc.)
2016-05-28 21:09:01 -04:00
David Kane
503828c994 Add FAQ for JSP taglib & method security
Updated FAQ to clarify how the url attribute of the authorize tag
interacts with method security
2016-05-23 08:39:54 -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
Kim Saabye Pedersen
9fcfeaf225 BCryptPasswordEncoder validates strength
Fixes gh-3862
2016-05-20 14:54:26 -05:00
Rob Winch
101190ad8b Format WithSecurityContextTestExecutionListener 2016-05-20 10:46:26 -05:00
Rob Winch
336de35874 Polish WithSecurityContextTestExecutionListener
Extract method for reuse

SecurityContext createSecurityContext(AnnotatedElement annotated,
    WithSecurityContext withSecurityContext,
    TestContext context)

Issue gh-3888
2016-05-20 10:46:26 -05:00
Eddú Meléndez
a53d022312 Support WithSecurityContextFactory on superclass
Fixes gh-3888
2016-05-20 10:46:14 -05:00
Rob Winch
9f95bfdfc9 Fix documentation
CsrfTokenResolver -> CsrfTokenArgumentResolver

Fixes gh-3890
2016-05-18 15:10:50 -05:00
Pedro Vilaça
ea2b5dd412 Fix wrong class name reference in the docs
In the documentation, there was a reference to a class called CsrfTokenResolver
and it should CsrfTokenArgumentResolver

Fixes gh-3890
2016-05-18 20:26:20 +01:00
Rob Winch
7b61a44929 Fix test .standaloneSetup
Previously, Spring Security's test support did not work well with the
standalone setup. This was because the springSecurityFilterChain was not
found by the WebTestUtils.

This commit ensures that the springSecurityFilterChain is added as a
servlet attribute if it is explicitly defined. WebTestUtils can then
find the springSecurityFilterChain in the ServletContext.

Fixes gh-3881
2016-05-16 11:02:40 -04:00
Rob Winch
602bb457b8 Formatting
Issue gh-3881
2016-05-16 11:02:40 -04:00
Rob Winch
f363c62afd Document spring-security-test dependency
Fixes gh-3873
2016-05-16 10:56:50 -04:00
Joe Grandja
66980e827c Add Spring Boot Hello World guide
Add Spring Boot Hello World Guide

Fixes gh-3866
2016-05-13 14:05:29 -05:00
Adrien SAUVEZ
c261975be0 Set cookie domain for cancel remember-me
Fixes gh-3871
2016-05-13 13:34:43 -05:00
Rob Winch
ede521dc8d authorizeUrls -> authorizeRequests
Replace remaining authorizeUrls with authorizeRequests

Fixes gh-3875
2016-05-09 10:34:36 -05:00
Rob Winch
d4218c70f1 Update CookieCsrfTokenRepository docs to cookiHttpOnly=false
Currently CookieCsrfTokenRepository does not specify that the httpOnly
flag needs set to false. We should update the reference to include this
setting (and a comment about it) since it states that the settings will
work with AngularJS.

This commit updates the documentation and provides a convenience factory
method to create a CookieCsrfTokenRepository with cookiHttpOnly=false

Fixes gh-3865
2016-05-06 16:28:04 -04:00
Spring Buildmaster
64f53620f8 Next development version 2016-05-05 04:26:13 +00:00
Spring Buildmaster
001b05569a Release version 4.1.0.RELEASE 4.1.0.RELEASE 2016-05-05 04:25:46 +00:00
Joe Grandja
447fb70f1d Add Hello World Xml guide
Issue gh-3850
2016-05-04 21:05:31 -04:00
Joe Grandja
f6a95333d1 Add Hello World Spring Boot sample
Issue gh-3850
2016-05-04 17:26:42 -04:00
Rob Winch
9745de9510 Add @AuthenticationPrincipal expression
It is now possible to provide a SpEL expression for
@AuthenticationPrincipal. This allows invoking custom logic including
methods on the principal object.

Fixes gh-3859
2016-05-03 18:08:52 -04:00
Rob Winch
78bf6e2bd5 WithSecurityContextTestExecutionListener supports generic Annotation
Previously Spring Security's WithSecurityContextTestExecutionListener
allowed a WithSecurityContextFactory<Annotation> to be used. This
was broken in SEC-3074.

This commit ensures that WithSecurityContextFactory<Annotation> is
supported again.

Fixes gh-3837
2016-05-03 15:41:25 -04:00
Jens Goldhammer
04a12f49b1 Provide editor config for spring-security
This commit provides following editor config:
- Tabs, not spaces
- Unix (LF), not dos (CRLF) line endings
- Eliminate all trailing whitespace
- Latin-1 (ISO-8859-1) encoding for Java sources; use native2ascii to convert if necessary

Following convention cannot be set by editorconfig (only vim and emacs support maxline length of editorconfig):
- Aim to wrap code at 120 characters, but favor readability over wrapping

Fixes gh-3845
2016-05-03 12:26:56 -04:00
bartolom
3ca8273a95 Improve GC for OnCommittedResponseWrapper
Only track content length if disableOnCommitted is false. This improves object creation and thus GC.

Fixes gh-3842
2016-05-02 16:19:21 -05:00
Joe Grandja
2bdb0231c2 CookieCsrfTokenRepository supports HttpOnly
CookieCsrfTokenRepository supports HttpOnly

Fixes gh-3835

* Add Servlet 3 tests and javadocs

Issue gh-3835

* Add copyright header

Issue gh-3835
2016-05-02 15:49:37 -05: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 17b25d14779af5de9cb0f391f4dc0af7a620a646.

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

Issue gh-234
2016-05-02 13:21:58 -05:00
Dmitrii Volykhin
7e2dd3bcb9 Fix File separator in settings.gradle script
Fixes gh-3852
2016-04-28 09:23:36 -04:00
Jens Goldhammer
ceef70946b Resolve springSecurityFilterChain to Filter
When enabling debug for spring security, the FilterChainProxy will be wrapped by the DebugFilter.
This DebugFilter will be registered as bean springSecurityFilterChain. The WebTestUtils will now search for the bean by name instead of FilterChainProxy class.
In this case we have to cast to a Java ServletFilter to support both filter...

Fixes gh-3836
2016-04-26 15:53:38 -04:00
Patrick Cornelißen
eaf8729941 Fixes RC1/RC2 URLs
Fixes gh-3838
2016-04-22 13:45:21 -04: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
Wim Deblauwe
85786824af Fix logout url in doc
The default for logout is to redirect to `/login?logout`

Fixes gh-251
2016-04-21 14:25:44 -04:00
Li Weinan
70bd7d1bbc Include AuthenticationException in logs
Fixes gh-3705
2016-04-21 11:17:47 -04:00