Class EnvironmentFilterSpecification
java.lang.Object
io.micronaut.management.endpoint.env.EnvironmentFilterSpecification
This class is passed to an instance of
EnvironmentEndpointFilter
(if one is defined) each time the EnvironmentEndpoint
is invoked.- Since:
- 3.3.0
- Author:
- Tim Yates
-
Method Summary
Modifier and TypeMethodDescriptionAdds literal strings to the list of excluded keys.Adds a predicate to test property keys.Adds regular expression patterns to the list of known masks.Configures the key masking to behave as it did prior to 3.3.0.maskAll()
Turn on global masking.maskNone()
Turn off global masking.
-
Method Details
-
maskAll
Turn on global masking. Items can be unmasked by executing any of the exclude methods.- Returns:
- this
-
maskNone
Turn off global masking. Items can be masked by executing any of the exclude methods.- Returns:
- this
-
exclude
@NonNull public @NonNull EnvironmentFilterSpecification exclude(@NonNull @NonNull Predicate<String> keyPredicate) Adds a predicate to test property keys. If themaskAll()
flag is set then this will be used for exceptions (values in clear-text). If themaskNone()
flag is set then this will be those values that are masked.- Parameters:
keyPredicate
- A predicate to match against property keys for masking- Returns:
- this
-
exclude
Adds literal strings to the list of excluded keys. If themaskAll()
flag is set then this list will be used for exceptions (values in clear-text). If themaskNone()
flag is set then this list will be those values that are masked.- Parameters:
keys
- Literal keys that should be excluded- Returns:
- this
-
exclude
@NonNull public @NonNull EnvironmentFilterSpecification exclude(@NonNull @NonNull Pattern... keyPatterns) Adds regular expression patterns to the list of known masks. If themaskAll()
flag is set then this list will be used for exceptions (values in clear-text). If themaskNone()
flag is set then this list will be those values that are masked. Patterns must match the entire property key.- Parameters:
keyPatterns
- The patterns used to compare keys to exclude them- Returns:
- this
-
legacyMasking
Configures the key masking to behave as it did prior to 3.3.0.- Returns:
- this
-