Expand description
Request and response logging utilities with automatic secret redaction.
This module provides logging capabilities for HTTP requests and responses, with built-in automatic redaction of sensitive information including:
- Authorization headers
- API keys in query parameters
- Values matching configured
x-aperture-secretenvironment variables
Structs§
- Secret
Context - Context containing resolved secret values for dynamic redaction.
Functions§
- get_
max_ body_ len - Gets the maximum body length from
APERTURE_LOG_MAX_BODYenvironment variable - log_
request - Logs an HTTP request with optional headers and body
- log_
response - Logs an HTTP response with optional headers and body
- redact_
sensitive_ value - Redacts sensitive values from strings
- redact_
url_ query_ params - Redacts sensitive query parameters from a URL
- should_
redact_ header - Checks if a header name should be redacted.