Commit Graph

314 Commits (3236306e53a34c0eb55be1e0af1a9ef5b9e65dc4)

Author SHA1 Message Date
Phillip Webb 9e75680e6f Polish 7 years ago
Madhura Bhave 51de220b55 Enable CSRF protection by default
Fixes gh-11758
7 years ago
Madhura Bhave 85aeb5c00d Fix path in tests 7 years ago
Stephane Nicoll 7473642f58 Harmonize endpoints exclude property
Closes gh-11914
7 years ago
Phillip Webb 5de46c3186 Polish 7 years ago
Andy Wilkinson 8605499a64 Provide more control over when the health endpoint shows details
Closes gh-11869
7 years ago
Andy Wilkinson 356efaa7c8 Rename trace to httptrace
Closes gh-11806
7 years ago
Phillip Webb adfb6dc128 Polish 7 years ago
Andy Wilkinson 3565961d68 Rework HTTP exchange tracing and add support for WebFlux
Closes gh-9980
7 years ago
Madhura Bhave d65f9b25bc Remove redundant throws Exception 7 years ago
Andy Wilkinson 5b8a2f9675 Improve context hierarchy handling in Actuator endpoints
Previously, a number of Actuator endpoints ignored a context hierarchy
or assumed that it would always be linear. This commit reworks the
affected endpoints so that the no longer assume a linear hierarchy.

A side-effect of a non-linear hierarchy is that there may be multiple
different beans with the same name (in a linear hierarchy, a bean
with the same name as one in an ancestor context, replaces that bean).
The affected endpoints have also been updated so that, when bean names
are used as keys, those keys are grouped by application context. This
prevents a bean in one context from accidentially overwriting a bean
in another context.

Closes gh-11019
7 years ago
Stephane Nicoll afba8fed79 Harmonize management.server.context-path property
This commit moves management.server.context-path to
management.server.servlet.context-path to align with the configuration
key for the application's main context path.

Closes gh-11359
7 years ago
Stephane Nicoll 681fdb1ee8 Property detect Health web extension with management context
Previously, the Health web extension was defined in the management
context and, as a result, it wasn't found when a separate port was
required. The side effect is that anything that the health web extension
does was not active anymore in that case.

This commit makes sure that the extension is always defined as part of
the main context where operations are discovered and merged.

Closes gh-11285
7 years ago
Stephane Nicoll 1fdc1e373c Polish 7 years ago
Stephane Nicoll 23218add90 Polish 7 years ago
Madhura Bhave 47ed096981 Make default username and password configurable
Closes gh-10963
7 years ago
Phillip Webb 07f71e889e Move `/application` to `/actuator`
Change the endpoint default path from `/application` to `/actuator`.

Fixes gh-10970
7 years ago
Phillip Webb 31025d9f6c Drop status endpoint
Drop the status endpoint and merge functionality back into the health
endpoint. The `management.endpoint.health.show-details` property can
be used to change if full details, or just the status is displayed.

Fixes gh-11113
7 years ago
Phillip Webb fd5c43cdc9 Separate endpoint concerns
Update endpoint code to provide cleaner separation of concerns.
Specifically, the top level endpoint package is no longer aware of
the fact that JMX and HTTP are ultimately used to expose endpoints.
Caching concerns have also been abstracted behind a general purpose
`OperationMethodInvokerAdvisor` interface.

