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

Initial OAuth #29494

Closed
wants to merge 5 commits into from
Closed

Initial OAuth #29494

wants to merge 5 commits into from

Conversation

padraicbc
Copy link
Contributor

@padraicbc padraicbc commented Nov 24, 2023

Description:

Adds OAuth support to Kafka/Sarama

Link to tracking Issue:

Testing:

Documentation:

To use it in the config under exporters:

  kafka/dev-oauth:
      topic: metrics
      brokers:
        - XXXX:9095
      auth:
        oauth2: 
          client_id: XXXXX
          client_secret: XXXXXXXXXXXXXXX
          token_url:  "https://XXXX/v1/token"
          scopes: ["some-scope"]

@atoulme
Copy link
Contributor

atoulme commented Nov 28, 2023

Please add tests - any chance to reuse the configauth package to set up this oauth client provider?

@padraicbc
Copy link
Contributor Author

padraicbc commented Nov 29, 2023

Please add tests - any chance to reuse the configauth package to set up this oauth client provider?

No worries. I will add some tests.

I did actually use oauth2client from there initially but it threw an error around expecting a map and getting a string whan I passed the oauth2client extenstion in under the auth key? I saw nothing was used in the Sarama config so realised it wasn't supported anyway, so I added this PR. I presume we would need to restructure how things are done to integrate the extension?

@MovieStoreGuy
Copy link
Contributor

Please add tests - any chance to reuse the configauth package to set up this oauth client provider?

No worries. I will add some tests.

I did actually use oauth2client from there initially but it threw an error around expecting a map and getting a string whan I passed the oauth2client extenstion in under the auth key? I saw nothing was used in the Sarama config so realised it wasn't supported anyway, so I added this PR. I presume we would need to restructure how things are done to integrate the extension?

Yeah, for the extension to work we would need to provide a means to wrap the auth provider and then make sarama happy to run it.

Copy link
Contributor

github-actions bot commented Jan 1, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 1, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants