gklijs / schema_registry_converter

A crate to convert bytes to something more useable and the other way around in a way Compatible with the Confluent Schema Registry. Supporting Avro, Protobuf, Json schema, and both async and blocking.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API authorization

onsails opened this issue · comments

Is your feature request related to a problem? Please describe.
Confluent Cloud requires schema api clients to authorize requests.

Describe the solution you'd like
API for providing username and password.

Makes sense and I think it should not be that hard. It's just I never used Confluent Cloud. But definitely going to look into it.

Going to try in the near future to add the same http call related features as the Java client. So also enable proxy and such. Should not be to hard, and basically just passing the options to the http library. I'm also thinking of changing to request from curl as dependency.

Created #26. Need to work on Protobuf support first, but probably will take this up after. New release should be available in a few weeks.

Added lots of features in the last weeks. Still have to update the documentation also. You need to enable the feature avro now to use it with avro. And instead of having a Encoder/Decoder it has been renamed to AvroEncoder/AvroDecoder. But using like:

let sr_settings = SrSettings::new_builder(String::from("https://condluent.cloud.url"))
    .set_basic_authorization("api-key", Some("api-secret"))
    .build()
    .unwrap();
let decoder = Avrodecoder::new(sr_settings)       

It should now be possible to use it with Confluent Cloud. @onsails could you maybe check depending on this github master if it works?

Closing this, as I'm almost sure it would work now. Feel free to open a new issue if it isn't.