Commit Graph

1315 Commits

Author SHA1 Message Date
Johnny Lim f915ae197a Polish 2017-01-04 09:53:45 +01:00
Madhura Bhave 530c3cd3be Simplify HealthMvcEndpoint security
Expose full health details if management security is disabled or
management role is present.

Fixes gh-7604
Closes gh-7852
2017-01-03 19:00:14 -08:00
Phillip Webb 2fe4d60b47 Add `management.cloudfoundry.*` meta-data
Update configuration meta-data and appendix to include
`management.cloudfoundry.*` meta-data.

See gh-7108
2017-01-03 17:24:58 -08:00
Phillip Webb 8ccd4db513 Merge branch '1.4.x' into 1.5.x 2017-01-03 15:14:14 -08:00
Phillip Webb 732011987d Fix ManagementContextConfiguration @Order support
Update `ManagementContextConfigurationsImportSelector` to instantiate
classes so that order annotations are respected.

Fixes gh-7814
2017-01-03 15:12:35 -08:00
Phillip Webb b4b8370632 Fix AuditEventsJmxEndpoint bean name
See gh-6579
2017-01-03 14:43:24 -08:00
Phillip Webb 8a9a61b64f Prevent duplicate JmxEndpoint MBean registration
Update JmxEndpoint support so that the `@ManagedResource` annotation
is no longer required. This prevents both `EndpointMBeanExporter` and
the regular `AnnotationMBeanExporter` from both registering the bean.

Fixes gh-7813
See gh-6579
2017-01-03 14:43:24 -08:00
Phillip Webb 51762642b2 Polish audit event endpoint support
Closes gh-6579
2017-01-02 19:43:26 -08:00
Phillip Webb 5b40eb48e0 Improve MBean without backing Endpoint support
Improve support for MBeans without a backing endpoint by introducing
a `JmxEndpoint` interface. The `JmxEndpoint` is intentionally
similar in design to the `MvcEndpoint` from the `mvc` package and
allows for completely custom JMX beans that are not backed by any
real actuator `Endpoint`.

The `AuditEventsMBean` has been refactored to use the new interface and
has been renamed to `AuditEventsJmxEndpoint`.

See gh-6579
2017-01-02 19:43:14 -08:00
Vedran Pavic 2f1e4f0c02 Add MVC and JMX endpoints to retrieve audit events
Add MVC and JMX specific endpoints that allow audit events to be
retrieved.

See gh-6579
2017-01-02 19:20:35 -08:00
Vedran Pavic a6d18f714f Add JMX without backing `Endpoint` support
Decompose `EndpointMBean` to improve support for JMX endpoints without
a backing `Endpoint`.

See gh-6579
2017-01-02 19:19:04 -08:00
Phillip Webb e1eb48e8b4 Fix warnings 2016-12-30 17:26:25 -08:00
Phillip Webb a167db7b37 Allow OPTIONS requests in interceptors
Update `MvcEndpointSecurityInterceptor` and
`CloudFoundrySecurityInterceptor` to allow OPTIONS requests to be
processed.

Fixes gh-7720
2016-12-30 14:05:29 -08:00
Phillip Webb aacf5d660f Update copyright year for changed files 2016-12-30 11:53:51 -08:00
Phillip Webb 367963f29f Polish 2016-12-28 15:41:00 -08:00
Phillip Webb 8b69856fc9 Polish 2016-12-28 15:23:26 -08:00
Stephane Nicoll 8b7055719f Move InMemoryMultiMetricRepository to a separate class
This commit moves the `MultiMetricRepository` implementation from
`InMemoryMetricRepository` to `InMemoryMultiMetricRepository`. Both
implementations can share the same underlying store (and are for backward
compatible reasons).

The side effect is that `reset` now works as expected for a group.

Closes gh-7687
2016-12-28 18:16:10 +01:00
Phillip Webb 3af5ae2a26 Polish `ObjectProvider` names
Consistently use the simple name for ObjectProvider parameter and
field names. For example:

  `ObjectProvider<Something> something`

rather than

  `ObjectProvider<Something> somethingProvider`
2016-12-27 15:04:06 -08:00
Phillip Webb e0541d0f74 Polish 2016-12-27 14:48:44 -08:00
Stephane Nicoll 0d4ef3dbdb Fix formatting 2016-12-27 11:41:53 +01:00
Stephane Nicoll d0fa72a169 Filter AbstractRoutingDataSource from health indicator
Closes gh-6806
2016-12-27 10:11:52 +01:00
Spring Buildmaster 9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Stephane Nicoll 5d909a969f Polish contribution
Closes gh-6613
2016-12-22 11:44:49 +01:00
Eddú Meléndez 53d25999f3 Add support for multiple beans in the Flyway and Liquibase endpoints
Closes gh-6610
See gh-6613
2016-12-22 11:44:12 +01:00
Phillip Webb b87e02dde0 Polish Spring Integration metrics support
See gh-7722
2016-12-21 20:18:06 -08:00
Artem Bilan d69e43b433 Refactor Spring Integration metrics support
Update Spring Integration metrics support since Spring Integration
`4.3.6`+ no longer needs `spring-integration-jmx` enable
`MessageChannel`, `MessageHandler` and `MessageSource` metrics.

- Add `IntegrationManagementConfiguration` conditional auto-configuration
  to provide `@EnableIntegrationManagement` when JMX is `enabled` or there
  is no `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean.
  By default this bean doesn't exist and you explicitly should declare it
  (e.g. via `@EnableIntegrationManagement`) if you would like to collect
  metrics. At the same time Spring Integration enables it when JMX
  management is present (that is a purpose of that new
  `IntegrationManagementConfiguration`)

- Change `SpringIntegrationMetricReader` to read metrics from the
  `IntegrationManagementConfigurer`, not `IntegrationMBeanExporter`

- Change `PublicMetricsAutoConfiguration` to register
  `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean if
  not present. Since we are here in `actuator`, therefore we are
  interested in the metrics for SI as well.

- Since we don't need JMX for the metrics any more, remove SI-JMX
  dependency from the `spring-boot-starter-integration`.

- Remove `IntegrationManagementConfiguration` modification from the
  `integrationMbeanExporter()`, since that looks like mutation of an
  external object, when end-user would prefer their own options.
  Therefore we don't need `ObjectProvider<IntegrationManagementConfigurer>`, too

- Add missed `MessageSourceMetrics` gathering for the
  `SpringIntegrationMetricReader`

Closes gh-7722
2016-12-21 20:18:06 -08:00
Johnny Lim e12b4a944f Polish 2016-12-21 20:18:04 -08:00
Phillip Webb 38f7389eab Polish loggers 2016-12-20 21:16:40 -08:00
Phillip Webb c76bd2d81e Refine error message from Endpoint MVC security
Update the error message to return less information to the client.
Details of how to disable security are now written to the log instead.

See gh-7605
See gh-7634
2016-12-20 18:47:39 -08:00
Madhura Bhave 38eeae2166 Send error with message from Endpoint MVC security
Update `MvcEndpointSecurityInterceptor` to that it sends an error in the
same way as Spring Security. Prior to this commit the `ErrorController`
would not handle endpoint security errors.

Fixes gh-7605
Closes gh-7634
2016-12-20 18:27:25 -08:00
Phillip Webb dba8ef2ba8 Polish CF management skip SSL opt-in
See gh-7629
See gh-7655
2016-12-20 18:25:32 -08:00
Madhura Bhave 34712cbf76 Switch CF management skip SSL to opt-in
Change CloudFoundryActuatorAutoConfiguration so that skipping of SSL
verification is now opt-in rather than enabled by default.

Fixes gh-7629
Closes gh-7655
2016-12-20 18:24:15 -08:00
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