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

Add OAuth support to registry client #2317

Open
larserikfinholt opened this issue Sep 23, 2024 · 0 comments
Open

Add OAuth support to registry client #2317

larserikfinholt opened this issue Sep 23, 2024 · 0 comments

Comments

@larserikfinholt
Copy link

larserikfinholt commented Sep 23, 2024

The java client have a nice SASL_OAUTHBEARER_INHERIT, and also oauth support. Any chance this could be added?

The workaround I see today is to use the IAuthenticationHeaderValueProvider.. and implement this:

  AuthenticationHeaderValue IAuthenticationHeaderValueProvider.GetAuthenticationHeader()
  {
      return new AuthenticationHeaderValue("Bearer", _accessToken);
  }
_registryClient = new CachedSchemaRegistryClient(schemaConfig, myIAuthHeaderProvider);

Problem is that this gives my the follwing error:

[https://zzzzzzz.westeurope.azure.confluent.cloud/] HttpRequestException: Unauthorized

I noticed it calls the GetAuthenticationHeader where i provide a valid token but still no luck.

Should my workaround work, or are there more stuff that might not be supported? Any idea what I could try? (My admin client works fine)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants