481 Commits

Author SHA1 Message Date
Madhura Bhave
0a446cb962 Refactor Spring Security auto-configuration classes
The auto-configuration for a `UserDetailsService` and the web bits
has been split into two.

Closes gh-11915
Fixes gh-11891
2018-02-07 16:12:46 -08:00
Andy Wilkinson
9a456924e4 Remove - from path-match and content-negotiation properties
Closes gh-11913
2018-02-07 15:09:32 +00:00
Phillip Webb
a631619f63 Allow subpath H2 console matching
Fixes gh-11926
2018-02-06 13:25:17 -08:00
Phillip Webb
eab1705351 Restore EmbeddedLdapAutoConfiguration condition
Restore a `@Condition` guard to `EmbeddedLdapAutoConfiguration`.

See gh-11764
2018-02-04 19:39:55 -08:00
Phillip Webb
eab0b84a80 Polish 'Add support for multi baseDn;
Update multi baseDn support to use the recently introduced
`@Delimter` annotation

Closes gh-11764
2018-02-04 10:43:26 -08:00
Eddú Meléndez
270dc2cd72 Add support for multi baseDn
Update LDAP properties and auto-configuration to support multiple
base DN values.

See gh-11764
2018-02-04 10:41:57 -08:00
Eddú Meléndez
44ad630de3 Migrate LDAP tests to use ApplicationContextRunner 2018-02-04 10:41:23 -08:00
Lukas Eder
44cd3352a5 Detect jOOQ SQLDialect through jOOQ's JDBCUtils
This change updates SqlDialectLookup to delegate to jOOQ's JDBCUtils
rather than creating an additional mapping between
org.springframework.boot.jdbc.DatabaseDriver and org.jooq.SQLDialect.

This has the following advantages:

1. jOOQ's `SQLDialect` to URL mappings are already maintained by jOOQ,
   so no additional changes will be necessary to Spring Boot in the
   future.
2. Delegating to jOOQ means that the mapping also works for the
   commercial jOOQ distributions, e.g. when working with DB2, Oracle,
   SQL Server, etc., as the JDBCUtils of the commercial distribution
   also contains the relevant logic to map to e.g. `SQLDialect.DB2`,
   `SQLDialect.ORACLE`, `SQLDialect.SQLSERVER` (which are not
   available from the open source distribution linked by Spring Boot
   by default).

Closes gh-11466
2018-02-02 13:02:36 +00:00
Andy Wilkinson
00489c74ea Start building against Spring Data Kay SR4 snapshots
The fix in Spring Data Redis for sentinel configuration means that
two Jedis sentinel tests now attempt to connect to a Sentinel. As a
result the tests fail. Running a Redis Sentinel in a Docker container
appears to be non-trivial. As an alternative, this commit updates the
tests to capture the JedisConnectionFactory prior to its
initialization (which is the failure trigger) and then assert that its
configuration is as expected.

See gh-11884
Closes gh-11855
2018-02-02 11:12:37 +00:00
Andy Wilkinson
9a87424809 Use ApplicationContextRunner in RedisAutoConfigurationJedisTests 2018-02-02 11:12:22 +00:00
Andy Wilkinson
875091ed85 Polish “Remove or use unused method parameters”
Closes gh-11812
2018-02-02 09:34:19 +00:00
igor-suhorukov
717bd2c580 Remove or use unused method parameters 2018-02-02 09:34:19 +00:00
Phillip Webb
c3ec316890 Move Application* and *FileWriter classes
Move `ApplicationHome`, `ApplicationPid` and `ApplicationTemp` to the
`system` package. Since `system` package is now much lower level, the
existing `FileWriter` implementations also needed to move to prevent
package tangles.

Fixes gh-8614
2018-02-01 16:44:42 -08:00
Andy Wilkinson
4a1bea1fed Polish 2018-02-01 20:03:02 +00:00
Phillip Webb
7d5e41f7dc Polish 2018-02-01 10:25:33 -08:00
dreis2211
3e84f5bdbe Remove obsolete comment
Closes gh-11874
2018-02-01 09:00:32 +01:00
Johnny Lim
3cead7693d Polish
Closes gh-11871
2018-02-01 08:35:42 +01:00
Madhura Bhave
71e9db012b Convert tests to use ApplicationContextRunner 2018-01-31 19:03:09 -08:00
Madhura Bhave
905666e797 Document usage of AuthenticationEventPublisher
Closes gh-11420
2018-01-31 18:41:08 -08:00
Stephane Nicoll
1106c582a7 Remove error-level metadata for Spring Mobile
While Spring Mobile support has been removed from Spring Boot, the
auto-configuration has been relocated to a separate module that uses
the same keys.

Flagging those keys as deprecated means that the IDE will be confused
when the extra jar is present on the classpath as it advertizes, as
it should, support fo them.

