PRD: LOG_FULL egress logging credential redaction #264
Reference in New Issue
Block a user
Delete Branch "fix-log-full-credential-redaction"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #257.
PRD
Summary
_log_requestwas logging the sidecar-injected upstreamAuthorizationheader verbatim — a live bearer token written to stderr on every allowed request underLOG_FULL._log_requestnor_log_responsepassed header values or bodies throughredact_tokens, so recognized token patterns and provisioned secrets appeared in plaintext in full logs.Fix
authorizationheader entirely from_log_requestoutput (it is always a live sidecar-injected credential by the time the log call runs).redact_tokens(value, env=os.environ)to all remaining header values in both_log_requestand_log_response.redact_tokens(body, env=os.environ)to request and response bodies in both log functions.tests/unit/test_egress_addon_log_redaction.pycover each case (auth header stripped, body redacted, header value redacted) for both request and response paths.0661464a58to1f96619c6aaa559557abtof5fdc0ea72f5fdc0ea72toe7dacf7d86