Configuration properties have been refined to further enforce
separation. The `management.endpoint.<name>` prefix provides
configuration for a  single endpoint (including enable and cache
time-to-live). These  properties are now technology agnostic (they
don't include `web` or `jmx` sub properties).

The `management.endpoints.<technology>` prefix provide exposure specific
configuration. For example, `management.endpoints.web.path-mapping`
allow endpoint URLs to be changed.

Endpoint enabled/disabled logic has been simplified so that endpoints
can't be disabled per exposure technology. Instead a filter based
approach is used to allow refinement of what endpoints are exposed over
a given technology.

Fixes gh-10176
7 years ago
Andy Wilkinson 88366b75d0 Reinstate @DirtiesContext on shutdown endpoint test
Closes gh-10548
7 years ago
Ivan Sopov d8fa71bc97 Samples cleanup
- Modifying dependencies to starter-web with tomcat exclusion plus
  alternative servlet container instead of manual dependency on
  spring-webmvc as it is the preferrable way to use alternative servlet
  container
- Previously RestTemplate with ssl was configured manually in tests - now
  it rellies on autoconfiguration - changed this for multi-connector test
  and added test to ensure that ssl autoconfiguration is working
- Most samples with alterntative servlet containers used some kind of
  service reading property and returning default since it wasn't
  configured - removed it, since it is not specific to using alternative
  servlet containers.

See gh-10548
7 years ago
Andy Wilkinson ec7840e049 Align Actuator sample's tests with endpoint contextId changes
See gh-10980
7 years ago
Phillip Webb c55b5d7111 Polish 7 years ago
Andy Wilkinson 66b55defa0 Adapt to password encoder changes in Spring Security
Closes gh-10762
7 years ago
Madhura Bhave d307eba0a3 Add property to configure base-path for web endpoints.
Also, move properties corresponding to management server under
`management.server.*`.

Closes gh-10230
7 years ago
Phillip Webb 9ff87612f9 Delete sample Gradle builds
Remove the Gradle builds that were provided with some of the sample
applications since they were never directly invoked.

See gh-9316
7 years ago
Phillip Webb 2855010841 Fix sample POMs
Update sample POMs to follow CI friendly Maven conventions.

See gh-9316
7 years ago
Phillip Webb 9e43b99966 Polish 7 years ago
Madhura Bhave 7093602753 Simplify UserDetailsService creation in samples
Closes gh-10385
7 years ago
Andy Wilkinson 8ab12d909e Use standard bean validation annotations that are new in 2.0
See gh-9969
7 years ago
Stephane Nicoll d89ff8cb28 Polish sample
Closes gh-10330
7 years ago
Jon Schneider c2958c27ab Replace Boot's own metrics with support for Micrometer
Closes gh-9970
7 years ago
Phillip Webb 2e51b48cd9 Refactor actuator package locations
Restructure actuator packages to improve structure. The following
changes have been made:

 - Separate actuator and actuator auto-configuration into different
   modules.
 - Move endpoint code into `spring-boot-actuator`.
 - Move `Endpoint` implementations from a single package into
   technology specific packages.
 - Move `HealthIndicator` implementations from a single package into
   technology specific packages.
 - As much as possible attempt to mirror the `spring-boot` package
   structure and class naming in `spring-boot-actuator` and
   `spring-boot-actuator-autoconfigure`.
 - Move `DataSourceBuilder` and DataSource meta-data support from
   `spring-boot-actuator` to `spring-boot`.

Fixes gh-10261
7 years ago
Andy Wilkinson ad4ce9cf57 Return objects from trace, audit event, and thread dump endpoints
Closes gh-7648
7 years ago
Andy Wilkinson a6b30a3aab Reflect context hierarchy in beans endpoint’s response structure
Closes gh-10156
7 years ago
Andy Wilkinson ab54801143 Improve structure of response from configprops endpoint
Closes gh-10162
7 years ago
Andy Wilkinson 9242def4c0 Improve structure and JSON serialization of beans endpoint's response
Closes gh-10156
7 years ago
Phillip Webb 2c97d3a5e9 Polish 7 years ago
Stephane Nicoll 98455e30dc Rename default endpoint settings to "default"
Closes gh-10098
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 08ce7e24d7 Polish 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
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
Andy Wilkinson 0aa39d0279 Improve the package structure of spring-boot-actuator module
Closes gh-7545
7 years ago
Andy Wilkinson bb55f49396 Remove concept of sensitivity from Actuator's endpoints
Closes gh-9924
7 years ago
Andy Wilkinson 847f6d1b2c Update test in Actuator sample to adapt to changes in env response
See gh-9864
7 years ago
Andy Wilkinson 4f76a560b8 Fix the Actuator sample 7 years ago
Andy Wilkinson 9f75da9a8f Simplify the Actuator's hypermedia support
This commit replaces the Acuator's support for hypermedia with a
single endpoint that returns HAL-formatted links to all of the
available endpoints. This is done without requiring Spring HATEOAS
to be on the classpath in a similar manner to the existing
CloudFoundry discovery endpoint.

Closes gh-9901
7 years ago
Phillip Webb 9db72450da Merge branch '1.5.x' 7 years ago
Phillip Webb 68910f2b8f Polish 7 years ago