Closes gh-11844
2018-01-30 15:28:28 +01:00
Stephane Nicoll
726a1d075e Polish metadata for spring.flyway.sql-migration-suffix 2018-01-30 14:41:06 +01:00
Stephane Nicoll
87c82310cf Merge branch '1.5.x' 2018-01-30 10:42:45 +01:00
Phillip Webb
c90a5a9e9e Polish 2018-01-29 21:35:56 -08:00
Madhura Bhave
134628a62d Add PathRequest to reactive security for parity 2018-01-29 18:34:46 -08:00
Madhura Bhave
e80c22cbf8 Add RequestMatcher for H2 console
Fixes gh-11704
2018-01-29 18:34:46 -08:00
Phillip Webb
3a12f98bab Migrate callbacks to LambdaSafe util
Migrate existing code to the new `LambaSafe` callback handler.

Closes gh-11584
2018-01-29 14:31:10 -08:00
Andy Wilkinson
6582afea4a Polish 2018-01-29 21:04:41 +00:00
Andy Wilkinson
244a287484 Merge branch '1.5.x' 2018-01-29 19:51:50 +00:00
Phillip Webb
af50a18da9 Polish 2018-01-29 09:47:03 -08:00
Stephane Nicoll
c2a2999799 Use proper classloader for value serialization
Closes gh-11822
2018-01-29 13:55:05 +01:00
dreis2211
c1675c2d5f Use InvocationOnMock.getArgument() where possible
Closes gh-11818
2018-01-29 08:06:00 +01:00
Johnny Lim
6d68806275 Polish
Closes gh-11805
2018-01-27 05:22:04 +01:00
Phillip Webb
b234501af3 Polish 2018-01-26 11:39:41 -08:00
Andy Wilkinson
192fe929c7 Polish "Use custom DataSource if Flyway or Liquibase has user or url"
Closes gh-11751
2018-01-26 14:51:43 +00:00
Dominic Gunn
5d3cd23eed Use custom DataSource if Flyway or Liquibase has user or url
This commit enables a more flexible Liquibase/Flyway configuration by
allowing for a combination of the provider's and the primary
DataSource's configuration to be used. This gives developers the
flexibility to specify only a user or a url and having
Liquibase/Flyway fall back to individual datasource properties rather
than ignoring the Liquibase/Flyway properties and falling back to the
default data source.

See gh-11751
2018-01-26 14:51:43 +00:00
Stephane Nicoll
1c195f5b9a Polish "Migrate server customizer to PropertyMapper"
Closes gh-11772
2018-01-26 13:48:07 +01:00
yulin
19542b975f Migrate server customizer to PropertyMapper
See gh-11772
2018-01-26 13:48:07 +01:00
Stephane Nicoll
98c667c2d5 Polish "Use PropertyMapper to configure WebServerFactory"
Closes gh-11773
2018-01-26 11:19:03 +01:00
Huang YunKun
7d4e558f8e Use PropertyMapper to configure WebServerFactory
See gh-11773
2018-01-26 11:08:23 +01:00
Madhura Bhave
3a95a7531a UserDetailsService not created when OAuth configured
Fixes gh-10531
2018-01-26 15:10:21 +05:30
Phillip Webb
adfb6dc128 Polish 2018-01-25 13:20:29 -08:00
Andy Wilkinson
cedb6b2f17 Revert "Clean up the logging system later in context close processing"
This reverts commit 8619256d2a425a60235e1e1491e9bb9e5ce5d00d.

See gh-11676
2018-01-25 13:15:41 +00:00
Andy Wilkinson
4c23afdcd8 Polish 2018-01-25 11:04:16 +00:00
Andy Wilkinson
e2cb7a7545 Align default scopes for Google with changes in Spring Security 5.0.1
Closes gh-11573
2018-01-25 10:58:05 +00:00
Andy Wilkinson
8619256d2a Clean up the logging system later in context close processing
Previously, the logging system was cleaned up in response to the
root context's ContextClosedEvent being received. This event is
published early in a context's close processing. As a result, the
logging system is in cleaned up state while, for example, disposable
beans are being destroyed.

This commit reworks the logic that triggers logging system clean up
to use a disposable bean instead. Disposable beans are called in
reverse-registration order. The logging clean up bean is registered as
early as possible so that it should be the last disposable bean to
be called.

Closes gh-11676
2018-01-25 10:33:56 +00:00
Stephane Nicoll
a2a31894a8 Fix typo 2018-01-25 08:19:25 +01:00
Phillip Webb
d61ba241b5 Move "testdb" naming to DataSourceProperties
Move the "testdb" naming logic to `DataSourceProperties` and expose
the `deduceDatabaseName` method so they can be used in
auto-configuration.

See gh-11719
2018-01-24 20:43:00 -08:00
Stephane Nicoll
b67903a04a Keep "testdb" default datasource name internal
Previously, Hikari's pool name was auto-configured with the value of
`spring.datasource.name` that defaults  to `testdb`, which brings some
confusion.

This commit removes the default `testdb` value on
`spring.datasource.name` as it is a sane default only for an embedded
datasource. It is applied whenever applicable instead.

Closes gh-11719
2018-01-24 17:41:32 -08:00
dreis2211
542c3b7c1e Remove usage of Vector collection
Closes gh-11759
2018-01-24 16:36:45 -08:00
igor-suhorukov
093ca0a687 Use EnumMap whenever possible
Replace regular Map instances with EnumMap to reduce memory consumption.

Closes gh-11760
2018-01-24 16:24:47 -08:00