-
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
Fix community_id
processor so that ports greater than 65535 aren't valid
#25409
Fix community_id
processor so that ports greater than 65535 aren't valid
#25409
Conversation
f575d83
to
efdee99
Compare
@andrewkroh Found a bug in the |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
jenkins run tests |
I see why the tests are failing, because of the unit16 conversion function. For numbers larger than a int16, its returning the remainder instead of just failing. |
I'm testing the |
I updated the function forcing the unit16 conversion and now all the tests pass. IDK if its the best way of doing it. |
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
/test |
21b3b1e
to
b018d2c
Compare
IDK why the community IDs are being removed from these documents when all teh pieces are valid, https://beats-ci.elastic.co/blue/organizations/jenkins/Beats%2Fbeats/detail/PR-25409/5/pipeline#step-7529-log-174. The Go tests pass just fine. |
This pull request is now in conflicts. Could you fix it? 🙏
|
b018d2c
to
c5b7cc5
Compare
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.
I think the types you removed are the ones causing the missing community_ids, since they are going to the default case. (Do not merge my suggestion as I am quite sure they are not correctly formatted)
/test |
/test |
Thanks for the work! |
…valid (#25409) (#25558) * initial commit * update function * update function per comments (cherry picked from commit 07d0cd8) Co-authored-by: Alex Resnick <[email protected]>
…valid (#25409) (#25557) * initial commit * update function * update function per comments (cherry picked from commit 07d0cd8) Co-authored-by: Alex Resnick <[email protected]>
…valid (#25409) (#25559) * initial commit * update function * update function per comments (cherry picked from commit 07d0cd8) Co-authored-by: Alex Resnick <[email protected]>
…valid (elastic#25409) (elastic#25559) * initial commit * update function * update function per comments (cherry picked from commit df5f409) Co-authored-by: Alex Resnick <[email protected]>
What does this PR do?
This changes the
community_id
processor so that it doesn't accept ports > 65535 or < 1. Based off of how the ES processor works, https://github.com/elastic/elasticsearch/blob/master/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/CommunityIdProcessor.java#L175Why is it important?
Currently the processor only checks for if the port != 0 but allows negative numbers and numbers > 65535 which is invalid.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
This is from #24620 when I moved the
community_id
processor from filebeat to the ingest pipeline, the ES processor does the additional checks that filebeat currently is not.Logs