User authentication for confluent schema registry on kafka engine

325 views
Skip to first unread message

Blessing E-Philips

unread,
Jul 4, 2022, 2:39:29 PM7/4/22
to ClickHouse
Hello,
I want to consume messages with AvroConfluent format fusing the Kafka engine but the schema registry server needs basic authentication. I tried to create the Kafka table using the query but got an error.

CREATE TABLE table_a ( 
field1 String, 
field2 String 
ENGINE = Kafka 
SETTINGS kafka_broker_list = {kafka_broker}, 
kafka_topic_list = {topic}, 
kafka_group_name = {name}, 
kafka_format = 'AvroConfluent', 
kafka_num_consumers = '1', 
format_avro_schema_registry_url = https://{username}:{password}@{schema_registry_url};
 
ERROR -  [Code: 1000, SQL State: ] ClickHouse exception, code: 1000, host: xxx.xx.xx.xx, port: xxxx; Poco::Exception. Code: 1000, e.code() = 0, Bad URI syntax: bad or invalid port number: {password}

Without user authentication, it throws a different error.

ERROR - Code: 86. DB::Exception: Received error from remote server /schemas/ids/{schema_id}. HTTP status code: 401 Unauthorized, body: {"error_code":401,"message":"Unauthorized"}: while fetching schema id = {schema_id}: while parsing Kafka message (topic: {topic}, partition: {partition}, offset: {offset})': While executing Kafka. (RECEIVED_ERROR_FROM_REMOTE_IO_SERVER)

How can I pass the authentication parameters for the schema registry?

Regards.


Reply all
Reply to author
Forward
0 new messages