Interface RestDebugBodyScrubber
This SPI is not a default protection. Body dumping is off by default and is enabled only by the
JUNEAU_REST_DEBUG_ALLOW_DUMP_BODIES environment-variable master gate. A scrubber only ever runs once that gate
has already permitted dumping; it merely chooses scrubbed-vs-raw body text (e.g. mask fields, drop sections). A
configured scrubber never causes body content to be emitted while the gate is unset.
The scrubber is fail-closed: if scrub(String, String) throws or returns
Implementations must be thread-safe — the formatter may invoke scrub(String, String) concurrently.
See Also:
- Since:
- 10.0.0
-
Method Summary
-
Method Details
-
scrub
Transforms body text before it is logged.- Parameters:
contentType- The body's content type (may benull if unknown).body- The raw (already byte-capped) body text.- Returns:
- The scrubbed body text to log, or
null to fail closed (the formatter emits a placeholder instead).
-