Skip to content

Conversation

richscott
Copy link

This change adds support for authentication via OIDC to the Kafka client. It provides an implementation of the sarama.AccessTokenProvider interface, supporting the client_credentials Grant Type, and a background token refresh.

richscott added 30 commits July 21, 2025 10:02
…elemetry-collector-contrib into feature/kafa-openid-auth

Signed-off-by: Rich Scott <[email protected]>
Add more assertions on the inner token string in the resultant
sarama access token.

Signed-off-by: Rich Scott <[email protected]>
This is so we can quickly stop/start a new server in each
test func.

Signed-off-by: Rich Scott <[email protected]>
Also give some vars better names; disable some logging
messages.

Signed-off-by: Rich Scott <[email protected]>
Remove debugging messages.

Signed-off-by: Rich Scott <[email protected]>
Signed-off-by: Rich Scott <[email protected]>
Also, manually build a (small subset of a) K8S token, for unit-testing.

Signed-off-by: Rich Scott <[email protected]>
Also accept and propagate EndpointParams and AuthStyle
fields for oauth2 clientcredentials.Config.

Signed-off-by: Rich Scott <[email protected]>
Also add authentication configuration setup test.

Signed-off-by: Rich Scott <[email protected]>
…lemetry-collector-contrib into feature/kafka-oidc-auth
@MovieStoreGuy
Copy link
Contributor

Hey @richscott ,

Please make sure you sign the CLA so we can include the changes into the project.

@richscott
Copy link
Author

richscott commented Aug 11, 2025

@MovieStoreGuy Will do - my employer is adding me to our corporate (in GH and/or elsewhere) org imminently, and then I will set up the CLA as a Corporate Contributor asap. Thanks.

Also check if our context is done before calling updateToken().

Signed-off-by: Rich Scott <[email protected]>
@richscott richscott marked this pull request as ready for review September 15, 2025 18:27
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.

4 participants