add custom HTTP headers support for Schema Registry connections#1705
Open
ymocode wants to merge 1 commit intokafbat:mainfrom
Open
add custom HTTP headers support for Schema Registry connections#1705ymocode wants to merge 1 commit intokafbat:mainfrom
ymocode wants to merge 1 commit intokafbat:mainfrom
Conversation
Enable per-cluster schemaRegistryHeaders configuration to pass custom headers (e.g. X-Registry-GroupId) to the Schema Registry API. This allows scoping Apicurio Registry's Confluent compatibility endpoint to a specific artifact group. Config: KAFKA_CLUSTERS_0_SCHEMAREGISTRYHEADERS_<Header-Name>=<value>
There was a problem hiding this comment.
Hi ymocode! 👋
Welcome, and thank you for opening your first PR in the repo!
Please wait for triaging by our maintainers.
Please take a look at our contributing guide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable per-cluster schemaRegistryHeaders configuration to pass custom
headers (e.g. X-Registry-GroupId) to the Schema Registry API. This
allows scoping Apicurio Registry's Confluent compatibility endpoint
to a specific artifact group.
Config: KAFKA_CLUSTERS_0_SCHEMAREGISTRYHEADERS_=
What changes did you make?
Added support for custom HTTP headers on Schema Registry WebClient connections, configured per cluster via
schemaRegistryHeadersmap.This enables passing headers like
X-Registry-GroupIdto Apicurio Registry's Confluent compatibility API, scoping schema lookups to a specific artifact group.Three files changed:
ClustersProperties.Cluster— addedMap<String, String> schemaRegistryHeadersWebClientConfigurator— addedconfigureDefaultHeaders(Map<String, String>)methodKafkaClusterFactory.schemaRegistryClient()— wired headers into WebClient builderConfiguration example:
KAFKA_CLUSTERS_0_SCHEMAREGISTRYHEADERS_X-Registry-GroupId=my.artifact.group
Is there anything you'd like reviewers to focus on?
The
configureDefaultHeadersmethod appends to the existingdefaultHeadersconsumer chain — verify it doesn't conflict withconfigureBasicAuthwhich also usesdefaultHeaders.How Has This Been Tested?
Checklist
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)