Commit Graph

1759 Commits (98455e30dc138f7e35180403405378edc5262238)

Author SHA1 Message Date
Stephane Nicoll 98455e30dc Rename default endpoint settings to "default"
Closes gh-10098
7 years ago
Madhura Bhave 919dfd3f90 Remove unused properties and constants
Since the autoconfig totally backs off in the presence
of a WebSecurityConfigurerAdapter, there is no need to
order them ahead of/after the one provided by Spring Boot.

See gh-7958
7 years ago
Stephane Nicoll f6134a8862 Polish 7 years ago
Stephane Nicoll da65158eae Disable Jolokia by default
To be consistent with Actuator web endpoints, Jolokia is now disabled
by default.

Closes gh-10090
7 years ago
Stephane Nicoll def094b844 Advertize web endpoints as disabled by default
Following the rework on Security that expects web endpoints to be
disabled by default, this commit updates the metadata (including the
automatic generation) to reflect this decision.
7 years ago
Stephane Nicoll c76c16d92b Polish 7 years ago
Madhura Bhave 4990b52b72 Reinstate CloudFoundry support for actuators
Closes gh-9996
7 years ago
Madhura Bhave bacbe0459b Disable web endpoints by default
Since the handler interceptors have been removed, web endpoints
are all disabled by default to prevent accidental exposure of
sensitive information.

Closes gh-7958
7 years ago
Madhura Bhave e08ddbf838 Rework security autoconfiguration
This commit combines security autoconfigurations for
management endpoints and the rest of the application. By default,
if Spring Security is on the classpath, it turns on @EnableWebSecurity.
In the presence of another WebSecurityConfigurerAdapter this backs off
completely. A default AuthenticationManager is also provided with a user
and generated password. This can be turned off by specifying a bean of
type AuthenticationManager, AuthenticationProvider or UserDetailsService.

Closes gh-7958
7 years ago
Stephane Nicoll f60ad0df74 Polish 7 years ago
Stephane Nicoll 049df50f31 Add explicit dependency to ConnectionFactory auto-configurations
This commit makes sure tht `HealthIndicatorAutoConfiguration` runs after
any producers of a `ConnectionFactory` and not only ActiveMQ. This was
identified as part of #10081: `JmsAutoConfiguration` is actually the
one that isn't necessary (spring-boot-actuator has no import on the
`org.springframework.jms` and only `javax.jms.ConnectionFactory` is used
as part of the JMS health indicator.
7 years ago
Stephane Nicoll 69faa7dd33 Remove useless cast
The number of nodes can be added to the details without the need to cast
it.

Closes gh-10078
7 years ago
Stephane Nicoll dd88b116d5 Add deprecated metadata for Jolokia
See gh-10076
7 years ago
Stephane Nicoll c69725f68c Add deprecated metadata for Actuator endpoints
See gh-10076
7 years ago
Stephane Nicoll 38745d41d7 Add deprecated metadata for CRaSH support
See gh-10076
7 years ago
Stephane Nicoll e4f3164da7 Polish 7 years ago
Stephane Nicoll 2725151bff Add missing test scope 7 years ago
Johnny Lim 14c9f91aab Polish
Closes gh-10054
7 years ago
Stephane Nicoll ac4219b1d8 Move management.jmx to management.endpoints.jmx
For consistency with #10053, this commit moves the JMX specific endpoint
properties to `management.endpoints.jmx`.
7 years ago
Stephane Nicoll 68fcea7b9a Migrate endpoints.cors to management.endpoints.cors
This commit moves CORS properties out of the endpoints namespace as they
do not refer to a "cors" endpoint but rather to the CORS configuration
of all endpoints.

Closes gh-10053
7 years ago
Stephane Nicoll 3087514b79 Move endpoints.health.mapping to management.health.status.http-mapping
Closes gh-10052
7 years ago
Stephane Nicoll 79bdaad686 Remove reference to HttpStatus
This commit removes an import on a class in "spring-web" as this class
is also meant to be used with Jersey only (i.e. when "spring-web" is
not present on the classpath).

Closes gh-10051
7 years ago
Stephane Nicoll 394371eb73 Polish "Harmonize database initializers"
Closes gh-9752
7 years ago
Johnny Lim a7ef258069 Polish
Closes gh-10032
7 years ago
Stephane Nicoll ad3a14141f Polish endpoints metadata
This commit introduces manual metadata for the endpoints.all.* namespace
and polish the appendix following the work that happened in #9692
7 years ago
Stephane Nicoll 80793b3148 Cleanup additional meta-data
The new endpoint infrastructure does not provide a `path` property so
the manual metadata for older endpoints have been removed.
7 years ago
Stephane Nicoll 19e211a1c2 Add Status endpoint
This commit adds a new `/application/status` endpoint that provides only
the Health's status of an application.

Previously, `/application/health` was returning full health details or
only the status depending on configuration. Those two use cases are now
separate in two endpoints that can be configured, secured and enabled
separately.

Closes gh-9721
7 years ago
Stephane Nicoll b9bbe9ee01 Polish 7 years ago
Stephane Nicoll 74b552826b Remove EndpointProperties
`EndpointProperties` is a left over of the infrastructure in 1.x and is
no longer used. Besides the `endpoints.enabled` property is now
`endpoints.all.enabled`.

Closes gh-10016
7 years ago
Stephane Nicoll 151f7ef325 Reinstate JMX customizations of Endpoints ObjectName
This commit restores the configuration properties used to configure how
the ObjectName of an endpoint is generated. For consistency, those
properties have been renamed to `management.jmx`

Closes gh-10005
7 years ago
Andy Wilkinson 914b3588b0 Update test as response may be received before server has deleted file
Previously, the heap dump endpoint test asserted that the temporary
heap dump file had been deleted as soon as the client received a
response. This led to intermittent test failures as the input
stream is closed after its contents have been sent to the client,
creating a race condition between the client receiving the response
and then asserting that the file had been deleted and the server
close the input stream and deleting the temporary file.

This commit updates the test so that, after receiving the response, it
will wait for up to 5 seconds for the server to have deleted the
temporary heap dump file.
7 years ago
Andy Wilkinson 41e6b2adbe Improve diagnostics when temporary heap dump file can't be deleted 7 years ago
Andy Wilkinson e7a3b3c4e2 Polish 7 years ago
Andy Wilkinson cf2bf0c2b9 Work around javadoc bug when linking to annotation attributes
If an annotation attribute is linked to in javadoc before the
javadoc processor encounters a usage of the annotation, the javadoc
tool fails with a class cast exception. This is a known issue [1]
but it has been closed as won't fix so we need to work around it.
Sadly, the only reasonable way to do so appears to be to remove
the links to the annotation attributes and only link to the annotation
itself.

[1] https://bugs.openjdk.java.net/browse/JDK-8170447
7 years ago
Andy Wilkinson b49c1f6925 Pave the way for reworking the Actuator's CloudFoundry support
See gh-9996
7 years ago
Andy Wilkinson ee16332745 Update Actuator to use the new endpoint infrastructure
This commit migrates the Actuator onto the new endpoint infrastruture.
In addition to the existing support for accessing the endpoints via
JMX and HTTP using Spring MVC, support for access via HTTP using
Jersey and WebFlux has been added. This includes using a separate
management port where we now spin up an additional, appropriately
configured servlet or reactive web server to expose the management
context on a different HTTP port to the main application.

Closes gh-2921
Closes gh-5389
Closes gh-9796
7 years ago
Stephane Nicoll 7e97495cdf Expose Jolokia directly rather than via an endpoint
Jolokia is a 100% web concern and does not fit in the Endpoint
infrastructure. This commit removes `JolokiaMvcEndpoint` and exposes
the servlet directly instead while still being part of the
management context. As such, the Jolokia servlet is exposed beneath
the management context path and will move to a separate port when
the management port is not the same as the main server port.

Closes gh-9843
7 years ago
Andy Wilkinson 5351ceb673 Correct name of ManagementContextConfiguration in spring.factories
Closes gh-7545
7 years ago
Andy Wilkinson 0aa39d0279 Improve the package structure of spring-boot-actuator module
Closes gh-7545
7 years ago
Andy Wilkinson 63cd0afadb Merge branch '1.5.x' 7 years ago
Johnny Lim ee3de15e37 Add more ConditionalOnClass checks in HealthIndicatorAutoConfiguration
Closes gh-9940
7 years ago
Andy Wilkinson 7c52bb3a37 Improve the structure of the Liquibase endpoint's response
Closes gh-9974
7 years ago
Andy Wilkinson f38cb7b5d8 Improve structure of Flyway endpoint response, add missing properties
Closes gh-9973
7 years ago
Andy Wilkinson abf39915e8 Polish 7 years ago
Andy Wilkinson e9aeb9ad63 Polish 7 years ago
Madhura Bhave 3d878e642a Remove unused properties from tests 7 years ago
Madhura Bhave ea087b9bac Move liquibase config properties to spring.liquibase
Closes gh-9897
7 years ago
Madhura Bhave f9e316306a Move Flyway config properties to spring.flyway
Closes gh-9896
7 years ago
Andy Wilkinson bb55f49396 Remove concept of sensitivity from Actuator's endpoints
Closes gh-9924
7 years ago
Andy Wilkinson 8f42007aa1 Improve the structure of the response from the env endpoint
Closes gh-9864
7 years ago