RedactsSensitiveData
trait RedactsSensitiveData
Constants
| protected REDACTED |
|
| protected UNSERIALIZABLE |
|
| protected URL_HEADERS |
The headers whose value is a URL, so their sensitive query parameters are redacted. |
Methods
Redact the values of the given keys throughout the data.
Final storage pass for entry payloads. Earlier builders redact known request surfaces, but this keeps persisted entries private if a future collector path adds sensitive data before save.
Redact the values of the given lowercase keys at every depth.
Flatten the given headers, redacting the sensitive ones and the sensitive query parameters of URL headers.
Normalize the configured sensitive keys to unique lowercase strings.
Redact sensitive query parameters from the URLs in the data.
Redact the values of sensitive query parameters. A parameter matches when its decoded
name or any of its bracketed segments (e.g. filter[secret]) is a sensitive key. The
query is not parsed and rebuilt, so every other byte of the URL is kept as recorded,
and relative or malformed URLs are redacted the same way.
Replace leaf values that cannot be stored as JSON with a marker.
Determine if the value can be stored as JSON.
Details
at line 27
protected array
redact(array $data, array $keys)
Redact the values of the given keys throughout the data.
at line 46
protected array
redactSensitiveStoragePayload(array $payload)
Final storage pass for entry payloads. Earlier builders redact known request surfaces, but this keeps persisted entries private if a future collector path adds sensitive data before save.
at line 81
protected array
redactRecursive(array $data, array $loweredKeys)
Redact the values of the given lowercase keys at every depth.
at line 101
protected array
redactHeaders(array $headers)
Flatten the given headers, redacting the sensitive ones and the sensitive query parameters of URL headers.
at line 127
protected array
normalizeSensitiveKeys(array $keys)
Normalize the configured sensitive keys to unique lowercase strings.
at line 149
protected array
redactUrls(array $data, array $keys)
Redact sensitive query parameters from the URLs in the data.
at line 181
protected string
redactUrl(string $url, array $keys)
Redact the values of sensitive query parameters. A parameter matches when its decoded
name or any of its bracketed segments (e.g. filter[secret]) is a sensitive key. The
query is not parsed and rebuilt, so every other byte of the URL is kept as recorded,
and relative or malformed URLs are redacted the same way.
at line 210
protected array
sanitizeForJsonEncoding(array $data)
Replace leaf values that cannot be stored as JSON with a marker.
at line 226
protected bool
isJsonEncodable(mixed $value)
Determine if the value can be stored as JSON.