[GitHub] [camel-quarkus] github-actions[bot] commented on issue #2926: [CI] - Quarkus Main Branch Build Failure
github-actions[bot] commented on issue #2926: URL: https://github.com/apache/camel-quarkus/issues/2926#issuecomment-1364862018 The [quarkus-main](https://github.com/apache/camel-quarkus/tree/quarkus-main) branch build has failed: * Build ID: 3778568735-977-8bd24121-d3a8-4c23-a59a-5923018bfe9c * Camel Quarkus Commit: 3375014271a32e8da24db76953ac2bfe1fa4801a * Quarkus Main Commit: 491c0440a45efdaf7a8e8a1f4652801a65d199be * Link to build: https://github.com/apache/camel-quarkus/actions/runs/3778568735 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-karavan] mrinalsharma commented on a diff in pull request #574: Alert user that the Deployment is running. Deployment should be dele…
mrinalsharma commented on code in PR #574: URL: https://github.com/apache/camel-karavan/pull/574#discussion_r1057016646 ## karavan-app/src/main/webui/src/projects/ProjectsPage.tsx: ## @@ -80,7 +83,23 @@ export class ProjectsPage extends React.Component { } onProjectDelete = (project: Project) => { -this.setState({isDeleteModalOpen: true, projectToDelete: project}) +KaravanApi.getProjectPipelineStatus(project.projectId, this.props.config.environment, (status?: PipelineStatus) => { +if(status === undefined){ +this.setState({isDeleteModalOpen: true, projectToDelete: project}) +}else if(status?.result ==="Running"){ +this.setState({isPodRunningModalOpen: true, projectToDelete: project}) +}else if(status?.result ==="Succeeded"){ +KaravanApi.getProjectPodStatuses(project.projectId, this.props.config.environment, (statuses: PodStatus[]) => { Review Comment: Implemented the following checks: * If the pipeline is Running or Started, ask the user to delete the Deployment first. * If any other status of the Pipeline or undefined, Check the deployment status. * If deployment is undefined, Show the user, the delete Modal dialog, * If deployment is there, the ask user to delete the deployment first. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-karavan] mrinalsharma commented on a diff in pull request #574: Alert user that the Deployment is running. Deployment should be dele…
mrinalsharma commented on code in PR #574: URL: https://github.com/apache/camel-karavan/pull/574#discussion_r1057016512 ## karavan-app/src/main/webui/src/projects/ProjectsPage.tsx: ## @@ -80,7 +83,23 @@ export class ProjectsPage extends React.Component { } onProjectDelete = (project: Project) => { -this.setState({isDeleteModalOpen: true, projectToDelete: project}) +KaravanApi.getProjectPipelineStatus(project.projectId, this.props.config.environment, (status?: PipelineStatus) => { +if(status === undefined){ +this.setState({isDeleteModalOpen: true, projectToDelete: project}) +}else if(status?.result ==="Running"){ +this.setState({isPodRunningModalOpen: true, projectToDelete: project}) +}else if(status?.result ==="Succeeded"){ Review Comment: Implemented the following checks: * If the pipeline is Running or Started, ask the user to delete the Deployment first. * If any other status of the Pipeline or undefined, Check the deployment status. * If deployment is undefined, Show the user, the delete Modal dialog, * If deployment is there, the ask user to delete the deployment first. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel-k] github-actions[bot] commented on issue #3656: Integration scale subresource not working with Knative trait enabled
github-actions[bot] commented on issue #3656: URL: https://github.com/apache/camel-k/issues/3656#issuecomment-1364761168 This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch main updated: Spring doc minor fix.
This is an automated email from the ASF dual-hosted git repository. jeremyross 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 796e58cd27a Spring doc minor fix. 796e58cd27a is described below commit 796e58cd27a07b91c5690cac977356788ba7a03a Author: Jeremy Ross AuthorDate: Sun Dec 25 13:30:11 2022 -0600 Spring doc minor fix. --- docs/user-manual/modules/ROOT/pages/spring.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/spring.adoc b/docs/user-manual/modules/ROOT/pages/spring.adoc index b4f3da46a9d..206ff0b05a1 100644 --- a/docs/user-manual/modules/ROOT/pages/spring.adoc +++ b/docs/user-manual/modules/ROOT/pages/spring.adoc @@ -11,7 +11,7 @@ Apache Camel is designed to work first class with Spring in a number of ways, su == Using Camel on Spring Boot -See the Camel Spring Boot documentation. +See the xref:camel-spring-boot::index.adoc[Camel Spring Boot] documentation. == Using Camel with Spring XML files @@ -23,7 +23,7 @@ To use Camel with Spring XML files see the xref:spring-xml-extensions.adoc[Sprin == Using Spring dependency injection -Spring dependency injection is integrated first-class when using Spring and Spring together. +Spring dependency injection is integrated first-class when using Camel and Spring together. For example when using Camel on Spring Boot, then you can use any kind of Spring dependency and be able to inject Camel resources such as 'CamelContext', xref:endpoint.adoc[Endpoint] and many more.
[camel] branch regen_bot updated (a304463d5d9 -> 9b6dc2e3bba)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git omit a304463d5d9 Regen for commit e0aaa73b9778990c2e19f2d8d6ef4130f0b5d56a add 9b6dc2e3bba Regen for commit e0aaa73b9778990c2e19f2d8d6ef4130f0b5d56a This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (a304463d5d9) \ N -- N -- N refs/heads/regen_bot (9b6dc2e3bba) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes:
[GitHub] [camel] oscerd merged pull request #8950: Generated sources regen
oscerd merged PR #8950: URL: https://github.com/apache/camel/pull/8950 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch main updated: Regen for commit e0aaa73b9778990c2e19f2d8d6ef4130f0b5d56a
This is an automated email from the ASF dual-hosted git repository. acosentino 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 9b6dc2e3bba Regen for commit e0aaa73b9778990c2e19f2d8d6ef4130f0b5d56a 9b6dc2e3bba is described below commit 9b6dc2e3bba706cdaac1744d4467641efc12e920 Author: oscerd AuthorDate: Sun Dec 25 17:28:06 2022 + Regen for commit e0aaa73b9778990c2e19f2d8d6ef4130f0b5d56a Signed-off-by: GitHub --- .../camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java index f955c291e99..c3e44fe98fc 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java @@ -2338,8 +2338,8 @@ public interface KafkaEndpointBuilderFactory { } /** * This parameter allows you to specify the compression codec for all - * data generated by this producer. Valid values are none, gzip and - * snappy. + * data generated by this producer. Valid values are none, gzip, snappy, + * lz4 and zstd. * * The option is a: codejava.lang.String/code type. *
[GitHub] [camel] github-actions[bot] opened a new pull request, #8950: Generated sources regen
github-actions[bot] opened a new pull request, #8950: URL: https://github.com/apache/camel/pull/8950 Regen bot :robot: found some uncommitted changes after running build on :camel: main. Please do not delete `regen_bot` branch after merge/rebase. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (a1acdcab26c -> a304463d5d9)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git omit a1acdcab26c Regen for commit 1cbf2b6f457c74842e7ff843cc3908e1fc969caf add e0aaa73b977 Regen for commit 1cbf2b6f457c74842e7ff843cc3908e1fc969caf add a304463d5d9 Regen for commit e0aaa73b9778990c2e19f2d8d6ef4130f0b5d56a This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (a1acdcab26c) \ N -- N -- N refs/heads/regen_bot (a304463d5d9) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: .../camel/builder/endpoint/dsl/KafkaEndpointBuilderFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[camel] branch main updated: Regen for commit 1cbf2b6f457c74842e7ff843cc3908e1fc969caf
This is an automated email from the ASF dual-hosted git repository. acosentino 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 e0aaa73b977 Regen for commit 1cbf2b6f457c74842e7ff843cc3908e1fc969caf e0aaa73b977 is described below commit e0aaa73b9778990c2e19f2d8d6ef4130f0b5d56a Author: davsclaus AuthorDate: Sun Dec 25 16:41:25 2022 + Regen for commit 1cbf2b6f457c74842e7ff843cc3908e1fc969caf Signed-off-by: GitHub --- .../resources/org/apache/camel/catalog/components/kafka.json | 4 ++-- .../generated/resources/org/apache/camel/component/kafka/kafka.json | 4 ++-- .../camel/builder/component/dsl/KafkaComponentBuilderFactory.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json index 8884720bcfc..0be3446cdd2 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/kafka.json @@ -68,7 +68,7 @@ "subscribeConsumerBackoffMaxAttempts": { "kind": "property", "displayName": "Subscribe Consumer Backoff Max Attempts", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "Maximum number the kafka consumer will attempt to subscribe to the kafka broker, before eventually giving up and failing. Error during subscribing the consumer to the kafka top [...] "batchWithIndividualHeaders": { "kind": "property", "displayName": "Batch With Individual Headers", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "If this feature is enabled and a single element of a batch is an Exchang [...] "bufferMemorySize": { "kind": "property", "displayName": "Buffer Memory Size", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "33554432", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "The total bytes of memory the producer can use to buffer records waiting to be [...] -"compressionCodec": { "kind": "property", "displayName": "Compression Codec", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "none", "gzip", "snappy", "lz4" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "none", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "This parameter allows you to specify the [...] +"compressionCodec": { "kind": "property", "displayName": "Compression Codec", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "none", "gzip", "snappy", "lz4", "zstd" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "none", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "This parameter allows you to spe [...] "connectionMaxIdleMs": { "kind": "property", "displayName": "Connection Max Idle Ms", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "54", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "Close idle connections after the number of milliseconds specified by this [...] "deliveryTimeoutMs": { "kind": "property", "displayName": "Delivery Timeout Ms", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "12", "configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": "configuration", "description": "An upper bound on the time to report success or failure after a call to send() [...] "enableIdempotence": { "kind": "property", "displayName": "Enable Idempotence", "group": "producer", "label": "producer", "required":
[GitHub] [camel] oscerd merged pull request #8949: Generated sources regen
oscerd merged PR #8949: URL: https://github.com/apache/camel/pull/8949 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (7d021193271 -> a1acdcab26c)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 7d021193271 CAMEL-18825: Make XML parser/transformers more secure out of the box. add 1cbf2b6f457 docs: camel-kafka - Enumerate all options for compressionCodec (#8948) add a1acdcab26c Regen for commit 1cbf2b6f457c74842e7ff843cc3908e1fc969caf No new revisions were added by this update. Summary of changes: .../resources/org/apache/camel/catalog/components/kafka.json | 4 ++-- .../generated/resources/org/apache/camel/component/kafka/kafka.json | 4 ++-- .../java/org/apache/camel/component/kafka/KafkaConfiguration.java | 4 ++-- .../camel/builder/component/dsl/KafkaComponentBuilderFactory.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
[GitHub] [camel] github-actions[bot] opened a new pull request, #8949: Generated sources regen
github-actions[bot] opened a new pull request, #8949: URL: https://github.com/apache/camel/pull/8949 Regen bot :robot: found some uncommitted changes after running build on :camel: main. Please do not delete `regen_bot` branch after merge/rebase. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch camel-3.20.x updated: docs: camel-kafka - Enumerate all options for compressionCodec (#8948)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.20.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-3.20.x by this push: new d53e86ae5e4 docs: camel-kafka - Enumerate all options for compressionCodec (#8948) d53e86ae5e4 is described below commit d53e86ae5e404719a96e5418baf5c84d97bd4e6c Author: Kengo Seki AuthorDate: Mon Dec 26 00:56:56 2022 +0900 docs: camel-kafka - Enumerate all options for compressionCodec (#8948) Kafka supports zstd compression and Camel can leverage it without any code modification. But that option is not mentioned in the component document, so let's cover it. --- .../java/org/apache/camel/component/kafka/KafkaConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java index ba2a1feea77..e62bf74497f 100755 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java @@ -179,7 +179,7 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware @UriParam(label = "producer", defaultValue = "33554432") private Integer bufferMemorySize = 33554432; // compression.type -@UriParam(label = "producer", defaultValue = "none", enums = "none,gzip,snappy,lz4") +@UriParam(label = "producer", defaultValue = "none", enums = "none,gzip,snappy,lz4,zstd") private String compressionCodec = "none"; // retries @UriParam(label = "producer", defaultValue = "0") @@ -871,7 +871,7 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware /** * This parameter allows you to specify the compression codec for all data generated by this producer. Valid values - * are "none", "gzip" and "snappy". + * are "none", "gzip", "snappy", "lz4" and "zstd". */ public void setCompressionCodec(String compressionCodec) { this.compressionCodec = compressionCodec;
[camel] branch main updated: docs: camel-kafka - Enumerate all options for compressionCodec (#8948)
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 1cbf2b6f457 docs: camel-kafka - Enumerate all options for compressionCodec (#8948) 1cbf2b6f457 is described below commit 1cbf2b6f457c74842e7ff843cc3908e1fc969caf Author: Kengo Seki AuthorDate: Mon Dec 26 00:56:56 2022 +0900 docs: camel-kafka - Enumerate all options for compressionCodec (#8948) Kafka supports zstd compression and Camel can leverage it without any code modification. But that option is not mentioned in the component document, so let's cover it. --- .../java/org/apache/camel/component/kafka/KafkaConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java index ba2a1feea77..e62bf74497f 100755 --- a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java +++ b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java @@ -179,7 +179,7 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware @UriParam(label = "producer", defaultValue = "33554432") private Integer bufferMemorySize = 33554432; // compression.type -@UriParam(label = "producer", defaultValue = "none", enums = "none,gzip,snappy,lz4") +@UriParam(label = "producer", defaultValue = "none", enums = "none,gzip,snappy,lz4,zstd") private String compressionCodec = "none"; // retries @UriParam(label = "producer", defaultValue = "0") @@ -871,7 +871,7 @@ public class KafkaConfiguration implements Cloneable, HeaderFilterStrategyAware /** * This parameter allows you to specify the compression codec for all data generated by this producer. Valid values - * are "none", "gzip" and "snappy". + * are "none", "gzip", "snappy", "lz4" and "zstd". */ public void setCompressionCodec(String compressionCodec) { this.compressionCodec = compressionCodec;
[GitHub] [camel] davsclaus merged pull request #8948: docs: camel-kafka - Enumerate all options for compressionCodec
davsclaus merged PR #8948: URL: https://github.com/apache/camel/pull/8948 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] sekikn commented on pull request #8948: docs: camel-kafka - Enumerate all options for compressionCodec
sekikn commented on PR #8948: URL: https://github.com/apache/camel/pull/8948#issuecomment-1364698780 Thank you for the review, @davsclaus and @oscerd. The CI failure seems to be caused by timeout and it's apparently irrelevant to this change. ``` [INFO] --- maven-failsafe-plugin:3.0.0-M4:integration-test (integration-test) @ camel-kafka --- [INFO] [INFO] --- [INFO] T E S T S [INFO] --- [INFO] Running org.apache.camel.component.kafka.integration.KafkaConsumerAutoInstResumeRouteStrategyIT [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 34.725 s - in org.apache.camel.component.kafka.integration.KafkaConsumerAutoInstResumeRouteStrategyIT [INFO] Running org.apache.camel.component.kafka.integration.KafkaConsumerLastRecordHeaderIT [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.182 s - in org.apache.camel.component.kafka.integration.KafkaConsumerLastRecordHeaderIT [INFO] Running org.apache.camel.component.kafka.integration.KafkaConsumerTopicIsPatternIT [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.08 s - in org.apache.camel.component.kafka.integration.KafkaConsumerTopicIsPatternIT [INFO] Running org.apache.camel.component.kafka.integration.health.KafkaConsumerBadPortHealthCheckIT [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.333 s - in org.apache.camel.component.kafka.integration.health.KafkaConsumerBadPortHealthCheckIT [INFO] Running org.apache.camel.component.kafka.integration.health.KafkaConsumerUnresolvableHealthCheckIT [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.139 s - in org.apache.camel.component.kafka.integration.health.KafkaConsumerUnresolvableHealthCheckIT [INFO] Running org.apache.camel.component.kafka.integration.health.KafkaConsumerBadPortSupervisingHealthCheckIT [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.171 s - in org.apache.camel.component.kafka.integration.health.KafkaConsumerBadPortSupervisingHealthCheckIT [INFO] Running org.apache.camel.component.kafka.integration.KafkaConsumerIdempotentWithProcessorIT [INFO] [INFO] Results: [INFO] [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-failsafe-plugin:3.0.0-M4:verify (integration-test) @ camel-kafka --- [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 20:19 min [INFO] Finished at: 2022-12-25T15:13:22Z [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.0.0-M4:verify (integration-test) on project camel-kafka: There was a timeout or other error in the fork -> [Help 1] ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] github-actions[bot] commented on pull request #8948: docs: camel-kafka - Enumerate all options for compressionCodec
github-actions[bot] commented on PR #8948: URL: https://github.com/apache/camel/pull/8948#issuecomment-1364696696 ### Components tested: | Total | Tested | Failed :x: | Passed :white_check_mark: | | --- | --- | --- | --- | | 1 | 1 | 1 | 0 | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (0bc10ee6139 -> 7d021193271)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 0bc10ee6139 CAMEL-18825: Make XML parser/transformers more secure out of the box. add 7d021193271 CAMEL-18825: Make XML parser/transformers more secure out of the box. No new revisions were added by this update. Summary of changes: .../xmlsecurity/processor/XmlSignatureProcessor.java | 1 + .../modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc| 14 +- 2 files changed, 10 insertions(+), 5 deletions(-)
[camel] branch regen_bot_3.14.x updated (8d21f6819f4 -> c1d9343c6cf)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot_3.14.x in repository https://gitbox.apache.org/repos/asf/camel.git from 8d21f6819f4 CAMEL-18835: OnCompletionProcessor#onFailure callback fires more than once add c1d9343c6cf xstream upgrade to 1.4.20 No new revisions were added by this update. Summary of changes: camel-dependencies/pom.xml | 2 +- parent/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
[camel] branch regen_bot updated (628a1622666 -> 0bc10ee6139)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 628a1622666 CAMEL-18825: Make XML parser/transformers more secure out of the box. add e59b22c3cb1 CAMEL-18825: Make XML parser/transformers more secure out of the box. add 0a860de26ea CAMEL-18825: Make XML parser/transformers more secure out of the box. add 0c9e8ff16d5 xstream upgrade to 1.4.20 add 0bc10ee6139 CAMEL-18825: Make XML parser/transformers more secure out of the box. No new revisions were added by this update. Summary of changes: camel-dependencies/pom.xml | 2 +- .../org/apache/camel/converter/jaxb/JaxbDataFormat.java| 14 -- .../org/apache/camel/builder/xml/XPathFeatureTest.java | 14 ++ .../java/org/apache/camel/converter/jaxp/XmlConverter.java | 7 +++ .../camel/support/builder/xml/XMLConverterHelper.java | 7 +++ .../modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc| 4 parent/pom.xml | 2 +- 7 files changed, 38 insertions(+), 12 deletions(-)
[GitHub] [camel] github-actions[bot] commented on pull request #8948: docs: camel-kafka - Enumerate all options for compressionCodec
github-actions[bot] commented on PR #8948: URL: https://github.com/apache/camel/pull/8948#issuecomment-1364687720 :star2: Thank you for your contribution to the Apache Camel project! :star2: :warning: Please note that the changes on this PR may be **tested automatically**. If necessary Apache Camel Committers may access logs and test results in the job summaries! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [camel] sekikn opened a new pull request, #8948: docs: camel-kafka - Enumerate all options for compressionCodec
sekikn opened a new pull request, #8948: URL: https://github.com/apache/camel/pull/8948 Kafka supports zstd compression and Camel can leverage it without any code modification, as follows. ``` $ cat foo.java // camel-k: language=java import org.apache.camel.builder.RouteBuilder; public class foo extends RouteBuilder { @Override public void configure() throws Exception { // Write your routes here, for example: from("timer:java?period={{time:1000}}").routeId("java") .setBody() .simple("Hello Camel from ${routeId}") .to("kafka:topic?brokers=localhost:9092=zstd"); } } $ camel run foo.java ... 2022-12-25 22:54:40.086 INFO 1889837 --- [ main] e.camel.impl.engine.AbstractCamelContext : Apache Camel 3.19.0 (foo) is starting 2022-12-25 22:54:40.218 INFO 1889837 --- [ main] he.kafka.clients.producer.ProducerConfig : ProducerConfig values: ... compression.type = zstd ... 2022-12-25 22:54:40.350 INFO 1889837 --- [ main] e.camel.impl.engine.AbstractCamelContext : Apache Camel 3.19.0 (foo) started in 764ms (build:117ms init:384ms sta rt:263ms JVM-uptime:3s) (continues producing messages without error) ``` But that option is not mentioned in the component document, so let's cover it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[camel] branch regen_bot updated (358077fce57 -> 628a1622666)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 358077fce57 [CAMEL-18842] Checks for compression before throwing exception (#8947) add 611aa8600c0 CAMEL-18825: Make XML parser/transformers more secure out of the box. add 9cb1ff41560 CAMEL-18825: Make XML parser/transformers more secure out of the box. add fc717898b4b Upgrade libphonenumber 8.13.3 add 628a1622666 CAMEL-18825: Make XML parser/transformers more secure out of the box. No new revisions were added by this update. Summary of changes: camel-dependencies/pom.xml | 2 +- .../camel/component/cm/CMSenderOneMessageImpl.java | 9 +++-- .../processor/SchematronProcessorFactory.java| 20 ++-- .../component/stax/StAXJAXBIteratorExpression.java | 3 +++ .../apache/camel/converter/jaxp/XmlConverter.java| 3 +++ .../support/builder/xml/XMLConverterHelper.java | 3 +++ .../ROOT/pages/camel-3x-upgrade-guide-3_21.adoc | 16 parent/pom.xml | 2 +- 8 files changed, 36 insertions(+), 22 deletions(-)
[camel] branch main updated: CAMEL-18825: Make XML parser/transformers more secure out of the box.
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 7d021193271 CAMEL-18825: Make XML parser/transformers more secure out of the box. 7d021193271 is described below commit 7d021193271feaf4532b189bbc975a4bcdc93562 Author: Claus Ibsen AuthorDate: Sun Dec 25 14:58:48 2022 +0100 CAMEL-18825: Make XML parser/transformers more secure out of the box. --- .../xmlsecurity/processor/XmlSignatureProcessor.java | 1 + .../modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc| 14 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java index eafb1f642ad..21e93e2964e 100644 --- a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java +++ b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java @@ -133,6 +133,7 @@ public abstract class XmlSignatureProcessor implements Processor { } SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); schemaFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); + schemaFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl;, true); schemaFactory.setResourceResolver(new DefaultLSResourceResolver( getCamelContext(), getConfiguration() .getSchemaResourceUri())); diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc index 8b0ef78dc85..6d6df23ccc2 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc @@ -8,23 +8,27 @@ from both 3.0 to 3.1 and 3.1 to 3.2. === camel-core -XML parsers & XML transformers has been made more secure by disabling access to external DTD/Schema. +XML parsers & XML transformers has been made more secure by disabling DOCTYPE and/or access to external DTD/Schema. === camel-jaxb -XML parser has been made more secure by disabling access to external DTD/Schema in the `jaxb` data format. +XML parser has been made more secure by disabling DOCTYPE and/or access to external DTD/Schema. in the `jaxb` data format. === camel-stax -The `StAXJAXBIteratorExpression` has been made more secure by disabling XML parser to access external DTD/Schema. +XML parser in `StAXJAXBIteratorExpression` has been made more secure by disabling DOCTYPE and/or access to external DTD/Schema. === camel-cm-sms -XML parsers has been made more secure by disabling access to external DTD/Schema. +XML parsers has been made more secure by disabling DOCTYPE and/or access to external DTD/Schema. === camel-schematron -XML parsers has been made more secure by disabling access to external DTD/Schema. +XML parsers has been made more secure by disabling DOCTYPE and/or access to external DTD/Schema. + +=== camel-xmlsecurity + +XML parsers has been made more secure by disabling DOCTYPE and/or access to external DTD/Schema. === camel-jbang
[camel] branch camel-3.14.x updated: xstream upgrade to 1.4.20
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.14.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-3.14.x by this push: new c1d9343c6cf xstream upgrade to 1.4.20 c1d9343c6cf is described below commit c1d9343c6cf25c2d0165178cf5068a401ed72e8f Author: Claus Ibsen AuthorDate: Sun Dec 25 14:22:11 2022 +0100 xstream upgrade to 1.4.20 --- camel-dependencies/pom.xml | 2 +- parent/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml index 172960d6ef6..e01b77b20f8 100644 --- a/camel-dependencies/pom.xml +++ b/camel-dependencies/pom.xml @@ -571,7 +571,7 @@ 2.2.3 2.6.3 1.1.4c -1.4.19 +1.4.20 0.13.0 0.14.1 2.16.3 diff --git a/parent/pom.xml b/parent/pom.xml index cfaa34edcd5..529408b2be3 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -562,7 +562,7 @@ 2.2.3 2.6.3 1.1.4c -1.4.19 +1.4.20 0.13.0 0.14.1 2.16.3
[camel] branch camel-3.18.x updated: xstream upgrade to 1.4.20
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.18.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-3.18.x by this push: new 28fc8dbb74d xstream upgrade to 1.4.20 28fc8dbb74d is described below commit 28fc8dbb74d5e65bdec93add7df67e94cb3e66aa Author: Claus Ibsen AuthorDate: Sun Dec 25 14:22:11 2022 +0100 xstream upgrade to 1.4.20 --- camel-dependencies/pom.xml | 2 +- parent/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml index 173af59fbdc..864ae611957 100644 --- a/camel-dependencies/pom.xml +++ b/camel-dependencies/pom.xml @@ -559,7 +559,7 @@ 2.2.3 2.9.0 1.1.4c -1.4.19 +1.4.20 0.13.0 0.14.1 2.16.3 diff --git a/parent/pom.xml b/parent/pom.xml index 7b6778f6769..63c13292437 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -548,7 +548,7 @@ 2.2.3 2.9.0 1.1.4c -1.4.19 +1.4.20 0.13.0 0.14.1 2.16.3
[camel] branch camel-3.20.x updated: xstream upgrade to 1.4.20
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.20.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-3.20.x by this push: new 9a1aeef7a14 xstream upgrade to 1.4.20 9a1aeef7a14 is described below commit 9a1aeef7a14cdc1636015a3e08f9bf6105b999b0 Author: Claus Ibsen AuthorDate: Sun Dec 25 14:22:11 2022 +0100 xstream upgrade to 1.4.20 --- camel-dependencies/pom.xml | 2 +- parent/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml index f6435005150..a15caf900ef 100644 --- a/camel-dependencies/pom.xml +++ b/camel-dependencies/pom.xml @@ -566,7 +566,7 @@ 2.2.3 2.9.0 1.1.4c -1.4.19 +1.4.20 0.13.0 0.19.0 2.16.3 diff --git a/parent/pom.xml b/parent/pom.xml index 93806b58b45..6fbaf8ccc43 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -555,7 +555,7 @@ 2.2.3 2.9.0 1.1.4c -1.4.19 +1.4.20 0.13.0 0.19.0 2.16.3
[camel] 03/04: xstream upgrade to 1.4.20
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 commit 0c9e8ff16d5e0760f41cc055de28eee21bc206d7 Author: Claus Ibsen AuthorDate: Sun Dec 25 14:22:11 2022 +0100 xstream upgrade to 1.4.20 --- camel-dependencies/pom.xml | 2 +- parent/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml index eb8b1e40502..95cfc98a3fb 100644 --- a/camel-dependencies/pom.xml +++ b/camel-dependencies/pom.xml @@ -567,7 +567,7 @@ 2.2.3 2.9.0 1.1.4c -1.4.19 +1.4.20 0.13.0 0.19.0 2.16.3 diff --git a/parent/pom.xml b/parent/pom.xml index 1ea100efd76..4ad78861bc1 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -555,7 +555,7 @@ 2.2.3 2.9.0 1.1.4c -1.4.19 +1.4.20 0.13.0 0.19.0 2.16.3
[camel] 01/04: CAMEL-18825: Make XML parser/transformers more secure out of the box.
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 commit e59b22c3cb1e82bc392df978aa73c1a3c08256ba Author: Claus Ibsen AuthorDate: Sun Dec 25 14:15:44 2022 +0100 CAMEL-18825: Make XML parser/transformers more secure out of the box. --- .../org/apache/camel/converter/jaxb/JaxbDataFormat.java | 16 ++-- .../modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc | 4 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java index ef8d56a63f8..a8e06b51c74 100644 --- a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java +++ b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java @@ -66,6 +66,8 @@ import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.xml.sax.SAXNotRecognizedException; +import org.xml.sax.SAXNotSupportedException; /** * A http://camel.apache.org/data-format.html;>data format ({@link DataFormat}) using JAXB2 to marshal to @@ -361,7 +363,7 @@ public class JaxbDataFormat extends ServiceSupport this.contextPathIsClassName = contextPathIsClassName; } -public SchemaFactory getSchemaFactory() { +public SchemaFactory getSchemaFactory() throws SAXException { if (schemaFactory == null) { return getOrCreateSchemaFactory(); } @@ -602,7 +604,7 @@ public class JaxbDataFormat extends ServiceSupport } private Source[] getSources() throws FileNotFoundException, MalformedURLException { -// we support multiple schema by delimiting they by ',' +// we support multiple schema by delimiting by comma String[] schemas = schema.split(","); Source[] sources = new Source[schemas.length]; for (int i = 0; i < schemas.length; i++) { @@ -612,7 +614,7 @@ public class JaxbDataFormat extends ServiceSupport return sources; } -private SchemaFactory getOrCreateSchemaFactory() { +private SchemaFactory getOrCreateSchemaFactory() throws SAXException { SchemaFactory factory = SCHEMA_FACTORY_POOL.poll(); if (factory == null) { factory = createSchemaFactory(); @@ -620,15 +622,17 @@ public class JaxbDataFormat extends ServiceSupport return factory; } -public static SchemaFactory createSchemaFactory() { -return SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); +public static SchemaFactory createSchemaFactory() throws SAXException { +SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl;, true); +return factory; } private void returnSchemaFactory(SchemaFactory factory) { if (factory != schemaFactory) { boolean result = SCHEMA_FACTORY_POOL.offer(factory); if (!result) { -LOG.error("offer() failed for SCHEMA_FACTORY_POOL"); +LOG.debug("offer() failed for SCHEMA_FACTORY_POOL"); } } } diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc index 219c0f8b4c0..8b0ef78dc85 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc @@ -10,6 +10,10 @@ from both 3.0 to 3.1 and 3.1 to 3.2. XML parsers & XML transformers has been made more secure by disabling access to external DTD/Schema. +=== camel-jaxb + +XML parser has been made more secure by disabling access to external DTD/Schema in the `jaxb` data format. + === camel-stax The `StAXJAXBIteratorExpression` has been made more secure by disabling XML parser to access external DTD/Schema.
[camel] 02/04: CAMEL-18825: Make XML parser/transformers more secure out of the box.
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 commit 0a860de26eaeafc6ee28989e2896fc4b9cb0a605 Author: Claus Ibsen AuthorDate: Sun Dec 25 14:21:17 2022 +0100 CAMEL-18825: Make XML parser/transformers more secure out of the box. --- .../main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java | 2 -- .../main/java/org/apache/camel/converter/jaxp/XmlConverter.java| 7 +++ .../org/apache/camel/support/builder/xml/XMLConverterHelper.java | 7 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java index a8e06b51c74..fb974d3f056 100644 --- a/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java +++ b/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java @@ -66,8 +66,6 @@ import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.xml.sax.SAXNotRecognizedException; -import org.xml.sax.SAXNotSupportedException; /** * A http://camel.apache.org/data-format.html;>data format ({@link DataFormat}) using JAXB2 to marshal to diff --git a/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java index 21d5ace57ef..134ce223db9 100644 --- a/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java +++ b/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java @@ -977,6 +977,13 @@ public class XmlConverter { LOG.warn("DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}.", XMLConstants.FEATURE_SECURE_PROCESSING, true, e.getMessage(), e); } +try { +// disable DOCTYPE declaration + factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl;, Boolean.TRUE); +} catch (ParserConfigurationException e) { +LOG.warn("DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}.", +"http://apache.org/xml/features/disallow-doctype-decl;, true, e.getMessage(), e); +} try { // Disable the external-general-entities by default factory.setFeature("http://xml.org/sax/features/external-general-entities;, false); diff --git a/core/camel-xml-jaxp/src/main/java/org/apache/camel/support/builder/xml/XMLConverterHelper.java b/core/camel-xml-jaxp/src/main/java/org/apache/camel/support/builder/xml/XMLConverterHelper.java index 266dff1c546..f8cdefd1a8e 100644 --- a/core/camel-xml-jaxp/src/main/java/org/apache/camel/support/builder/xml/XMLConverterHelper.java +++ b/core/camel-xml-jaxp/src/main/java/org/apache/camel/support/builder/xml/XMLConverterHelper.java @@ -135,6 +135,13 @@ public class XMLConverterHelper { LOG.warn("DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}.", "http://apache.org/xml/features/disallow-doctype-decl;, true, e.getMessage()); } +try { +// disable DOCTYPE declaration + factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl;, Boolean.TRUE); +} catch (ParserConfigurationException e) { +LOG.warn("DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}.", +"http://apache.org/xml/features/disallow-doctype-decl;, true, e.getMessage(), e); +} try { // Disable the external-general-entities by default factory.setFeature("http://xml.org/sax/features/external-general-entities;, false);
[camel] 04/04: CAMEL-18825: Make XML parser/transformers more secure out of the box.
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 commit 0bc10ee6139762053b2f696a05f5d0acf8341c93 Author: Claus Ibsen AuthorDate: Sun Dec 25 14:30:40 2022 +0100 CAMEL-18825: Make XML parser/transformers more secure out of the box. --- .../org/apache/camel/builder/xml/XPathFeatureTest.java | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java b/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java index 19d231cc88b..2cebddd263d 100644 --- a/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/builder/xml/XPathFeatureTest.java @@ -70,15 +70,20 @@ public class XPathFeatureTest extends ContextTestSupport { } @Test -public void testXPathResult() throws Exception { -String result = (String) xpath("/").stringResult().evaluate(createExchange(XML_DATA)); -assertEquals(" ", result, "Get a wrong result"); +public void testXPathDocTypeDisallowed() throws Exception { +try { +xpath("/").stringResult().evaluate(createExchange(XML_DATA)); +fail(); +} catch (Exception e) { +assertIsInstanceOf(SAXParseException.class, e.getCause()); +} } @Test public void testXPath() throws Exception { -// Set this feature will enable the external general entities +// Set these features will enable the external general entities System.setProperty(DOM_BUILDER_FACTORY_FEATURE + ":" + "http://xml.org/sax/features/external-general-entities;, "true"); +System.setProperty(DOM_BUILDER_FACTORY_FEATURE + ":" + "http://apache.org/xml/features/disallow-doctype-decl;, "false"); try { xpath("/").stringResult().evaluate(createExchange(XML_DATA)); fail("Expect an Exception here"); @@ -88,6 +93,7 @@ public class XPathFeatureTest extends ContextTestSupport { "Get a wrong exception cause: " + ex.getCause().getClass() + " instead of " + FileNotFoundException.class); } finally { System.clearProperty(DOM_BUILDER_FACTORY_FEATURE + ":" + "http://xml.org/sax/features/external-general-entities;); +System.clearProperty(DOM_BUILDER_FACTORY_FEATURE + ":" + "http://apache.org/xml/features/disallow-doctype-decl;); } }
[camel] branch main updated (628a1622666 -> 0bc10ee6139)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel.git from 628a1622666 CAMEL-18825: Make XML parser/transformers more secure out of the box. new e59b22c3cb1 CAMEL-18825: Make XML parser/transformers more secure out of the box. new 0a860de26ea CAMEL-18825: Make XML parser/transformers more secure out of the box. new 0c9e8ff16d5 xstream upgrade to 1.4.20 new 0bc10ee6139 CAMEL-18825: Make XML parser/transformers more secure out of the box. The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: camel-dependencies/pom.xml | 2 +- .../org/apache/camel/converter/jaxb/JaxbDataFormat.java| 14 -- .../org/apache/camel/builder/xml/XPathFeatureTest.java | 14 ++ .../java/org/apache/camel/converter/jaxp/XmlConverter.java | 7 +++ .../camel/support/builder/xml/XMLConverterHelper.java | 7 +++ .../modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc| 4 parent/pom.xml | 2 +- 7 files changed, 38 insertions(+), 12 deletions(-)
[camel] 04/04: CAMEL-18825: Make XML parser/transformers more secure out of the box.
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 commit 628a1622666b4ce0d08a03e399ef9ab55e862047 Author: Claus Ibsen AuthorDate: Sun Dec 25 14:08:12 2022 +0100 CAMEL-18825: Make XML parser/transformers more secure out of the box. --- .../org/apache/camel/component/cm/CMSenderOneMessageImpl.java| 9 +++-- .../modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc | 4 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java b/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java index 7fe25e2d862..7e897d32a1c 100644 --- a/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java +++ b/components/camel-cm-sms/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java @@ -65,7 +65,6 @@ public class CMSenderOneMessageImpl implements CMSender { private final UUID productToken; public CMSenderOneMessageImpl(final String url, final UUID productToken) { - this.url = url; this.productToken = productToken; } @@ -87,13 +86,13 @@ public class CMSenderOneMessageImpl implements CMSender { } private String createXml(final CMMessage message) { - try { - final ByteArrayOutputStream xml = new ByteArrayOutputStream(); final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl;, true); + factory.setFeature("http://xml.org/sax/features/external-general-entities;, false); + factory.setFeature("http://xml.org/sax/features/external-parameter-entities;, false); factory.setNamespaceAware(true); // Get the DocumentBuilder @@ -170,9 +169,7 @@ public class CMSenderOneMessageImpl implements CMSender { final Result dest = new StreamResult(xml); aTransformer.transform(src, dest); return xml.toString(); -} catch (final TransformerException e) { -throw new XMLConstructionException(String.format("Cant serialize CMMessage %s", message), e); -} catch (final ParserConfigurationException e) { +} catch (final TransformerException | ParserConfigurationException e) { throw new XMLConstructionException(String.format("Cant serialize CMMessage %s", message), e); } } diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc index e3e9ae59b0a..219c0f8b4c0 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc @@ -14,6 +14,10 @@ XML parsers & XML transformers has been made more secure by disabling access to The `StAXJAXBIteratorExpression` has been made more secure by disabling XML parser to access external DTD/Schema. +=== camel-cm-sms + +XML parsers has been made more secure by disabling access to external DTD/Schema. + === camel-schematron XML parsers has been made more secure by disabling access to external DTD/Schema.
[camel] 03/04: Upgrade libphonenumber 8.13.3
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 commit fc717898b4b1e0da829b814209b7cab8bb4e5458 Author: Claus Ibsen AuthorDate: Sun Dec 25 14:03:43 2022 +0100 Upgrade libphonenumber 8.13.3 --- camel-dependencies/pom.xml | 2 +- parent/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml index 6ed56ca0c3f..eb8b1e40502 100644 --- a/camel-dependencies/pom.xml +++ b/camel-dependencies/pom.xml @@ -374,7 +374,7 @@ 21.0 0.12 1.8 -8.12.50 +8.13.3 0.14.1 1.0.0 0.2.0 diff --git a/parent/pom.xml b/parent/pom.xml index 5c9341f3c33..1ea100efd76 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -357,7 +357,7 @@ 0.12 0.12 21.0 -8.12.50 +8.13.3 1.0.0 2.18.0
[camel] 02/04: CAMEL-18825: Make XML parser/transformers more secure out of the box.
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 commit 9cb1ff41560b47c5d2c4ddcc5261777e0c4cc33f Author: Claus Ibsen AuthorDate: Sun Dec 25 14:01:14 2022 +0100 CAMEL-18825: Make XML parser/transformers more secure out of the box. --- .../processor/SchematronProcessorFactory.java| 20 ++-- .../ROOT/pages/camel-3x-upgrade-guide-3_21.adoc | 4 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/SchematronProcessorFactory.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/SchematronProcessorFactory.java index 7721ce2a83d..8575c38ca1b 100644 --- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/SchematronProcessorFactory.java +++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/SchematronProcessorFactory.java @@ -53,30 +53,22 @@ public final class SchematronProcessorFactory { try { return new SchematronProcessor(getXMLReader(), rules); } catch (Exception e) { -LOG.error("Failed to parse the configuration file"); throw new SchematronConfigException(e); } } /** * Gets XMLReader. - * - * @return instance of XMLReader - * @throws ParserConfigurationException - * @throws SAXException */ private static XMLReader getXMLReader() throws ParserConfigurationException, SAXException { final SAXParserFactory fac = SAXParserFactory.newInstance(); -try { -fac.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); - fac.setFeature("http://xml.org/sax/features/external-general-entities;, false); - fac.setFeature("http://xml.org/sax/features/external-parameter-entities;, false); - fac.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd;, false); -} catch (ParserConfigurationException | SAXException ex) { -// LOG.debug("Error setting feature on parser: " + -// ex.getMessage()); -} +fac.setFeature(javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); +fac.setFeature("http://apache.org/xml/features/disallow-doctype-decl;, true); + fac.setFeature("http://xml.org/sax/features/external-general-entities;, false); + fac.setFeature("http://xml.org/sax/features/external-parameter-entities;, false); + fac.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd;, false); fac.setValidating(false); + final SAXParser parser = fac.newSAXParser(); XMLReader reader = parser.getXMLReader(); return reader; diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc index c46f9e906e6..e3e9ae59b0a 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc @@ -14,6 +14,10 @@ XML parsers & XML transformers has been made more secure by disabling access to The `StAXJAXBIteratorExpression` has been made more secure by disabling XML parser to access external DTD/Schema. +=== camel-schematron + +XML parsers has been made more secure by disabling access to external DTD/Schema. + === camel-jbang The command `camel dependencies` has been renamed to `camel dependency`.
[camel] branch main updated (358077fce57 -> 628a1622666)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/camel.git from 358077fce57 [CAMEL-18842] Checks for compression before throwing exception (#8947) new 611aa8600c0 CAMEL-18825: Make XML parser/transformers more secure out of the box. new 9cb1ff41560 CAMEL-18825: Make XML parser/transformers more secure out of the box. new fc717898b4b Upgrade libphonenumber 8.13.3 new 628a1622666 CAMEL-18825: Make XML parser/transformers more secure out of the box. The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: camel-dependencies/pom.xml | 2 +- .../camel/component/cm/CMSenderOneMessageImpl.java | 9 +++-- .../processor/SchematronProcessorFactory.java| 20 ++-- .../component/stax/StAXJAXBIteratorExpression.java | 3 +++ .../apache/camel/converter/jaxp/XmlConverter.java| 3 +++ .../support/builder/xml/XMLConverterHelper.java | 3 +++ .../ROOT/pages/camel-3x-upgrade-guide-3_21.adoc | 16 parent/pom.xml | 2 +- 8 files changed, 36 insertions(+), 22 deletions(-)
[camel] 01/04: CAMEL-18825: Make XML parser/transformers more secure out of the box.
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 commit 611aa8600c0beb7f3173073068ffbae5ad97e200 Author: Claus Ibsen AuthorDate: Sun Dec 25 13:04:05 2022 +0100 CAMEL-18825: Make XML parser/transformers more secure out of the box. --- .../apache/camel/component/stax/StAXJAXBIteratorExpression.java | 3 +++ .../main/java/org/apache/camel/converter/jaxp/XmlConverter.java | 3 +++ .../org/apache/camel/support/builder/xml/XMLConverterHelper.java | 3 +++ .../modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc | 8 4 files changed, 17 insertions(+) diff --git a/components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXJAXBIteratorExpression.java b/components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXJAXBIteratorExpression.java index b8408ac4786..ef679231e4d 100644 --- a/components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXJAXBIteratorExpression.java +++ b/components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXJAXBIteratorExpression.java @@ -22,6 +22,7 @@ import java.io.InputStream; import java.util.Iterator; import java.util.Map; +import javax.xml.XMLConstants; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; @@ -122,6 +123,8 @@ public class StAXJAXBIteratorExpression extends ExpressionAdapter { inputStream = exchange.getIn().getMandatoryBody(InputStream.class); XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance(); xmlInputFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, isNamespaceAware); +xmlInputFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); + xmlInputFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); reader = xmlInputFactory.createXMLEventReader(inputStream); } diff --git a/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java index 94f4ab4ff58..21d5ace57ef 100644 --- a/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java +++ b/core/camel-xml-jaxp/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java @@ -1048,6 +1048,9 @@ public class XmlConverter { LOG.warn("TransformerFactory doesn't support the feature {} with value {}, due to {}.", javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, "true", e.getMessage()); } +LOG.debug("Configuring TransformerFactory to not allow access to external DTD/Stylesheet"); +factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); +factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); factory.setErrorListener(new XmlErrorListener()); configureSaxonTransformerFactory(factory); return factory; diff --git a/core/camel-xml-jaxp/src/main/java/org/apache/camel/support/builder/xml/XMLConverterHelper.java b/core/camel-xml-jaxp/src/main/java/org/apache/camel/support/builder/xml/XMLConverterHelper.java index 6dd23db75be..266dff1c546 100644 --- a/core/camel-xml-jaxp/src/main/java/org/apache/camel/support/builder/xml/XMLConverterHelper.java +++ b/core/camel-xml-jaxp/src/main/java/org/apache/camel/support/builder/xml/XMLConverterHelper.java @@ -186,6 +186,9 @@ public class XMLConverterHelper { LOG.warn("TransformerFactory doesn't support the feature {} with value {}, due to {}.", javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING, "true", e.getMessage(), e); } +LOG.debug("Configuring TransformerFactory to not allow access to external DTD/Stylesheet"); +factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); +factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); factory.setErrorListener(new XmlErrorListener()); configureSaxonTransformerFactory(factory); return factory; diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc index 4cbd96f53e8..c46f9e906e6 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc @@ -6,6 +6,14 @@ from both 3.0 to 3.1 and 3.1 to 3.2. == Upgrading Camel 3.20 to 3.21 +=== camel-core + +XML parsers & XML transformers has been made more secure by disabling access to external DTD/Schema. + +=== camel-stax + +The `StAXJAXBIteratorExpression` has been made more secure by disabling XML parser to access external DTD/Schema. + === camel-jbang The command `camel dependencies` has been renamed to `camel dependency`.
[camel] branch regen_bot updated (51b44036065 -> 358077fce57)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch regen_bot in repository https://gitbox.apache.org/repos/asf/camel.git from 51b44036065 CAMEL-18835: OnCompletionProcessor#onFailure callback fires more than once add 358077fce57 [CAMEL-18842] Checks for compression before throwing exception (#8947) No new revisions were added by this update. Summary of changes: .../component/as2/api/util/HttpMessageUtils.java | 8 + .../camel/component/as2/api/AS2MessageTest.java| 42 ++ 2 files changed, 50 insertions(+)
[camel] branch camel-3.18.x updated: [CAMEL-18842] Checks for compression before throwing exception (#8947)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.18.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-3.18.x by this push: new 9136a97ce15 [CAMEL-18842] Checks for compression before throwing exception (#8947) 9136a97ce15 is described below commit 9136a97ce1577736cbb8bd59604be96d8956822d Author: Yasser Zamani AuthorDate: Sun Dec 25 11:54:26 2022 +0330 [CAMEL-18842] Checks for compression before throwing exception (#8947) * add CAMEL-18842 reproducer test case * checking for compression before throwing exception fixes CAMEL-18842 --- .../component/as2/api/util/HttpMessageUtils.java | 8 + .../camel/component/as2/api/AS2MessageTest.java| 42 ++ 2 files changed, 50 insertions(+) diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java index a4999f990da..4c05a9f1af4 100644 --- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java +++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java @@ -212,6 +212,10 @@ public final class HttpMessageUtils { MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity(); if (mimeEntity instanceof ApplicationEDIEntity) { ediEntity = (ApplicationEDIEntity) mimeEntity; +} else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity) { +ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity += (ApplicationPkcs7MimeCompressedDataEntity) mimeEntity; +ediEntity = extractEdiPayloadFromCompressedEntity(compressedDataEntity); } else { throw new HttpException( "Failed to extract EDI payload: invalid content type '" + mimeEntity.getContentTypeValue() @@ -244,6 +248,10 @@ public final class HttpMessageUtils { MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity(); if (mimeEntity instanceof ApplicationEDIEntity) { ediEntity = (ApplicationEDIEntity) mimeEntity; +} else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity) { +ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity += (ApplicationPkcs7MimeCompressedDataEntity) mimeEntity; +ediEntity = extractEdiPayloadFromCompressedEntity(compressedDataEntity); } else { throw new HttpException( diff --git a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java index 022c9f04b1e..2894b676102 100644 --- a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java +++ b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java @@ -1046,4 +1046,46 @@ public class AS2MessageTest { assertFalse(signatureEntity.isMainBody(), "First mime type set as main body of request"); } +@ParameterizedTest +@CsvSource({ "false,false", "false,true", "true,false", "true,true" }) +void compressionSignatureOrderTest(boolean encrypt, boolean compressBeforeSign) { +// test with as2-lib because Camel AS2 client doesn't support different orders at the moment +// inspired from https://github.com/phax/as2-lib/wiki/Submodule-as2%E2%80%90lib#as2-client + +// Start client configuration +final AS2ClientSettings aSettings = new AS2ClientSettings(); +aSettings.setKeyStore(EKeyStoreType.PKCS12, keystoreFile, "test"); + +// Fixed sender +aSettings.setSenderData(AS2_NAME, FROM, "openas2a_alias"); + +// Fixed receiver +aSettings.setReceiverData(AS2_NAME, "openas2b_alias", "http://; + TARGET_HOST + ":" + TARGET_PORT + "/"); +aSettings.setReceiverCertificate(issueCert); + +// AS2 stuff +aSettings.setPartnershipName(aSettings.getSenderAS2ID() + "_" + aSettings.getReceiverAS2ID()); + +// Build client request +final AS2ClientRequest aRequest = new AS2ClientRequest("AS2 test message from as2-lib"); +aRequest.setData(EDI_MESSAGE, StandardCharsets.US_ASCII); +aRequest.setContentType(AS2MediaType.APPLICATION_EDIFACT); + +// reproduce https://issues.apache.org/jira/browse/CAMEL-18842 +aSettings.setEncryptAndSign(encrypt ? ECryptoAlgorithmCrypt.CRYPT_AES128_GCM : null, +
[camel] branch camel-3.20.x updated: [CAMEL-18842] Checks for compression before throwing exception (#8947)
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-3.20.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-3.20.x by this push: new 66dd9497f0e [CAMEL-18842] Checks for compression before throwing exception (#8947) 66dd9497f0e is described below commit 66dd9497f0e7d8a8ed94f63676cde561e19a6ae4 Author: Yasser Zamani AuthorDate: Sun Dec 25 11:54:26 2022 +0330 [CAMEL-18842] Checks for compression before throwing exception (#8947) * add CAMEL-18842 reproducer test case * checking for compression before throwing exception fixes CAMEL-18842 --- .../component/as2/api/util/HttpMessageUtils.java | 8 + .../camel/component/as2/api/AS2MessageTest.java| 42 ++ 2 files changed, 50 insertions(+) diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java index a4999f990da..4c05a9f1af4 100644 --- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java +++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java @@ -212,6 +212,10 @@ public final class HttpMessageUtils { MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity(); if (mimeEntity instanceof ApplicationEDIEntity) { ediEntity = (ApplicationEDIEntity) mimeEntity; +} else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity) { +ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity += (ApplicationPkcs7MimeCompressedDataEntity) mimeEntity; +ediEntity = extractEdiPayloadFromCompressedEntity(compressedDataEntity); } else { throw new HttpException( "Failed to extract EDI payload: invalid content type '" + mimeEntity.getContentTypeValue() @@ -244,6 +248,10 @@ public final class HttpMessageUtils { MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity(); if (mimeEntity instanceof ApplicationEDIEntity) { ediEntity = (ApplicationEDIEntity) mimeEntity; +} else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity) { +ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity += (ApplicationPkcs7MimeCompressedDataEntity) mimeEntity; +ediEntity = extractEdiPayloadFromCompressedEntity(compressedDataEntity); } else { throw new HttpException( diff --git a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java index 022c9f04b1e..2894b676102 100644 --- a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java +++ b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java @@ -1046,4 +1046,46 @@ public class AS2MessageTest { assertFalse(signatureEntity.isMainBody(), "First mime type set as main body of request"); } +@ParameterizedTest +@CsvSource({ "false,false", "false,true", "true,false", "true,true" }) +void compressionSignatureOrderTest(boolean encrypt, boolean compressBeforeSign) { +// test with as2-lib because Camel AS2 client doesn't support different orders at the moment +// inspired from https://github.com/phax/as2-lib/wiki/Submodule-as2%E2%80%90lib#as2-client + +// Start client configuration +final AS2ClientSettings aSettings = new AS2ClientSettings(); +aSettings.setKeyStore(EKeyStoreType.PKCS12, keystoreFile, "test"); + +// Fixed sender +aSettings.setSenderData(AS2_NAME, FROM, "openas2a_alias"); + +// Fixed receiver +aSettings.setReceiverData(AS2_NAME, "openas2b_alias", "http://; + TARGET_HOST + ":" + TARGET_PORT + "/"); +aSettings.setReceiverCertificate(issueCert); + +// AS2 stuff +aSettings.setPartnershipName(aSettings.getSenderAS2ID() + "_" + aSettings.getReceiverAS2ID()); + +// Build client request +final AS2ClientRequest aRequest = new AS2ClientRequest("AS2 test message from as2-lib"); +aRequest.setData(EDI_MESSAGE, StandardCharsets.US_ASCII); +aRequest.setContentType(AS2MediaType.APPLICATION_EDIFACT); + +// reproduce https://issues.apache.org/jira/browse/CAMEL-18842 +aSettings.setEncryptAndSign(encrypt ? ECryptoAlgorithmCrypt.CRYPT_AES128_GCM : null, +
[camel] branch main updated: [CAMEL-18842] Checks for compression before throwing exception (#8947)
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 358077fce57 [CAMEL-18842] Checks for compression before throwing exception (#8947) 358077fce57 is described below commit 358077fce57dcde64d5d951d5d3ab7a1ca94238d Author: Yasser Zamani AuthorDate: Sun Dec 25 11:54:26 2022 +0330 [CAMEL-18842] Checks for compression before throwing exception (#8947) * add CAMEL-18842 reproducer test case * checking for compression before throwing exception fixes CAMEL-18842 --- .../component/as2/api/util/HttpMessageUtils.java | 8 + .../camel/component/as2/api/AS2MessageTest.java| 42 ++ 2 files changed, 50 insertions(+) diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java index a4999f990da..4c05a9f1af4 100644 --- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java +++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/util/HttpMessageUtils.java @@ -212,6 +212,10 @@ public final class HttpMessageUtils { MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity(); if (mimeEntity instanceof ApplicationEDIEntity) { ediEntity = (ApplicationEDIEntity) mimeEntity; +} else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity) { +ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity += (ApplicationPkcs7MimeCompressedDataEntity) mimeEntity; +ediEntity = extractEdiPayloadFromCompressedEntity(compressedDataEntity); } else { throw new HttpException( "Failed to extract EDI payload: invalid content type '" + mimeEntity.getContentTypeValue() @@ -244,6 +248,10 @@ public final class HttpMessageUtils { MimeEntity mimeEntity = multipartSignedEntity.getSignedDataEntity(); if (mimeEntity instanceof ApplicationEDIEntity) { ediEntity = (ApplicationEDIEntity) mimeEntity; +} else if (mimeEntity instanceof ApplicationPkcs7MimeCompressedDataEntity) { +ApplicationPkcs7MimeCompressedDataEntity compressedDataEntity += (ApplicationPkcs7MimeCompressedDataEntity) mimeEntity; +ediEntity = extractEdiPayloadFromCompressedEntity(compressedDataEntity); } else { throw new HttpException( diff --git a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java index 022c9f04b1e..2894b676102 100644 --- a/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java +++ b/components/camel-as2/camel-as2-api/src/test/java/org/apache/camel/component/as2/api/AS2MessageTest.java @@ -1046,4 +1046,46 @@ public class AS2MessageTest { assertFalse(signatureEntity.isMainBody(), "First mime type set as main body of request"); } +@ParameterizedTest +@CsvSource({ "false,false", "false,true", "true,false", "true,true" }) +void compressionSignatureOrderTest(boolean encrypt, boolean compressBeforeSign) { +// test with as2-lib because Camel AS2 client doesn't support different orders at the moment +// inspired from https://github.com/phax/as2-lib/wiki/Submodule-as2%E2%80%90lib#as2-client + +// Start client configuration +final AS2ClientSettings aSettings = new AS2ClientSettings(); +aSettings.setKeyStore(EKeyStoreType.PKCS12, keystoreFile, "test"); + +// Fixed sender +aSettings.setSenderData(AS2_NAME, FROM, "openas2a_alias"); + +// Fixed receiver +aSettings.setReceiverData(AS2_NAME, "openas2b_alias", "http://; + TARGET_HOST + ":" + TARGET_PORT + "/"); +aSettings.setReceiverCertificate(issueCert); + +// AS2 stuff +aSettings.setPartnershipName(aSettings.getSenderAS2ID() + "_" + aSettings.getReceiverAS2ID()); + +// Build client request +final AS2ClientRequest aRequest = new AS2ClientRequest("AS2 test message from as2-lib"); +aRequest.setData(EDI_MESSAGE, StandardCharsets.US_ASCII); +aRequest.setContentType(AS2MediaType.APPLICATION_EDIFACT); + +// reproduce https://issues.apache.org/jira/browse/CAMEL-18842 +aSettings.setEncryptAndSign(encrypt ? ECryptoAlgorithmCrypt.CRYPT_AES128_GCM : null, +
[GitHub] [camel] davsclaus merged pull request #8947: [CAMEL-18842] Checks for compression before throwing exception
davsclaus merged PR #8947: URL: https://github.com/apache/camel/pull/8947 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org