Commit b99eb21
Support per-table schema registry with authentication
Add an extra option for tables with the Kafka engine to pass the URL of a
schema registry. Also add support for schema registry basic authentication
via username:password in the URL.
Changes:
- Add kafka_format_avro_schema_registry_url setting to KafkaSettings
- Store format_avro_schema_registry_url in StorageKafka class
- Propagate schema registry URL to format settings via
createSettingsAdjustments() (works for both StorageKafka and StorageKafka2)
- Add basic authentication parsing in AvroRowInputFormat::SchemaRegistry
to extract username:password from URL and authenticate HTTP requests
This allows per-table configuration of Avro Schema Registry URLs with
authentication, enabling different Kafka tables to use different schema
registries or credentials.
Usage example:
CREATE TABLE kafka_table (...) ENGINE = Kafka(...) SETTINGS
kafka_format_avro_schema_registry_url = 'http://user:pass@registry:8081';
Co-authored-by: Kevin Michel <kevin.michel@aiven.io>1 parent 44983c1 commit b99eb21
File tree
5 files changed
+25
-0
lines changed- src
- Processors/Formats/Impl
- Storages/Kafka
5 files changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
1086 | 1101 | | |
1087 | 1102 | | |
1088 | 1103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
520 | 521 | | |
521 | 522 | | |
522 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
523 | 529 | | |
524 | 530 | | |
525 | 531 | | |
| |||
0 commit comments