Fork me on GitHub
#jackdaw
<
2019-05-17
>
billh09:05:25

I got basic auth working with jackdaw but had to create my own registry client like so

(defn cached-schema-registry-cli []
  (let [restService (RestService. "")]
    (CachedSchemaRegistryClient. restService 10 (doto (new java.util.HashMap) (.put "basic.auth.credentials.source" "URL")))))

(def serde-resolver
  (partial resolver/serde-resolver :schema-registry-url "" :schema-registry-client (cached-schema-registry-cli)))
I'm not sure if its how jackdaw creates its default client or not but I couldn't find a way to set or get it to pick up the piece of config to tell it to extract the basic auth creds from the URL

cddr09:05:07

Ah interesting. Looks like this class https://github.com/confluentinc/schema-registry/blob/1bad204f73f54f6c1f124017406f092d0e9e5150/avro-serializer/src/main/java/io/confluent/kafka/serializers/AbstractKafkaAvroSerDe.java#L36 has seen a few changes since I last looked at it. Might be a few features missing as a result. Nice job finding a work-around. If you have time, please do create an issue and mention the work-around.