-
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/internal/private: add field redaction package #40997
Conversation
bc07dc6
to
7fb16b7
Compare
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
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.
Approving as copyright holder of the original code.
7fb16b7
to
a628d62
Compare
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
ac8d34e
to
5cd84f6
Compare
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Initial donation of code from github.com/kortschak/dex/internal/private.
The original package was not designed to deal with values that could not have sibling fields to mark privacy. This adds the capacity to redact such types.
This comment was marked as resolved.
This comment was marked as resolved.
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.
Overall LGTM.
03ce9f0
to
7c9a3a4
Compare
FYI @michel-laterman in case this can help with the secrets redaction work you're doing in agent diagnostics. |
Is there a reason this is in the x-pack/filebeat/input directory instead of say libbeat? Or is this intended to be specific to an input that doesn't quite exist yet? On that note, it'd be helpful to have this used somewhere in Beats but I'm not opposed to merging this despite that. |
@cmacknz This is intended to be used by the httpjson (and to replace the cel redact code). If it wants to be made more widely used, I'm ok with that, but I'd like to let it soak with httpjson and cel first if that's OK (I have some ideas to improve the ergonomics of the API and I'd like to have the freedom that internal gives to allow that work to happen more easily). |
Very interesting approach, I think we should get something in elastic-agent-libs to redact structs for us (in the future). For context, we've added a |
…40997) (#41210) This package supports zeroing arbitrary fields based on a set of redaction paths or field sibling marks. (cherry picked from commit 9fde7b0) Co-authored-by: Dan Kortschak <[email protected]>
Proposed commit message
Initial donation of code from github.com/kortschak/dex/internal/private.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Could also be used in place of the current redactor in CEL, though that has a non-deletion redaction that this does not have. Adding that requires thought since this will redact non-string values.
Screenshots
Logs