This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new e0080a1fbeda CAMEL-27256: camel-kafka - document that OAuth token 
endpoints must be in org.apache.kafka.sasl.oauthbearer.allowed.urls (#30443)
e0080a1fbeda is described below

commit e0080a1fbedae314ff8d8b15a685c020951dc3e1
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 19 21:30:26 2026 +0100

    CAMEL-27256: camel-kafka - document that OAuth token endpoints must be in 
org.apache.kafka.sasl.oauthbearer.allowed.urls (#30443)
    
    Since Kafka 4.0, the client only calls an OAuth token endpoint that is 
listed in
    the JVM system property org.apache.kafka.sasl.oauthbearer.allowed.urls, and 
fails
    to start otherwise. This applies to oauthTokenEndpointUri of 
saslAuthType=OAUTH,
    and to schemaRegistryOauthTokenEndpoint with the confluent vendor, whose 
client
    checks the same property. Both were checked with camel run.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../resources/org/apache/camel/catalog/docs/kafka-component.adoc     | 5 +++++
 components/camel-kafka/src/main/docs/kafka-component.adoc            | 5 +++++
 2 files changed, 10 insertions(+)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kafka-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kafka-component.adoc
index 2197e553eb6f..e12b361f823a 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kafka-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kafka-component.adoc
@@ -880,6 +880,10 @@ YAML::
 ----
 ====
 
+IMPORTANT: Since Kafka 4.0, the client only calls an OAuth token endpoint that 
is listed in the JVM system property 
`org.apache.kafka.sasl.oauthbearer.allowed.urls` (a comma-separated list of 
URLs).
+Without it, the producer or consumer fails to start with `The URL cannot be 
accessed due to restrictions. Update the system property 
'org.apache.kafka.sasl.oauthbearer.allowed.urls' to allow the URL to be 
accessed`.
+Set it to the `oauthTokenEndpointUri`, for example with 
`-Dorg.apache.kafka.sasl.oauthbearer.allowed.urls=https://auth.example.com/oauth/token`,
 or with Camel JBang `camel run 
--jvm-args=-Dorg.apache.kafka.sasl.oauthbearer.allowed.urls=https://auth.example.com/oauth/token`.
+
 *AWS MSK IAM Authentication*
 
 When using AWS MSK with IAM authentication, ensure the `aws-msk-iam-auth` 
library is on the classpath:
@@ -1205,6 +1209,7 @@ A registry that requires a login is reached with the 
login of its vendor:
 
 `schemaRegistryPassword` and `schemaRegistryOauthClientSecret` are secret 
options, which Camel masks in logs. In an endpoint URI, give a secret that has 
characters such as `&` or `+` in `RAW()`, or set it from a property placeholder 
or a vault.
 What you set in `additionalProperties`, such as 
`basic.auth.credentials.source=SASL_INHERIT` to use the SASL login of the Kafka 
connection, takes precedence.
+With OAuth2 and `confluent`, the Confluent client checks 
`schemaRegistryOauthTokenEndpoint` against the JVM system property 
`org.apache.kafka.sasl.oauthbearer.allowed.urls`, just as the Kafka client does 
for the SASL OAuth login. List the token endpoint in this property, or the 
producer or consumer fails to start with `The URL cannot be accessed due to 
restrictions`.
 
 For example, Confluent Cloud with the API key of its Schema Registry:
 
diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc 
b/components/camel-kafka/src/main/docs/kafka-component.adoc
index 2197e553eb6f..e12b361f823a 100644
--- a/components/camel-kafka/src/main/docs/kafka-component.adoc
+++ b/components/camel-kafka/src/main/docs/kafka-component.adoc
@@ -880,6 +880,10 @@ YAML::
 ----
 ====
 
+IMPORTANT: Since Kafka 4.0, the client only calls an OAuth token endpoint that 
is listed in the JVM system property 
`org.apache.kafka.sasl.oauthbearer.allowed.urls` (a comma-separated list of 
URLs).
+Without it, the producer or consumer fails to start with `The URL cannot be 
accessed due to restrictions. Update the system property 
'org.apache.kafka.sasl.oauthbearer.allowed.urls' to allow the URL to be 
accessed`.
+Set it to the `oauthTokenEndpointUri`, for example with 
`-Dorg.apache.kafka.sasl.oauthbearer.allowed.urls=https://auth.example.com/oauth/token`,
 or with Camel JBang `camel run 
--jvm-args=-Dorg.apache.kafka.sasl.oauthbearer.allowed.urls=https://auth.example.com/oauth/token`.
+
 *AWS MSK IAM Authentication*
 
 When using AWS MSK with IAM authentication, ensure the `aws-msk-iam-auth` 
library is on the classpath:
@@ -1205,6 +1209,7 @@ A registry that requires a login is reached with the 
login of its vendor:
 
 `schemaRegistryPassword` and `schemaRegistryOauthClientSecret` are secret 
options, which Camel masks in logs. In an endpoint URI, give a secret that has 
characters such as `&` or `+` in `RAW()`, or set it from a property placeholder 
or a vault.
 What you set in `additionalProperties`, such as 
`basic.auth.credentials.source=SASL_INHERIT` to use the SASL login of the Kafka 
connection, takes precedence.
+With OAuth2 and `confluent`, the Confluent client checks 
`schemaRegistryOauthTokenEndpoint` against the JVM system property 
`org.apache.kafka.sasl.oauthbearer.allowed.urls`, just as the Kafka client does 
for the SASL OAuth login. List the token endpoint in this property, or the 
producer or consumer fails to start with `The URL cannot be accessed due to 
restrictions`.
 
 For example, Confluent Cloud with the API key of its Schema Registry:
 

Reply via email to