Closed
Description
Description
When basic.auth.credentials.source
is set to SASL_INHERIT
, then sasl.mechanisms
(plural) is passed to the schema registry conf, however when configuring the auth in CachedSchemaRegistryClient
, then sasl.mechanism
(singular) is popped. This causes the check at the end of CachedSchemaRegistryClient.__init__
to raise a ValueError
.
How to reproduce
from confluent_kafka.avro import AvroProducer
config = {
'schema.registry.url': 'http://test.com:9091',
'schema.registry.basic.auth.credentials.source': 'SASL_INHERIT',
}
AvroProducer(config)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-7-88b3fcdf0322> in <module>
6 }
7
----> 8 AvroProducer(config)
/usr/local/lib/python3.7/site-packages/confluent_kafka/avro/__init__.py in __init__(self, config, default_key_schema, default_value_schema, schema_registry)
42
43 if schema_registry is None:
---> 44 schema_registry = CachedSchemaRegistryClient(sr_conf)
45 elif sr_conf.get("url", None) is not None:
46 raise ValueError("Cannot pass schema_registry along with schema.registry.url config")
/usr/local/lib/python3.7/site-packages/confluent_kafka/avro/cached_schema_registry_client.py in __init__(self, url, max_schemas_per_subject, ca_location, cert_location, key_location)
114
115 if len(conf) > 0:
--> 116 raise ValueError("Unrecognized configuration properties: {}".format(conf.keys()))
117
118 def __del__(self):
ValueError: Unrecognized configuration properties: dict_keys(['sasl.mechanisms'])
Checklist
Please provide the following information:
- confluent-kafka-python and librdkafka version (
confluent_kafka.version()
andconfluent_kafka.libversion()
): ('1.2.0', 16908288) - Apache Kafka broker version: na
- Client configuration:
{...}
see reproducible example - Operating system: macOS
- Provide client logs (with
'debug': '..'
as necessary) na - Provide broker log excerpts na
- Critical issue: bug
Metadata
Metadata
Assignees
Labels
No labels