imperva_cloud_waf: step over non-UTF-8 data work items - #13152
Merged
Conversation
efd6
force-pushed
the
s5733-imperva_cloud_waf_unwedge
branch
from
March 18, 2025 05:45
6a31f3a to
8f5776e
Compare
Contributor
🚀 Benchmarks reportTo see the full report comment with |
efd6
marked this pull request as ready for review
March 18, 2025 06:16
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
It is possible for users to incorrectly configure their Imperva Cloud WAF logging to send compressed data (this is the default). This results in a CEL evaluation failure since we depend on the data being string CEF. When the non-UTF-8 data is converted to a string, CEL refuses to peform the conversion by design. When a user has done this, it appears that logs in the compressed form persist, so the agent is unable to move past the integration-invalid data. This change tries to perform the conversion, falling back to an error message being sent to the index when it is not possible. This helps identify cases where the configuration is incorrect, and allows the collection to step over the bodies that are not consumable. Unfortunately we cannot make use of fleet health notifications since sending object errors prevents cursor updates, and so would result in continuing to be stuck.
efd6
force-pushed
the
s5733-imperva_cloud_waf_unwedge
branch
from
March 18, 2025 20:48
8f5776e to
975b717
Compare
chrisberkhout
approved these changes
Mar 18, 2025
chrisberkhout
left a comment
Contributor
There was a problem hiding this comment.
Very nice.
The commit description is good and clear.
💚 Build Succeeded
History
cc @efd6 |
|
Contributor
|
Package imperva_cloud_waf - 1.11.0 containing this change is available at https://epr.elastic.co/package/imperva_cloud_waf/1.11.0/ |
flexitrev
pushed a commit
that referenced
this pull request
Mar 20, 2025
It is possible for users to incorrectly configure their Imperva Cloud WAF logging to send compressed data (this is the default). This results in a CEL evaluation failure since we depend on the data being string CEF. When the non-UTF-8 data is converted to a string, CEL refuses to peform the conversion by design. When a user has done this, it appears that logs in the compressed form persist, so the agent is unable to move past the integration-invalid data. This change tries to perform the conversion, falling back to an error message being sent to the index when it is not possible. This helps identify cases where the configuration is incorrect, and allows the collection to step over the bodies that are not consumable. Unfortunately we cannot make use of fleet health notifications since sending object errors prevents cursor updates, and so would result in continuing to be stuck.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Proposed commit message
Warning
The CEL input in this integration is not tested in system tests. Please review with extra care.
PoC:
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots