-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x-pack/filebeat/input/cel: allow users to redact state fields in logs #34302
Conversation
b2b8131
to
bf34bef
Compare
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
The golangci-lint action is wrong with its complaint. |
This pull request is now in conflicts. Could you fix it? 🙏
|
/test |
/test |
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request is now in conflicts. Could you fix it? 🙏
|
This add logic, configuration and documentation for redacting parts of pre- and post-processing CEL state when logging state to debug logs. The configuration allows users to specify fields that should not be entered into logs and whether these fields should be masked or deleted from the logged object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
// String renders the JSON corresponding to r.state after applying redaction | ||
// operations. | ||
func (r redactor) String() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you wanted the data to remain in a structured format and do it lazily you could implement https://pkg.go.dev/go.uber.org/zap@v1.24.0/zapcore#ObjectMarshalerFunc.MarshalLogObject. I don't have any preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recommended approach for doing that does not really simplify things from what I can see. This is from zap issue 750.
…#34302) This add logic, configuration and documentation for redacting parts of pre- and post-processing CEL state when logging state to debug logs. The configuration allows users to specify fields that should not be entered into logs and whether these fields should be masked or deleted from the logged object.
What does this PR do?
This add logic, configuration and documentation for redacting parts of pre- and post-processing CEL state when logging state to debug logs. The configuration allows users to specify fields that should not be entered into logs and whether these fields should be masked or deleted from the logged object.
Why is it important?
Leaking secrets to debug logs is a significant attack surface.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs