Commit Graph

1283 Commits

Author SHA1 Message Date
Phillip Webb 06a7ab0cd5 Polish ReservoirFactory support
Polish Dropwizrd reservoir support including a refactor of
`ReservoirFactory` to allow reservoirs to be created based on a
metric name.

See gh-5199
See gh-7105
2016-12-20 15:12:14 -08:00
Lucas Saldanha 1fc2e87053 Enable custom Reservoir with Dropwizard metrics
Uses the ReservoirFactory to customize the implementation of
the Reservoir that will be used when creating Timer and Histogram
in the DropwizardMetricServices.

Fixes gh-5199
Closes gh-7105
2016-12-20 14:56:29 -08:00
Phillip Webb d15f3548be Polish 2016-12-19 13:12:03 -08:00
Phillip Webb 6121208cbb Polish formatting 2016-12-19 12:47:03 -08:00
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 2016-12-19 12:36:57 -08:00
Phillip Webb bd74c3d327 Polish formatting 2016-12-19 12:25:09 -08:00
Stephane Nicoll 684be0f048 Polish contribution
Closes gh-6852
2016-12-16 14:19:20 +01:00
Vedran Pavic 899f7aa8f0 Add constants for supported audit event types
See gh-6582
2016-12-16 13:59:50 +01:00
Stephane Nicoll f560f338ab Polish contribution
Closes gh-7219
2016-12-16 11:58:26 +01:00
Vedran Pavic 60e054d0e4 Add `LoggersEndpointMBean`
See gh-7219
2016-12-16 11:05:17 +01:00
Eddú Meléndez fc09a23991 Add missing actuator metadata
Health metadata for cassandra and couchbase is added.

See gh-7632
2016-12-14 19:16:42 +01:00
Johnny Lim 6d1b752ffe Polish
Closes gh-7552
2016-12-14 19:14:24 +01:00
Oscar Utbult 38713c473f Remove redundant array creation for calling varargs method
Closes gh-7551
2016-12-14 19:12:08 +01:00
Andy Wilkinson 595679bed4 Disable management security when testing Jolokia endpoint 2016-12-13 13:02:40 +00:00
Andy Wilkinson 391a760c3c Merge branch '1.4.x' into 1.5.x 2016-12-13 09:44:16 +00:00
Andy Wilkinson 4ec95b8308 Ensure that JolokiaMvcEndpoint destroys underlying controller
Closes gh-7606
2016-12-13 09:42:14 +00:00
Dave Syer 1baf3c63c4 Make the Spring Security part of CF autoconfig conditional
Otherwise you get a class not found exception at runtime in
CF when Spring Securtity is not on the classpath.
2016-12-12 15:05:48 +00:00
Dave Syer cc8ecb6ff5 Clear VCAP_APPLICATION after tests
So that other CF tests do not fail.
2016-12-12 15:05:07 +00:00
Madhura Bhave 5d8e00cb56 Fix HealthMvcEndpointTests
See gh-7569
2016-12-06 13:18:10 -08:00
Madhura Bhave 1be5812cf0 Require `ACTUATOR` role rather than `ADMIN`
Update management security to require an `ACTUATOR` role rather than
`ADMIN` by default. This should reduce the risk of users accidentally
exposing actuator endpoints because they happen to use a role named
`ADMIN`.

Fixes gh-7569
2016-12-05 17:58:16 -08:00
Madhura Bhave 95be208f0f Use IgnoredRequestCustomizer to ignore paths
Update `SpringBootWebSecurityConfiguration` to ignore requests by
delegating to `IgnoredRequestCustomizer` beans. This allows a single
Spring Boot `WebSecurityConfigurer<WebSecurity>` bean to be used which
prevents potential exceptions caused by duplicate `@Order` values.

Fixes gh-7106
2016-12-05 17:57:18 -08:00
Madhura Bhave d09aafacda Add a security interceptor for actuator endpoints
Update `AbstractEndpointHandlerMapping` to support a security
interceptor that can be used to enforce endpoint security.

Fixes gh-6889
2016-12-05 17:57:00 -08:00
Andy Wilkinson 967625db1e Replace field injection with constructor injection in config classes
Closes gh-7563
2016-12-05 10:48:01 +00:00
Andy Wilkinson 1464425d64 Remove use of @Component from classes that are not scanned
Closes gh-7549
2016-12-02 17:57:21 +00:00
Stephane Nicoll ee72e788ed Rename `spring-boot-junit-runners` to `spring-boot-test-support`
Closes gh-7421
2016-12-01 16:25:47 +01:00
Stephane Nicoll 85de72c0d0 Merge branch '1.4.x' into 1.5.x 2016-12-01 15:26:06 +01:00
Stephane Nicoll 2a85a2557d Fix health indicator auto-configuration order
Previously, the health auto-configuration `AutoconfigureOrder` entry for
couchbase was referring to the standard couchbase auto-configuration that
is not responsible to configure the `CouchbaseOperations` bean. Yet, the
health indicator implementation was relying on the presence of such a
bean.

