Skip to content

Commit 30f7f9c

Browse files
juzeralisnicoll
authored andcommitted
Document sanitized keys and uri sanitization behavior
See gh-20169
1 parent fc410f0 commit 30f7f9c

File tree

1 file changed

+2
-1
lines changed
  • spring-boot-project/spring-boot-docs/src/main/asciidoc

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,11 +2211,12 @@ See also the section on "`<<spring-boot-features.adoc#boot-features-error-handli
22112211
=== Sanitize sensible values
22122212
Information returned by the `env` and `configprops` endpoints can be somewhat sensitive so keys matching a certain pattern are sanitized by default (i.e. their values are replaced by `+******+`).
22132213

2214-
Spring Boot uses sensible defaults for such keys: for instance, any key ending with the word "password", "secret", "key" or "token" is sanitized.
2214+
Spring Boot uses sensible defaults for such keys: for instance, any key ending with the word "password", "secret", "key", " "token", vcap_services", "sun.java.command", "uri", "uris", "address" or "addresses" is sanitized.
22152215
It is also possible to use a regular expression instead, such as `+*credentials.*+` to sanitize any key that holds the word `credentials` as part of the key.
22162216

22172217
The patterns to use can be customized using the `management.endpoint.env.keys-to-sanitize` and `management.endpoint.configprops.keys-to-sanitize` respectively.
22182218

2219+
If any of the keys to sanitize are URI format `<scheme>://<username>:<password>@<host>:<port>/`, only the password part is sanitized.
22192220

22202221

22212222
[[howto-security]]

0 commit comments

Comments
 (0)