FundingCircle / jackdaw

A Clojure library for the Apache Kafka distributed streaming platform.
https://fundingcircle.github.io/jackdaw/
BSD 3-Clause "New" or "Revised" License
369 stars 80 forks source link

Add support for schema registry basic auth #265

Closed gtyanchev closed 3 years ago

gtyanchev commented 4 years ago

Currently our schema registry client receives as a parameter only schema.registry.url which makes it impossible to connect to schema registry with enabled basic auth.

This PR adds support for additional configuration map that for example may contain auth parameters:

(def basic-auth-config {"basic.auth.credentials.source" "USER_INFO"
                        "basic.auth.user.info"          "fred:letmein"}

The map can be passed in various places:

Checklist

codecov[bot] commented 4 years ago

Codecov Report

Merging #265 (2e2f37d) into restore-test-fixtures-module (3524968) will decrease coverage by 0.34%. The diff coverage is 93.33%.

Impacted file tree graph

@@                       Coverage Diff                        @@
##           restore-test-fixtures-module     #265      +/-   ##
================================================================
- Coverage                         80.36%   80.01%   -0.35%     
================================================================
  Files                                42       42              
  Lines                              2745     2747       +2     
  Branches                            157      157              
================================================================
- Hits                               2206     2198       -8     
- Misses                              382      392      +10     
  Partials                            157      157              
Impacted Files Coverage Δ
src/jackdaw/serdes/avro.clj 89.04% <85.71%> (-0.04%) :arrow_down:
src/jackdaw/serdes/avro/confluent.clj 100.00% <100.00%> (ø)
src/jackdaw/serdes/avro/schema_registry.clj 100.00% <100.00%> (ø)
src/jackdaw/serdes/resolver.clj 91.17% <100.00%> (+0.26%) :arrow_up:
src/jackdaw/serdes/edn2.clj 45.45% <0.00%> (-45.46%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3524968...2e2f37d. Read the comment docs.