Skip to content

Commit 5692b83

Browse files
committed
Add note on sanitizing values
Closes gh-13138
1 parent 3118f14 commit 5692b83

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2403,6 +2403,22 @@ how to register handlers in the servlet container.
24032403

24042404

24052405

2406+
[[howto-sanitize-sensible-values]]
2407+
=== Sanitize sensible values
2408+
Information returned by the `env` and `configprops` endpoints can be somewhat sensitive
2409+
so keys matching a certain pattern are sanitized by default (i.e. their values are
2410+
replaced by `******`).
2411+
2412+
Spring Boot uses sensible defaults for such keys: for instance, any key ending with the
2413+
word "password", "secret", "key" or "token" is sanitized. It is also possible to use a
2414+
regular expression instead, such as `*credentials.*` to sanitize any key that holds the
2415+
word `credentials` as part of the key.
2416+
2417+
The patterns to use can be customized using the `endpoints.env.keys-to-sanitize` and
2418+
`endpoints.configprops.keys-to-sanitize` respectively.
2419+
2420+
2421+
24062422
[[howto-use-actuator-with-jersey]]
24072423
=== Actuator and Jersey
24082424
Actuator HTTP endpoints are only available for Spring MVC-based applications. If you want

0 commit comments

Comments
 (0)