-
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: make redact configuration recommended #36008
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
This pull request doesn't have a |
62b1fa2
to
b2488a0
Compare
x-pack/filebeat/input/cel/config.go
Outdated
@@ -65,6 +66,10 @@ type redact struct { | |||
} | |||
|
|||
func (c config) Validate() error { | |||
if c.Redact == nil { | |||
logp.L().Named("input.cel").Warn("missing recommended 'redact' configuration: " + | |||
"see documentation for details: https://www.elastic.co/guide/en/beats/filebeat/8.9/filebeat-input-cel.html#_redact_fields") |
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 link here is to 8.9 because the docs currently list "current" as 8.8.
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.
When this is released "current" will point to 8.9 so I think it would be safe to use it here.
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.
True. In that case I'll change to _redact rather than _redact_fields, since that will have the actual claims.
This comment was marked as outdated.
This comment was marked as outdated.
b2488a0
to
5504cc2
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
Ideally this would be a hard requirement, but that would be a breaking change, so just log at WARN if the configuration is missing.
5504cc2
to
5e2fe86
Compare
x-pack/filebeat/input/cel/config.go
Outdated
@@ -65,6 +66,10 @@ type redact struct { | |||
} | |||
|
|||
func (c config) Validate() error { | |||
if c.Redact == nil { | |||
logp.L().Named("input.cel").Warn("missing recommended 'redact' configuration: " + | |||
"see documentation for details: https://www.elastic.co/guide/en/beats/filebeat/8.9/filebeat-input-cel.html#_redact_fields") |
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.
When this is released "current" will point to 8.9 so I think it would be safe to use it here.
) Ideally this would be a hard requirement, but that would be a breaking change, so just log at WARN if the configuration is missing. (cherry picked from commit ae923ba)
) (#36046) Ideally this would be a hard requirement, but that would be a breaking change, so just log at WARN if the configuration is missing. (cherry picked from commit ae923ba) Co-authored-by: Dan Kortschak <[email protected]>
…stic#36008) Ideally this would be a hard requirement, but that would be a breaking change, so just log at WARN if the configuration is missing.
What does this PR do?
This detects when a user has not configured the redact options in the CEL input for filebeat and logs it as missing with a link to the documentation.
Ideally this would be a hard requirement, but that would be a breaking change, so just log at WARN if the configuration is missing.
Why is it important?
By design the CEL input can log the entire input state and its evaluation during debug logging. This may leak secrets, so we provide an option to allow users to specify fields that are sensitive to be redacted or deleted. If the user is not aware of this behaviour or the option to redact they may put themselves at risk. The change here it designed to help them identify this risk.
Backported to 8.9 despite being an enhancement because of risk.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs