confluentinc / schema-registry

Confluent Schema Registry for Kafka
https://docs.confluent.io/current/schema-registry/docs/index.html
Other
2.2k stars 1.11k forks source link

Schema registry client : No Authentication header appearing in http request #3055

Open pibou opened 6 months ago

pibou commented 6 months ago

Hi,

i setup a kafka producer with these properties :

props.put("schema.registry.url", this.schemaRegistryUrl);
props.put(SchemaRegistryClientConfig.BASIC_AUTH_CREDENTIALS_SOURCE,basic_auth_cred_source);
props.put(SchemaRegistryClientConfig.USER_INFO_CONFIG,basic_auth_info);

They do appear during startup dump of kafka properties. That does not mean anything, so i added SchemaRegistryClientConfig.BEARER_AUTH_CREDENTIALS_SOURCE and got the ConfigException "Only one of '%s' and '%s' may be specified"

At least, BASIC_AUTH_CREDENTIALS_SOURCE reaches the Schema Registry Client.

Nevertheless, the HTTP request made to the server registry does not contain any Authentication header.

Any clue ?

The SR client version is 7.6

pibou commented 6 months ago

Debugging the valueSerializer, i do find in the config (KafkaAvroSerializerConfig) the originalsMap with both keys having the right values. But they do not appear in the usedMap of the config.

In the Rest Service of the CachedSchemaRegistry, the BasicAuthCredentialsProvider does hold a userinfo with the right value