-
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
feat: add support for SCRAM authentication for kafka metricbeat module, fixes #19648 #24810
Conversation
💚 CLA has been signed |
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪Test errorsExpand to view the tests failures
|
Test | Results |
---|---|
Failed | 1 |
Passed | 45948 |
Skipped | 5012 |
Total | 50961 |
Genuine test errors
💔 There are test failures but not known flaky tests, most likely a genuine test failure.
- Name:
Build&Test / filebeat-windows-windows-2019 / test_restart_recursive_glob – filebeat.tests.system.test_input.Test
Pinging @elastic/integrations (Team:Integrations) |
/test |
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.
Thanks for working on this!
Could you please add a changelog entry in CHANGELOG.next.asciidoc
mentioning that SCRAM is supported in the Metricbeat module?
You will also need to sign the CLA so we can accept the change.
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
At this point input validation should have been done already.
CLA is signed |
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.
Thanks for signing the CLA and applying the suggested changes! Added a couple of small comments.
/test |
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
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.
👍
/test |
@fholzer linting failures in metricbeat are related to this change, you will need to run |
Failing test is not related, merging. |
…tic#24810) (cherry picked from commit 66829ff)
* upstream/master: (91 commits) [Filebeat] Change okta.target to nested field (elastic#24636) Add RFC5424 format support for syslog input (elastic#23954) Fix links to Beats product pages (elastic#24821) [DOCS] Fix 'make setup' instructions for a new beat (elastic#24944) Remove duplicate decode_xml entry (elastic#24941) [libbeat] Add wineventlog schema to decode_xml processor (elastic#24726) [Elastic Agent] Add check for URL set when cert and cert key. (elastic#24904) feat: stage execution cache (elastic#24780) Fix error in Journalbeat commands (elastic#24880) Add baseline ECS 1.9.0 upgrade (elastic#24909) [Elastic Agent] Cloud container legacy apm files. (elastic#24896) [Elastic Agent]: Reduce allowed socket path length (elastic#24914) Add ability to destroy indices with wildcards in testing (elastic#24915) Add status subcommand to report status of running daemon. (elastic#24856) Fix types of fields GetHits and Ops in Metricbeat module for Couchbase (elastic#23287) Add support for Filestream input in elastic agent. (elastic#24820) Implement k8s secrets provider for Agent (elastic#24789) Sort processor list in docs (elastic#24874) Add support for SCRAM authentication in kafka metricbeat module (elastic#24810) Properly update offset in case of unparasable line (elastic#22685) ...
What does this PR do?
Adds SCRAM authentication for kafka to metricbeat's kafka module. Moves shared code from kafka output plugin to
libbeat/common/kafka/
Why is it important?
Currently metricbeat can't pull metrics from Kafka clusters that require authentication, which is a problem in enterprise environments where authentication is a requirement.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.I think most of this isn't applicable, as this PR virtually just moves files around and makes couple things public in the shared code. This virtually no new code introduced.
Reg. "I have made corresponding changes to the documentation", it seems that none of the kafka module's fields in metricbeat are separately documented. Instead the config.yml is pulled into the asciidoc file, which I updated.
How to test this PR locally
As this PR mostly just moves existing files around and introduces only minimal code changes, the test procedures remain the same as those for #12867 which initially introduced SCRAM code. Though it seems those were not documented at the time. Generally, though, the procedure documented in beats/blob/master/metricbeat/module/kafka/README.md remains the same, with the exception that the test kafka cluster needs to use one of the SCAM mechanisms, eg. in
server.properties
havelistener.name.external.sasl.enabled.mechanisms=SCRAM-SHA-256
configured. (if you external listener is calledEXTERNAL
)Related issues
Use cases
This PR introduces
sasl.mechanism
in metricbeat's kafka input module. It works the same way as the similarly named configuration directive in libbeat's kafka output plugin.