yera.security.redaction
Structured redaction for diagnostic values.
Symbols
install_sensitive_data_filter
install_sensitive_data_filter() → NoneAttach structured redaction to every configured root handler.
redact_sensitive_fields
redact_sensitive_fields(
value: object,
) → objectReturn diagnostic data with structured secret fields redacted.
Parameters
value
type: object
Nested dictionaries, lists, tuples, or scalar diagnostic data.
Returns
type: object
A copied structure in which recognized sensitive fields contain redaction markers.
SensitiveDataFilter
Inherits:
logging.FilterRedact structured secret fields from log records.
Methods
filter — Redact structured values before a record is formatted.
SensitiveDataFilter.filter
filter(
record: logging.LogRecord,
) → boolRedact structured values before a record is formatted.
Parameters
record
type: logging.LogRecord
Mutable logging record entering a handler.
Returns
type: bool
Always True so the redacted record remains loggable.