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

[beatsauthextension] Add support for beats related ssl parameters to be used with otel-components #334

Merged
merged 14 commits into from
Feb 5, 2025

Conversation

khushijain21
Copy link
Contributor

@khushijain21 khushijain21 commented Jan 24, 2025

This extension supports beats' related client ssl parameters such as verification_mode , ca_trusted_fingerprint and ca_sha256 to be used with otel components using extensions

Local Testing done as follows:

receivers:
  otlpjsonfile:
    include_file_name: true
    include:
      - "./otlp-all.json"

extensions:
  beatsauth: 
    tls:
      verification_mode: full
      ca_trusted_fingerprint: "XXX"

exporters:
  debug:
    verbosity: detailed
  elasticsearch: 
   endpoints: 
    -  https://my-deployment-XXX:443
   password: XXXX
   user: elastic
   tls:
    ca_file: ./ca.crt
   auth: 
    authenticator: beatsauth  

service:
  extensions: [beatsauth]
  pipelines:
    logs:
      receivers: [otlpjsonfile]
      processors: []
      exporters: [debug, elasticsearch]

The ca.crt file contains a a self signed certificate. And when ca_trusted_fingerprint is not used, the indexing fails. The indexing is successfull on passing correct ca_trusted_fingerprint.

image

@khushijain21 khushijain21 requested a review from a team as a code owner January 24, 2025 14:54
@khushijain21 khushijain21 changed the title [Beatsauthextension] Add support for beats related ssl parameters to be used with otel-components [beatsauthextension] Add support for beats related ssl parameters to be used with otel-components Jan 24, 2025
@khushijain21 khushijain21 marked this pull request as ready for review January 29, 2025 03:20
@khushijain21
Copy link
Contributor Author

/test

khushijain21 and others added 3 commits January 31, 2025 12:01
@khushijain21 khushijain21 requested review from axw and mauri870 January 31, 2025 12:40
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I think it could do with a bit more test coverage, but otherwise LGTM.

extension/beatsauthextension/authenticator_test.go Outdated Show resolved Hide resolved
@khushijain21
Copy link
Contributor Author

can this PR be merged?

@axw
Copy link
Member

axw commented Feb 3, 2025

I'm not super close to Beats these days, so I suggest we wait for @mauri870 to take another look before merging.

Copy link
Contributor

@rogercoll rogercoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding the extension directory into the depenabot configuration file as well https://github.com/elastic/opentelemetry-collector-components/blob/main/.github/dependabot.yml?

That would help to upgrade the testing distribution all at once. Thank you (sorry about not having written guidelines for that yet)

Copy link
Member

@mauri870 mauri870 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@axw axw merged commit 1065ed4 into elastic:main Feb 5, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants