confluent-kafka-dotnet
confluent-kafka-dotnet copied to clipboard
Add OAuth support to registry client
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)