This commit fixes the `AutoconfigureOrder` entry so that it refers to
`CouchbaseDataAutoConfiguration` now.

Closes gh-7543
2016-12-01 15:25:51 +01:00
Andy Wilkinson 9c20ada927 Merge branch '1.4.x' into 1.5.x 2016-12-01 13:26:45 +00:00
Andy Wilkinson 356edc725c Handle request mappings with regular expressions in MetricsFilter
Closes gh-7503
2016-12-01 13:22:55 +00:00
Andy Wilkinson 2be554456e Introduce SearchStrategy.ANCESTORS as a replacement for .PARENTS
Closes gh-6763
2016-11-28 15:41:53 +00:00
Andy Wilkinson dce1487424 Merge branch '1.4.x' into 1.5.x 2016-11-24 20:57:34 +00:00
Andy Wilkinson e19c6245ef Consider endpoints.sensitive when endpoints.health.sensitive is not set
Closes gh-7476
2016-11-24 20:57:29 +00:00
Andy Wilkinson f5dd90815b Polishing: fix some compiler warnings 2016-11-22 11:07:51 +00:00
Phillip Webb 1657120286 Move ModifiedClassPathRunner to its own module
Migrate `ModifiedClassPathRunner` from `spring-boot` test source to
its own module.

Fixes gh-7420
2016-11-18 17:27:54 -08:00
Phillip Webb c2c5611f77 Polish 2016-11-18 15:58:56 -08:00
Madhura Bhave 3a3228fc70 Add CORS interceptor for Cloud Foundry actuators
This interceptor processes the response with CORS headers
and apepars before the Cloud Foundry security interceptor.

See gh-7108
2016-11-18 09:26:31 -08:00
Andy Wilkinson 1cd781b242 Make spring-boot-test compatible with Mockito 2.1 and 2.2
We use some internal Mockito classes and some  breaking API changes
have been made to them in Mockito 2. This commit introduces a utility
class, SpringBootMockUtil, to shield our code from these differences.
Mockito 1 is called directly and Mockito 2 is called via reflection.

To allow these changes to be tested, FilteredClassPathRunner has been
enhanced to also support overriding a dependency on the class path.
As a result it has been renamed to ModifiedClassPathRunner. The new
ClassPathOverrides annotation can be used to provide the Maven
coordinates of one or more dependencies that should be resolved and
added to the class path. Such additions are added to the start of
the class path so that they override any existing dependency that
contains the same classes.

Closes gh-6520
2016-11-18 16:39:44 +00:00
Andy Wilkinson 5527e3fdad Fix SpringApplicationHierarchyTests following latest Neo4j changes
See gh-7391
2016-11-18 11:54:05 +00:00
Johnny Lim 8038882d46 Polish
Closes gh-7403
2016-11-16 13:36:51 -08:00
Andy Wilkinson 387a406aad Merge branch '1.4.x' into 1.5.x 2016-11-16 09:13:17 +00:00
Phillip Webb 449b42ffa0 Polish LinksEnhancer to use endpoint name
See gh-7164
See gh-7132
2016-11-15 18:07:50 -08:00
Madhura Bhave ada02232b9 Change LinksEnhancer to use endpoint name
Update `LinksEnhancer` to use NamedEndpoint names as rel names. If the
endpoint name is not available, fallback to endpoint path. Allow
multiple hrefs per rel if path is different.

Fixes gh-7132
Closes gh-7164
2016-11-15 18:03:26 -08:00
Madhura Bhave 0e3a3df6f4 Return log levels in `/loggers` endpoint payload
Update `LoggersEndpoint` to additionally return the log levels actually
supported by the system.

Fixes gh-7396
2016-11-15 14:32:02 -08:00
Phillip Webb 764f13453a Merge branch '1.4.x' into 1.5.x 2016-11-15 13:58:54 -08:00
Phillip Webb bacf0878af Polish 2016-11-15 10:40:21 -08:00
Andy Wilkinson 24cc5d5644 Give javac's type inferencing a helping hand 2016-11-15 13:29:19 +00:00
Andy Wilkinson 22e456a177 Merge branch '1.4.x' into 1.5.x 2016-11-15 13:14:30 +00:00
Madhura Bhave 2697bf2ba1 Add Content-Type to allowed headers for CloudFoundry actuators
See gh-7108
2016-11-11 12:09:16 -08:00
Madhura Bhave af61278213 Extend HealthMvcEndpoint for Cloud Foundry
The CloudFoundryHealthMvcEndpoint does not perform additional
security checks since security is handled by the interceptor.

See gh-7108
2016-11-09 11:04:51 -08:00
Madhura Bhave a3bcb2778f Add message to response body for Cloud Foundry security error
See gh-7108
2016-11-09 10:54:56 -08:00