-
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
[filebeat][s3] Add custom parsing script for S3 notifications #28946
Conversation
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
afacd90
to
49988f9
Compare
It can be used as a regular JS map since its only purpose is to be read.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Do we have a use case where the notification received via SQS isn't JSON? I'm just wondering if we need full JavaScript support or if greater flexibility in JSON parsing would be sufficient. |
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.
Nice work! Now this input should be able to handle just about any notification format users throw at it.
Pinging @elastic/integrations (Team:Integrations) |
* Add custom parsing script for S3 notifications * Remove unnecessary custom jsmapstr type. It can be used as a regular JS map since its only purpose is to be read. * add docs and changelog entry * Remove commented code * Document script options restriction * Better error if Records are missing in notification * Fix test * Pass notification as string and add xml parsing options for the scripts (cherry picked from commit df3fcec)
* Add custom parsing script for S3 notifications * Remove unnecessary custom jsmapstr type. It can be used as a regular JS map since its only purpose is to be read. * add docs and changelog entry * Remove commented code * Document script options restriction * Better error if Records are missing in notification * Fix test * Pass notification as string and add xml parsing options for the scripts (cherry picked from commit df3fcec)
#29027) * Add custom parsing script for S3 notifications * Remove unnecessary custom jsmapstr type. It can be used as a regular JS map since its only purpose is to be read. * add docs and changelog entry * Remove commented code * Document script options restriction * Better error if Records are missing in notification * Fix test * Pass notification as string and add xml parsing options for the scripts (cherry picked from commit df3fcec) Co-authored-by: Marc Guasch <[email protected]>
…S3 notifications (#29026) * [filebeat][s3] Add custom parsing script for S3 notifications (#28946) * Add custom parsing script for S3 notifications * Remove unnecessary custom jsmapstr type. It can be used as a regular JS map since its only purpose is to be read. * add docs and changelog entry * Remove commented code * Document script options restriction * Better error if Records are missing in notification * Fix test * Pass notification as string and add xml parsing options for the scripts (cherry picked from commit df3fcec) * Remove Provider field not present in branch Co-authored-by: Marc Guasch <[email protected]> Co-authored-by: Marc Guasch <[email protected]>
What does this PR do?
Adds the ability to define a custom parsing script to deal with non-standard S3 notifications received through SQS.
Improves error handling for malformed S3 notifications.
Why is it important?
In some scenarios the received SQS notification might be non-standard. This change lets the user define a custom parsing script to deal with them.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Closes #28828