[processor/redaction] Add support for keys patterns and ability to specify mask string #35830
Labels
enhancement
New feature or request
needs triage
New item requiring triage
processor/redaction
Redaction processor
Component(s)
processor/redaction
Is your feature request related to a problem? Please describe.
I want to redact my http access logs.
We log full request data including POST, cookies, etc...
There is a lot of various fields containing tokens, that I want to hide, these fields have common patterns like 'token' or 'apiKey'.
It will be complicated to collect all the variations of these keys and their values formats.
Also, I don't want to remove these keys from log attributes, because it's important to see if the field exists or not.
In addition, it may be useful to add hashing processing, to hash masked value instead of replacing with mask to keep ability to track logs by similar hash values in keys but without exposing the actual value.
Describe the solution you'd like
Masking option
And as result to get attributes like
request_args.secret_client_token: <redacted>
Or hashing option
And as result to get attributes like
request_args.secret_client_token: <sha1 sum>
Describe alternatives you've considered
Using transform processor:
But it's more complicated and it's possible due to a bug-feature inside
replace_all_patterns
ottl function, like:And I believe it can work faster as strict functionality in "redaction" processor than the statements pipeline in transform processor
Additional context
No response
The text was updated successfully, but these errors were encountered: