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-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new e6fce6acb Fix #3189: the object storage event sources read a file
whatever characters its name has (#3259)
e6fce6acb is described below
commit e6fce6acb7a32743d39e1d1780d03018922b2330
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 19 14:42:23 2026 +0100
Fix #3189: the object storage event sources read a file whatever characters
its name has (#3259)
aws-s3-event-based-source, ceph-event-based-source and
google-storage-event-based-source,
with getObject, put the name of the object of the event into the endpoint
address
of the call that reads it. A name with &, + or = was cut or changed, so the
file
was not found or the endpoint could not be created.
They now pass the object name in the header of the component (CamelAwsS3Key,
CamelGoogleCloudStorageObjectName), which the component uses as it is, and
remove the other headers of the component from the message before the call.
The S3 sources call a bucket only when its name is a valid bucket name, and
the
Google Cloud Storage source uses a fixed endpoint, as it reads only the
bucket
of bucketNameOrArn.
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
kamelets/aws-s3-event-based-source.kamelet.yaml | 20 +++-
kamelets/ceph-event-based-source.kamelet.yaml | 20 +++-
.../google-storage-event-based-source.kamelet.yaml | 16 ++-
.../aws-s3-event-based-source.kamelet.yaml | 20 +++-
.../kamelets/ceph-event-based-source.kamelet.yaml | 20 +++-
.../google-storage-event-based-source.kamelet.yaml | 16 ++-
...s3-event-based-source-get-object.citrus.it.yaml | 105 ++++++++++++++++++++
.../s3/aws-s3-event-based-source-get-object.yaml | 33 +++++++
...ph-event-based-source-get-object.citrus.it.yaml | 108 +++++++++++++++++++++
.../aws/s3/ceph-event-based-source-get-object.yaml | 35 +++++++
10 files changed, 377 insertions(+), 16 deletions(-)
diff --git a/kamelets/aws-s3-event-based-source.kamelet.yaml
b/kamelets/aws-s3-event-based-source.kamelet.yaml
index 4db8b9cdb..c2b4e52be 100644
--- a/kamelets/aws-s3-event-based-source.kamelet.yaml
+++ b/kamelets/aws-s3-event-based-source.kamelet.yaml
@@ -299,8 +299,24 @@ spec:
expression:
jsonpath:
expression: "$.detail.bucket.name"
- - toD:
- uri:
"aws2-s3:${exchangeProperty.aws-s3-bucket}?accessKey=RAW({{?accessKey}})&secretKey=RAW({{?secretKey}})®ion={{region}}&operation=getObject&keyName=${exchangeProperty.aws-s3-name}&useDefaultCredentialsProvider={{?useDefaultCredentialsProvider}}&useProfileCredentialsProvider={{?useProfileCredentialsProvider}}&profileCredentialsName={{?profileCredentialsName}}&useSessionCredentials={{?useSessionCredentials}}&sessionToken=RAW({{?sessionToken}})&proxyHos
[...]
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression:
"${exchangeProperty.aws-s3-bucket} regex '[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]'"
+ steps:
+ # the S3 call takes the bucket and the
key of the event, and no other header
+ - removeHeaders:
+ pattern: "CamelAwsS3*"
+ - setHeader:
+ name: CamelAwsS3Key
+ expression:
+ simple:
+ expression:
"${exchangeProperty.aws-s3-name}"
+ - toD:
+ uri:
"aws2-s3:${exchangeProperty.aws-s3-bucket}?accessKey=RAW({{?accessKey}})&secretKey=RAW({{?secretKey}})®ion={{region}}&operation=getObject&useDefaultCredentialsProvider={{?useDefaultCredentialsProvider}}&useProfileCredentialsProvider={{?useProfileCredentialsProvider}}&profileCredentialsName={{?profileCredentialsName}}&useSessionCredentials={{?useSessionCredentials}}&sessionToken=RAW({{?sessionToken}})&proxyHost={{?proxyHost}}&proxyPort={{?
[...]
+ - removeHeader:
+ name: CamelAwsS3Key
- to:
uri: kamelet:sink
diff --git a/kamelets/ceph-event-based-source.kamelet.yaml
b/kamelets/ceph-event-based-source.kamelet.yaml
index fdf20828c..76d38b128 100644
--- a/kamelets/ceph-event-based-source.kamelet.yaml
+++ b/kamelets/ceph-event-based-source.kamelet.yaml
@@ -228,7 +228,23 @@ spec:
expression:
jsonpath:
expression: "$.Records[0].s3.bucket.name"
- - toD:
- uri:
"aws2-s3:${exchangeProperty.ceph-bucket-name}?accessKey=RAW({{accessKey}})&secretKey=RAW({{secretKey}})®ion={{zoneGroup}}&operation=getObject&keyName=${exchangeProperty.ceph-object-key}&uriEndpointOverride={{cephUrl}}&overrideEndpoint=true"
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression:
"${exchangeProperty.ceph-bucket-name} regex '[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]'"
+ steps:
+ # the S3 call takes the bucket and the
key of the event, and no other header
+ - removeHeaders:
+ pattern: "CamelAwsS3*"
+ - setHeader:
+ name: CamelAwsS3Key
+ expression:
+ simple:
+ expression:
"${exchangeProperty.ceph-object-key}"
+ - toD:
+ uri:
"aws2-s3:${exchangeProperty.ceph-bucket-name}?accessKey=RAW({{accessKey}})&secretKey=RAW({{secretKey}})®ion={{zoneGroup}}&operation=getObject&uriEndpointOverride={{cephUrl}}&overrideEndpoint=true"
+ - removeHeader:
+ name: CamelAwsS3Key
- to:
uri: kamelet:sink
diff --git a/kamelets/google-storage-event-based-source.kamelet.yaml
b/kamelets/google-storage-event-based-source.kamelet.yaml
index 54d9b1004..3e26909d1 100644
--- a/kamelets/google-storage-event-based-source.kamelet.yaml
+++ b/kamelets/google-storage-event-based-source.kamelet.yaml
@@ -165,12 +165,20 @@ spec:
simple:
expression:
"${exchangeProperty.google-storage-event-type} == \"OBJECT_FINALIZE\" &&
${exchangeProperty.google-storage-bucket-id} == \"{{bucketNameOrArn}}\""
steps:
- - toD:
- uri: google-storage
+ # the Cloud Storage call takes the name of the
object of the event, and no other header
+ - removeHeaders:
+ pattern: "CamelGoogleCloudStorage*"
+ - setHeader:
+ name: CamelGoogleCloudStorageObjectName
+ expression:
+ simple:
+ expression:
"${exchangeProperty.google-storage-object-id}"
+ - to:
+ uri: "google-storage:{{bucketNameOrArn}}"
parameters:
- bucketName: "{{bucketNameOrArn}}"
- objectName:
"${exchangeProperty.google-storage-object-id}"
operation: getObject
serviceAccountKey:
"RAW(base64:{{serviceAccountKey}})"
+ - removeHeader:
+ name: CamelGoogleCloudStorageObjectName
- to:
uri: kamelet:sink
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-event-based-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-event-based-source.kamelet.yaml
index 4db8b9cdb..c2b4e52be 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/aws-s3-event-based-source.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/aws-s3-event-based-source.kamelet.yaml
@@ -299,8 +299,24 @@ spec:
expression:
jsonpath:
expression: "$.detail.bucket.name"
- - toD:
- uri:
"aws2-s3:${exchangeProperty.aws-s3-bucket}?accessKey=RAW({{?accessKey}})&secretKey=RAW({{?secretKey}})®ion={{region}}&operation=getObject&keyName=${exchangeProperty.aws-s3-name}&useDefaultCredentialsProvider={{?useDefaultCredentialsProvider}}&useProfileCredentialsProvider={{?useProfileCredentialsProvider}}&profileCredentialsName={{?profileCredentialsName}}&useSessionCredentials={{?useSessionCredentials}}&sessionToken=RAW({{?sessionToken}})&proxyHos
[...]
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression:
"${exchangeProperty.aws-s3-bucket} regex '[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]'"
+ steps:
+ # the S3 call takes the bucket and the
key of the event, and no other header
+ - removeHeaders:
+ pattern: "CamelAwsS3*"
+ - setHeader:
+ name: CamelAwsS3Key
+ expression:
+ simple:
+ expression:
"${exchangeProperty.aws-s3-name}"
+ - toD:
+ uri:
"aws2-s3:${exchangeProperty.aws-s3-bucket}?accessKey=RAW({{?accessKey}})&secretKey=RAW({{?secretKey}})®ion={{region}}&operation=getObject&useDefaultCredentialsProvider={{?useDefaultCredentialsProvider}}&useProfileCredentialsProvider={{?useProfileCredentialsProvider}}&profileCredentialsName={{?profileCredentialsName}}&useSessionCredentials={{?useSessionCredentials}}&sessionToken=RAW({{?sessionToken}})&proxyHost={{?proxyHost}}&proxyPort={{?
[...]
+ - removeHeader:
+ name: CamelAwsS3Key
- to:
uri: kamelet:sink
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/ceph-event-based-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/ceph-event-based-source.kamelet.yaml
index fdf20828c..76d38b128 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/ceph-event-based-source.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/ceph-event-based-source.kamelet.yaml
@@ -228,7 +228,23 @@ spec:
expression:
jsonpath:
expression: "$.Records[0].s3.bucket.name"
- - toD:
- uri:
"aws2-s3:${exchangeProperty.ceph-bucket-name}?accessKey=RAW({{accessKey}})&secretKey=RAW({{secretKey}})®ion={{zoneGroup}}&operation=getObject&keyName=${exchangeProperty.ceph-object-key}&uriEndpointOverride={{cephUrl}}&overrideEndpoint=true"
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression:
"${exchangeProperty.ceph-bucket-name} regex '[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]'"
+ steps:
+ # the S3 call takes the bucket and the
key of the event, and no other header
+ - removeHeaders:
+ pattern: "CamelAwsS3*"
+ - setHeader:
+ name: CamelAwsS3Key
+ expression:
+ simple:
+ expression:
"${exchangeProperty.ceph-object-key}"
+ - toD:
+ uri:
"aws2-s3:${exchangeProperty.ceph-bucket-name}?accessKey=RAW({{accessKey}})&secretKey=RAW({{secretKey}})®ion={{zoneGroup}}&operation=getObject&uriEndpointOverride={{cephUrl}}&overrideEndpoint=true"
+ - removeHeader:
+ name: CamelAwsS3Key
- to:
uri: kamelet:sink
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/google-storage-event-based-source.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/google-storage-event-based-source.kamelet.yaml
index 54d9b1004..3e26909d1 100644
---
a/library/camel-kamelets/src/main/resources/kamelets/google-storage-event-based-source.kamelet.yaml
+++
b/library/camel-kamelets/src/main/resources/kamelets/google-storage-event-based-source.kamelet.yaml
@@ -165,12 +165,20 @@ spec:
simple:
expression:
"${exchangeProperty.google-storage-event-type} == \"OBJECT_FINALIZE\" &&
${exchangeProperty.google-storage-bucket-id} == \"{{bucketNameOrArn}}\""
steps:
- - toD:
- uri: google-storage
+ # the Cloud Storage call takes the name of the
object of the event, and no other header
+ - removeHeaders:
+ pattern: "CamelGoogleCloudStorage*"
+ - setHeader:
+ name: CamelGoogleCloudStorageObjectName
+ expression:
+ simple:
+ expression:
"${exchangeProperty.google-storage-object-id}"
+ - to:
+ uri: "google-storage:{{bucketNameOrArn}}"
parameters:
- bucketName: "{{bucketNameOrArn}}"
- objectName:
"${exchangeProperty.google-storage-object-id}"
operation: getObject
serviceAccountKey:
"RAW(base64:{{serviceAccountKey}})"
+ - removeHeader:
+ name: CamelGoogleCloudStorageObjectName
- to:
uri: kamelet:sink
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-event-based-source-get-object.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-event-based-source-get-object.citrus.it.yaml
new file mode 100644
index 000000000..34663188b
--- /dev/null
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-event-based-source-get-object.citrus.it.yaml
@@ -0,0 +1,105 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: aws-s3-event-based-source-get-object-test
+variables:
+ - name: "aws.s3.bucketNameOrArn"
+ value: "bucket-events"
+ - name: "aws.sqs.queueName"
+ value: "queue-s3-events"
+actions:
+ # Create AWS infrastructure (Floci container)
+ - testcontainers:
+ start:
+ localstack:
+ services:
+ - "S3"
+ - "SQS"
+ options:
+ buckets: '${aws.s3.bucketNameOrArn}'
+ queues: '${aws.sqs.queueName}'
+ s3ClientName: "s3EventsClient"
+ sqsClientName: "sqsEventsClient"
+ - waitFor:
+ http:
+ url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"
+
+ # Files whose names have characters that an endpoint address gives a meaning
to
+ - send:
+ endpoint:
camel:aws2-s3://${aws.s3.bucketNameOrArn}?amazonS3Client=#s3EventsClient
+ message:
+ headers:
+ - name: CamelAwsS3Key
+ value: "dir/my file+x=1.txt"
+ body:
+ data: "Content of the first file"
+ - send:
+ endpoint:
camel:aws2-s3://${aws.s3.bucketNameOrArn}?amazonS3Client=#s3EventsClient
+ message:
+ headers:
+ - name: CamelAwsS3Key
+ value: "reports/a&b=c.txt"
+ body:
+ data: "Content of the second file"
+
+ # Create Camel JBang integration. The file is read without
uriEndpointOverride, so the S3 client finds the
+ # container through the environment.
+ - camel:
+ cli:
+ run:
+ integration:
+ file: "aws/s3/aws-s3-event-based-source-get-object.yaml"
+ environment:
+ variables:
+ - name: "AWS_ENDPOINT_URL_S3"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"
+ systemProperties:
+ properties:
+ - name: "aws.sqs.queueName"
+ value: "${aws.sqs.queueName}"
+ - name: "aws.uriEndpointOverride"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"
+ - name: "aws.secretKey"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SECRET_KEY}"
+ - name: "aws.accessKey"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_ACCESS_KEY}"
+ - name: "aws.region"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_REGION}"
+
+ # The events that EventBridge sends to the queue for the two uploads
+ - send:
+ endpoint:
camel:aws2-sqs://${aws.sqs.queueName}?amazonSQSClient=#sqsEventsClient
+ message:
+ body:
+ data: '{"version":"0","source":"aws.s3","detail-type":"Object
Created","detail":{"bucket":{"name":"${aws.s3.bucketNameOrArn}"},"object":{"key":"dir/my
file+x=1.txt"},"reason":"PutObject"}}'
+ - send:
+ endpoint:
camel:aws2-sqs://${aws.sqs.queueName}?amazonSQSClient=#sqsEventsClient
+ message:
+ body:
+ data: '{"version":"0","source":"aws.s3","detail-type":"Object
Created","detail":{"bucket":{"name":"${aws.s3.bucketNameOrArn}"},"object":{"key":"reports/a&b=c.txt"},"reason":"PutObject"}}'
+
+ # Each file is read with its whole name
+ - camel:
+ cli:
+ verify:
+ integration: "aws-s3-event-based-source-get-object"
+ logMessage: "Read dir/my file+x=1.txt: Content of the first file"
+ - camel:
+ cli:
+ verify:
+ integration: "aws-s3-event-based-source-get-object"
+ logMessage: "Read reports/a&b=c.txt: Content of the second file"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-event-based-source-get-object.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-event-based-source-get-object.yaml
new file mode 100644
index 000000000..ec2fffa8a
--- /dev/null
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/aws-s3-event-based-source-get-object.yaml
@@ -0,0 +1,33 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+- route:
+ from:
+ uri: "kamelet:aws-s3-event-based-source"
+ parameters:
+ queueNameOrArn: "{{aws.sqs.queueName}}"
+ uriEndpointOverride: "{{aws.uriEndpointOverride}}"
+ overrideEndpoint: "true"
+ accessKey: "{{aws.accessKey}}"
+ secretKey: "{{aws.secretKey}}"
+ region: "{{aws.region}}"
+ getObject: "true"
+ steps:
+ - convertBodyTo:
+ type: String
+ - log:
+ message: "Read ${header.CamelAwsS3ProducedKey}: ${body}"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/ceph-event-based-source-get-object.citrus.it.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/ceph-event-based-source-get-object.citrus.it.yaml
new file mode 100644
index 000000000..62c079e19
--- /dev/null
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/ceph-event-based-source-get-object.citrus.it.yaml
@@ -0,0 +1,108 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: ceph-event-based-source-get-object-test
+variables:
+ - name: "aws.s3.bucketNameOrArn"
+ value: "bucket-ceph-events"
+ - name: "kafka.topic"
+ value: "ceph-events"
+actions:
+ # Create the S3 storage (Floci container) and Kafka
+ - testcontainers:
+ start:
+ localstack:
+ services:
+ - "S3"
+ options:
+ buckets: '${aws.s3.bucketNameOrArn}'
+ s3ClientName: "s3CephClient"
+ - testcontainers:
+ start:
+ redpanda: {}
+ - waitFor:
+ http:
+ url: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"
+
+ # Files whose names have characters that an endpoint address gives a meaning
to
+ - send:
+ endpoint:
camel:aws2-s3://${aws.s3.bucketNameOrArn}?amazonS3Client=#s3CephClient
+ message:
+ headers:
+ - name: CamelAwsS3Key
+ value: "dir/my file+x=1.txt"
+ body:
+ data: "Content of the first file"
+ - send:
+ endpoint:
camel:aws2-s3://${aws.s3.bucketNameOrArn}?amazonS3Client=#s3CephClient
+ message:
+ headers:
+ - name: CamelAwsS3Key
+ value: "reports/a&b=c.txt"
+ body:
+ data: "Content of the second file"
+
+ # Create Camel JBang integration
+ - camel:
+ cli:
+ run:
+ integration:
+ file: "aws/s3/ceph-event-based-source-get-object.yaml"
+ systemProperties:
+ properties:
+ - name: "kafka.topic"
+ value: "${kafka.topic}"
+ - name: "kafka.bootstrapServers"
+ value: "${CITRUS_TESTCONTAINERS_REDPANDA_BOOTSTRAP_SERVERS}"
+ - name: "ceph.url"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SERVICE_URL}"
+ - name: "ceph.secretKey"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_SECRET_KEY}"
+ - name: "ceph.accessKey"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_ACCESS_KEY}"
+ - name: "ceph.zoneGroup"
+ value: "${CITRUS_TESTCONTAINERS_LOCALSTACK_REGION}"
+
+ # The notifications that Ceph sends to Kafka for the two uploads
+ - createEndpoint:
+ name: cephEventsProducer
+ type: "kafka"
+ properties:
+ topic: "${kafka.topic}"
+ server: "${CITRUS_TESTCONTAINERS_REDPANDA_BOOTSTRAP_SERVERS}"
+ - send:
+ endpoint: cephEventsProducer
+ message:
+ body:
+ data:
'{"Records":[{"eventId":"1","opaqueData":"","eventName":"ObjectCreated:Put","s3":{"bucket":{"name":"${aws.s3.bucketNameOrArn}"},"object":{"key":"dir/my
file+x=1.txt","metadata":[],"tags":[]}}}]}'
+ - send:
+ endpoint: cephEventsProducer
+ message:
+ body:
+ data:
'{"Records":[{"eventId":"2","opaqueData":"","eventName":"ObjectCreated:Put","s3":{"bucket":{"name":"${aws.s3.bucketNameOrArn}"},"object":{"key":"reports/a&b=c.txt","metadata":[],"tags":[]}}}]}'
+
+ # Each file is read with its whole name
+ - camel:
+ cli:
+ verify:
+ integration: "ceph-event-based-source-get-object"
+ logMessage: "Read dir/my file+x=1.txt: Content of the first file"
+ - camel:
+ cli:
+ verify:
+ integration: "ceph-event-based-source-get-object"
+ logMessage: "Read reports/a&b=c.txt: Content of the second file"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/aws/s3/ceph-event-based-source-get-object.yaml
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/ceph-event-based-source-get-object.yaml
new file mode 100644
index 000000000..e81b30e24
--- /dev/null
+++
b/tests/camel-kamelets-itest/src/test/resources/aws/s3/ceph-event-based-source-get-object.yaml
@@ -0,0 +1,35 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+- route:
+ from:
+ uri: "kamelet:ceph-event-based-source"
+ parameters:
+ topic: "{{kafka.topic}}"
+ bootstrapServers: "{{kafka.bootstrapServers}}"
+ saslAuthType: "NONE"
+ autoOffsetReset: "earliest"
+ getObject: "true"
+ cephUrl: "{{ceph.url}}"
+ accessKey: "{{ceph.accessKey}}"
+ secretKey: "{{ceph.secretKey}}"
+ zoneGroup: "{{ceph.zoneGroup}}"
+ steps:
+ - convertBodyTo:
+ type: String
+ - log:
+ message: "Read ${header.CamelAwsS3ProducedKey}: ${body}"