Kafka Schema Registry with basic authentication not working in native mode
See original GitHub issueDescribe the bug When accessing schema registry in native mode, the basic authentication is not working and I am getting 401 unauthorized. It works good in the JVM mode
In Native mode below properties are not honored.
kafka.basic.auth.credentials.source=USER_INFO
kafka.basic.auth.user.info=user:pass
stacktrace
2021-03-03 18:43:05,304 ERROR [io.sma.rea.mes.kafka] (vert.x-eventloop-thread-1) SRMSG18206: Unable to write to Kafka from channel movies (topic: movies): org.apache.kafka.common.errors.InvalidConfigurationException: Unauthorized; error code: 401
Expected behavior Schema registry with basic authentication works in native mode similar to JVM mode
Configuration
kafka.bootstrap.servers=somehost.us-east4.gcp.confluent.cloud:9092
kafka.security.protocol=SASL_SSL
kafka.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule \
required username='secretuser' \
password='pass';
kafka.sasl.mechanism=PLAIN
kafka.acks=all
kafka.schema.registry.url=https://someurl.confluent.cloud
kafka.basic.auth.credentials.source=USER_INFO
kafka.basic.auth.user.info=user:pass
mp.messaging.outgoing.movies.connector=smallrye-kafka
mp.messaging.outgoing.movies.topic=movies
mp.messaging.outgoing.movies.value.serializer=io.confluent.kafka.serializers.KafkaAvroSerializer
mp.messaging.outgoing.movies.schema.registry.url=${kafka.schema.registry.url}
mp.messaging.outgoing.movies.specific.avro.reader=true
mp.messaging.incoming.movies-from-kafka.connector=smallrye-kafka
mp.messaging.incoming.movies-from-kafka.topic=movies
mp.messaging.incoming.movies-from-kafka.value.deserializer=io.confluent.kafka.serializers.KafkaAvroDeserializer
mp.messaging.incoming.movies-from-kafka.auto.offset.reset=earliest
mp.messaging.incoming.movies-from-kafka.enable.auto.commit=false
mp.messaging.incoming.movies-from-kafka.group.id=movies
mp.messaging.incoming.movies-from-kafka.schema.registry.url=${kafka.schema.registry.url}
mp.messaging.incoming.movies-from-kafka.specific.avro.reader=true
Screenshots (If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
- Output of
uname -a
orver
: Linux x64 - Output of
java -version
: Java 11 - GraalVM version (if different from Java):
- Quarkus version or git rev: 1.12.0.Final
- Build tool (ie. output of
mvnw --version
orgradlew --version
): mvnw
Additional context (Add any other context about the problem here.)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
HTTP Basic Authentication - Confluent Documentation
Schema Registry ¶. Schema Registry can be configured to require users to authenticate using a username and password via the Basic HTTP authentication...
Read more >Using Apache Kafka with Schema Registry and Avro - Quarkus
This guide shows how your Quarkus application can use Apache Kafka, Avro serialized records, and connect to a schema registry (such as the...
Read more >Configuration — Lenses.io
The Confluent Schema Registry offers support for Basic authentication. To use it, set these options in addition to the rest of your Registry...
Read more >Fixed Issues in Schema Registry - Cloudera Documentation
Review the list of Schema Registry issues that are resolved in Cloudera Runtime 7.1.8. CDPD-41592: Confluent import should handle input without an actual ......
Read more >Kafka 3.3 Documentation
ZooKeeper SASL Authentication; ZooKeeper Mutual TLS Authentication ... Running Kafka Connect; Configuring Connectors; Transformations; REST API ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Awesome!
With that, I can extend the Kafka extension to do that automatically (register the service implementation).
Can you provide a reproducer? It seems that the underlying Http client used by the Confluent Avro serde do not get the authentication data.