Expand description
Credential redaction compatible with the DataExcept wire contract.
The helpers in this module preserve operational context such as URL scheme, host, port, and optionally path while removing credentials from userinfo, sensitive query parameters, sensitive fragment parameters, and free-form text containing URLs.
Constants§
- MIN_
REMOVABLE_ SECRET_ LENGTH - Minimum secret length for safe substring replacement in free-form text.
- PLACEHOLDER
- Visible marker used in place of credentials.
Functions§
- fingerprint
- Returns a short, one-way SHA-256 fingerprint.
- redact_
if_ url - Redacts a value only when it contains a URL scheme delimiter.
- redact_
secret - Replaces an optional secret with a placeholder and fingerprint.
- redact_
url - Strips credentials from a URL while preserving useful routing information.
- redact_
urls_ in_ text - Redacts every URL found in free-form text.
- remove_
secret - Removes a known secret from free-form text.