Support global endpoint.sensitive override
Add support for an `endpoint.sensitive` property that can be used to override the endpoint `sensitive` default. Fixes gh-4419
This commit is contained in:
@@ -724,6 +724,8 @@ content into your application; rather pick only the properties that you need.
|
||||
# ----------------------------------------
|
||||
|
||||
# ENDPOINTS ({sc-spring-boot-actuator}/endpoint/AbstractEndpoint.{sc-ext}[AbstractEndpoint] subclasses)
|
||||
endpoints.enabled=true # Enable endpoints.
|
||||
endpoints.sensitive= # Default endpoint sensitive setting.
|
||||
endpoints.actuator.enabled=true # Enable the endpoint.
|
||||
endpoints.actuator.path= # Endpoint URL path.
|
||||
endpoints.actuator.sensitive=false # Enable security on the endpoint.
|
||||
@@ -744,7 +746,6 @@ content into your application; rather pick only the properties that you need.
|
||||
endpoints.dump.enabled= # Enable the endpoint.
|
||||
endpoints.dump.id= # Endpoint identifier.
|
||||
endpoints.dump.sensitive= # Mark if the endpoint exposes sensitive information.
|
||||
endpoints.enabled=true # Enable endpoints.
|
||||
endpoints.env.enabled= # Enable the endpoint.
|
||||
endpoints.env.id= # Endpoint identifier.
|
||||
endpoints.env.keys-to-sanitize=password,secret,key,.*credentials.*,vcap_services # Keys that should be sanitized. Keys can be simple strings that the property ends with or regex expressions.
|
||||
|
||||
@@ -65,7 +65,7 @@ The following endpoints are available:
|
||||
|
||||
[cols="2,5,1"]
|
||||
|===
|
||||
| ID | Description | Sensitive
|
||||
| ID | Description | Sensitive Default
|
||||
|
||||
|`actuator`
|
||||
|Provides a hypermedia-based "`discovery page`" for the other endpoints. Requires Spring
|
||||
@@ -166,6 +166,18 @@ For example, the following will disable _all_ endpoints except for `info`:
|
||||
endpoints.info.enabled=true
|
||||
----
|
||||
|
||||
Likewise, you can also choose to globally set the "`sensitive`" flag of all endpoints. By
|
||||
default, the sensitive flag depends on the type of endpoint (see the table above).
|
||||
For example, to mark _all_ endpoints as sensitive except `info`:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
endpoints.sensitive=true
|
||||
endpoints.info.sensitive=false
|
||||
----
|
||||
|
||||
|
||||
|
||||
[[production-ready-endpoint-hypermedia]]
|
||||
=== Hypermedia for actuator MVC endpoints
|
||||
If http://projects.spring.io/spring-hateoas[Spring HATEOAS] is on the classpath (e.g.
|
||||
|
||||
Reference in New Issue
Block a user