Skip to content
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

Cherry-pick #24810 to 7.x: feat: add support for SCRAM authentication for kafka metricbeat module, fixes #19648 #24889

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Apr 1, 2021

Cherry-pick of PR #24810 to 7.x branch. Original message:

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

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-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 have listener.name.external.sasl.enabled.mechanisms=SCRAM-SHA-256 configured. (if you external listener is called EXTERNAL)

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.

@jsoriano jsoriano added [zube]: In Review backport Team:Integrations Label for the Integrations team labels Apr 1, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 1, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 1, 2021
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #24889 opened

  • Start Time: 2021-04-01T09:10:45.663+0000

  • Duration: 140 min 22 sec

  • Commit: 327171d

Test stats 🧪

Test Results
Failed 0
Passed 45844
Skipped 5051
Total 50895

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 45844
Skipped 5051
Total 50895

@jsoriano jsoriano merged commit 1bc0b43 into elastic:7.x Apr 1, 2021
@jsoriano jsoriano deleted the backport_24810_7.x branch April 1, 2021 11:41
@zube zube bot removed the [zube]: Done label Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants