pyisyox.redactor module¶
Log redactor for sensitive fields in eisy responses.
The POST /api/login response leaks the PG3 MQTT TLS keypair under
data.ssl (verified in HAR captures, 2026-05-06). Access and refresh
tokens are also sensitive. Apply redact_sensitive() to any
debug-level dump of a JSON response body before logging.
Redactor walks the payload recursively so nested envelopes
({"successful": true, "data": {...}}) are still scrubbed.
- SENSITIVE_KEYS: frozenset[str]¶
Keys whose values are replaced with
<redacted>regardless of their position in the payload tree.
- redact_sensitive(payload, *, sensitive_keys=frozenset({'Authorization', 'Cookie', 'Set-Cookie', 'accessToken', 'authorization', 'clientToken', 'cookie', 'password', 'refreshToken', 'setCookie', 'ssl', 'token'}))[source]¶
Return a deep copy of
payloadwith sensitive values replaced.Walks dicts and lists recursively. Non-container values pass through unchanged. The original
payloadis not mutated.- Parameters:
- Returns:
A deep copy with sensitive values replaced by
REDACTED.- Return type: