Skip to content

Fix #3242: wrap credential options in RAW() where they go into an endpoint address - #3243

Open
davsclaus wants to merge 2 commits into
apache:mainfrom
davsclaus:ci-issue-3242
Open

davsclaus wants to merge 2 commits into
apache:mainfrom
davsclaus:ci-issue-3242

Conversation

@davsclaus

@davsclaus davsclaus commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3242.

A password, key or token that a Kamelet places into the address of the endpoint it calls is parsed as part of the URI. Without RAW(), a value with &, + or = is cut into another parameter or changed: a password p&ss+w=rd logs in as p, and http-sink then sends ss+w=rd as the query of the request. A Base64 serviceAccountKey with a + is changed the same way.

Changes

  • Every option with format: password that goes into an endpoint address, as a URI query parameter or a parameters entry, is wrapped in RAW() (31 Kamelets): http-sink/http-source (authPassword, oauth2ClientId, oauth2ClientSecret), mail-sink, cassandra-sink, infinispan-sink/-source, the Google Kamelets (serviceAccountKey, clientId), the Azure Storage Kamelets (tenantId, clientId), the Kafka Apicurio Kamelets, nats-sink/-source (servers), slack-sink (webhookUrl), ceph-event-based-source and azure-functions-sink (key in the code parameter; with keyInHeader=true it is sent in a header instead).
  • An optional option that is not set is still left out of the address: RAW({{?name}}) is dropped like {{?name}}.

Tests

  • KameletsSecretsRawTest: checks every Kamelet; an option with format: password in an endpoint address without RAW() fails the build.
  • HttpSinkSecretTest: http-sink with Basic login and the password p&ss+w=rd against a local server sends the whole password and no query. It fails on main (the server gets query=ss+w=rd and the login of user:p).
  • ./mvnw clean install passes.

Claude Code on behalf of Claus Ibsen

🤖 Generated with Claude Code

davsclaus and others added 2 commits November 18, 2026 22:32
…an endpoint address

A password, key or token placed into an endpoint address without RAW()
is parsed as part of the URI, so a value with &, + or = is cut into
another parameter or changed. Wrap every option with format password
that goes into an address, as a query parameter or a parameters entry.

KameletsSecretsRawTest checks every Kamelet, and HttpSinkSecretTest runs
http-sink with a password that has those characters against a local
server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>

# Conflicts:
#	kamelets/azure-functions-sink.kamelet.yaml
#	kamelets/azure-storage-blob-append-sink.kamelet.yaml
#	kamelets/azure-storage-blob-sink.kamelet.yaml
#	kamelets/azure-storage-datalake-sink.kamelet.yaml
#	kamelets/azure-storage-datalake-source.kamelet.yaml
#	kamelets/google-bigquery-sink.kamelet.yaml
#	kamelets/google-calendar-source.kamelet.yaml
#	kamelets/google-mail-source.kamelet.yaml
#	kamelets/google-pubsub-sink.kamelet.yaml
#	kamelets/google-pubsub-source.kamelet.yaml
#	kamelets/google-sheets-sink.kamelet.yaml
#	kamelets/google-sheets-source.kamelet.yaml
#	kamelets/google-storage-event-based-source.kamelet.yaml
#	kamelets/google-storage-sink.kamelet.yaml
#	kamelets/google-storage-source.kamelet.yaml
#	kamelets/google-vertexai-sink.kamelet.yaml
#	kamelets/infinispan-sink.kamelet.yaml
#	kamelets/infinispan-source.kamelet.yaml
#	kamelets/mail-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/azure-functions-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-append-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/azure-storage-blob-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/azure-storage-datalake-source.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-bigquery-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-calendar-source.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-mail-source.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-pubsub-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-pubsub-source.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-sheets-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-sheets-source.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-storage-event-based-source.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-storage-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-storage-source.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/google-vertexai-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/infinispan-sink.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/infinispan-source.kamelet.yaml
#	library/camel-kamelets/src/main/resources/kamelets/mail-sink.kamelet.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kamelets: wrap credential options in RAW() where they go into an endpoint address

1 participant