Skip to content

Commit 4691b3c

Browse files
committed
fix sasl.mechanism typo
1 parent d3549ce commit 4691b3c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

confluent_kafka/avro/cached_schema_registry_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _configure_basic_auth(conf):
121121
.format(auth_provider, VALID_AUTH_PROVIDERS))
122122

123123
if auth_provider == 'SASL_INHERIT':
124-
if conf.pop('sasl.mechanisms', '').upper() not in ['PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512']:
124+
if conf.pop('sasl.mechanism', '').upper() not in ['PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512']:
125125
raise ValueError("SASL_INHERIT supports SASL mechanisms PLAIN and SCRAM only")
126126
auth = (conf.pop('sasl.username', ''), conf.pop('sasl.password', ''))
127127
elif auth_provider == 'USER_INFO':

tests/avro/test_cached_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def test_basic_auth_sasl_inherit(self):
187187
self.client = CachedSchemaRegistryClient({
188188
'url': 'https://user_url:secret_url@127.0.0.1:65534',
189189
'basic.auth.credentials.source': 'SASL_INHERIT',
190+
'sasl.mechanism': 'PLAIN',
190191
'sasl.username': 'user_sasl',
191192
'sasl.password': 'secret_sasl'
192193
})

0 commit comments

Comments
 (0)