You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2023/09/25 18:22:31 UTC
[camel-quarkus] branch 3.2.x updated (0b29c0cc18 -> ada6e0d8ef)
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a change to branch 3.2.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
from 0b29c0cc18 Mongodb: native build fails because of CredentialsProviderFinder
new dc220e3bf1 Updates to LDAP tests and usage docs (#5310)
new a742c99417 Update graalvm-docs-version in antora.yml
new 5cd9881578 Remove redundant usage.adoc from xml-jaxp extension
new ada6e0d8ef Add xslt prefix to grouped XML test sub-modules so that the intent is clear
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:
docs/antora.yml | 2 +-
.../ROOT/pages/reference/extensions/ldap.adoc | 136 +--------------------
.../ROOT/pages/reference/extensions/xml-jaxp.adoc | 15 ---
.../xml-jaxp/runtime/src/main/doc/usage.adoc | 11 --
extensions/ldap/runtime/src/main/doc/usage.adoc | 134 +-------------------
.../xml/jvm/{aggregate => xslt-aggregate}/pom.xml | 0
.../component/xml/it/XsltAggregateBuilder.java | 0
.../component/xml/it/XsltAggregateResource.java | 0
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/aggregate.xsl | 0
.../component/xml/it/XsltAggregateTest.java | 0
.../xml/jvm/{bean => xslt-bean}/pom.xml | 0
.../component/xml/it/XsltBeanProducers.java | 0
.../quarkus/component/xml/it/XsltBeanResource.java | 0
.../src/main/resources/application.properties | 0
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltBeanTest.java | 0
.../xml/jvm/{file => xslt-file}/pom.xml | 0
.../quarkus/component/xml/it/XsltFileResource.java | 0
.../src/main/resources/application.properties | 0
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltFileTest.java | 0
.../xml/jvm/{http => xslt-http}/pom.xml | 0
.../quarkus/component/xml/it/XsltHttpResource.java | 0
.../src/main/resources/application.properties | 0
.../main/resources/xslt/classpath-transform.xsl | 0
.../component/xml/it/XmlHttpTestResource.java | 0
.../quarkus/component/xml/it/XsltHttpTest.java | 0
.../xml/jvm/{ref => xslt-ref}/pom.xml | 0
.../quarkus/component/xml/it/XsltRefProducers.java | 0
.../quarkus/component/xml/it/XsltRefResource.java | 0
.../src/main/resources/application.properties | 0
.../main/resources/xslt/classpath-transform.xsl | 0
.../quarkus/component/xml/it/XsltRefTest.java | 0
.../native/{classpath => xslt-classpath}/pom.xml | 0
.../component/xml/it/FunctionsConfiguration.java | 0
.../quarkus/component/xml/it/XsltProducers.java | 0
.../quarkus/component/xml/it/XsltResource.java | 0
.../quarkus/component/xml/it/XsltRouteBuilder.java | 0
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/aggregate.xsl | 0
.../main/resources/xslt/classpath-transform.xsl | 0
.../src/main/resources/xslt/extension-function.xsl | 0
.../src/main/resources/xslt/html-to-text.xsl | 0
.../src/main/resources/xslt/html-transform.xsl | 0
.../src/main/resources/xslt/include.xsl | 0
.../xslt/include_not_existing_resource.xsl | 0
.../resources/xslt/saxon-extension-function.xsl | 0
.../src/main/resources/xslt/terminate.xsl | 0
.../camel/quarkus/component/xml/it/XsltIT.java | 0
.../camel/quarkus/component/xml/it/XsltTest.java | 0
.../src/test/resources/test.html | 0
integration-test-groups/xml/pom.xml | 12 +-
.../quarkus/component/ldap/it/LdapResource.java | 48 +++++---
.../camel/quarkus/component/ldap/it/LdapTest.java | 28 ++++-
55 files changed, 67 insertions(+), 319 deletions(-)
delete mode 100644 extensions-core/xml-jaxp/runtime/src/main/doc/usage.adoc
rename integration-test-groups/xml/jvm/{aggregate => xslt-aggregate}/pom.xml (100%)
rename integration-test-groups/xml/jvm/{aggregate => xslt-aggregate}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java (100%)
rename integration-test-groups/xml/jvm/{aggregate => xslt-aggregate}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java (100%)
rename integration-test-groups/xml/jvm/{aggregate => xslt-aggregate}/src/main/resources/application.properties (100%)
rename integration-test-groups/xml/jvm/{aggregate => xslt-aggregate}/src/main/resources/xslt/aggregate.xsl (100%)
rename integration-test-groups/xml/jvm/{aggregate => xslt-aggregate}/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java (100%)
rename integration-test-groups/xml/jvm/{bean => xslt-bean}/pom.xml (100%)
rename integration-test-groups/xml/jvm/{bean => xslt-bean}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java (100%)
rename integration-test-groups/xml/jvm/{bean => xslt-bean}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java (100%)
rename integration-test-groups/xml/jvm/{bean => xslt-bean}/src/main/resources/application.properties (100%)
rename integration-test-groups/xml/jvm/{bean => xslt-bean}/src/main/resources/xslt/classpath-transform.xsl (100%)
rename integration-test-groups/xml/jvm/{bean => xslt-bean}/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java (100%)
rename integration-test-groups/xml/jvm/{file => xslt-file}/pom.xml (100%)
rename integration-test-groups/xml/jvm/{file => xslt-file}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java (100%)
rename integration-test-groups/xml/jvm/{file => xslt-file}/src/main/resources/application.properties (100%)
rename integration-test-groups/xml/jvm/{file => xslt-file}/src/main/resources/xslt/classpath-transform.xsl (100%)
rename integration-test-groups/xml/jvm/{file => xslt-file}/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java (100%)
rename integration-test-groups/xml/jvm/{http => xslt-http}/pom.xml (100%)
rename integration-test-groups/xml/jvm/{http => xslt-http}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java (100%)
rename integration-test-groups/xml/jvm/{http => xslt-http}/src/main/resources/application.properties (100%)
rename integration-test-groups/xml/jvm/{http => xslt-http}/src/main/resources/xslt/classpath-transform.xsl (100%)
rename integration-test-groups/xml/jvm/{http => xslt-http}/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java (100%)
rename integration-test-groups/xml/jvm/{http => xslt-http}/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java (100%)
rename integration-test-groups/xml/jvm/{ref => xslt-ref}/pom.xml (100%)
rename integration-test-groups/xml/jvm/{ref => xslt-ref}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java (100%)
rename integration-test-groups/xml/jvm/{ref => xslt-ref}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java (100%)
rename integration-test-groups/xml/jvm/{ref => xslt-ref}/src/main/resources/application.properties (100%)
rename integration-test-groups/xml/jvm/{ref => xslt-ref}/src/main/resources/xslt/classpath-transform.xsl (100%)
rename integration-test-groups/xml/jvm/{ref => xslt-ref}/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/pom.xml (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/application.properties (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/aggregate.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/classpath-transform.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/extension-function.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/html-to-text.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/html-transform.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/include.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/include_not_existing_resource.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/saxon-extension-function.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/main/resources/xslt/terminate.xsl (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java (100%)
rename integration-test-groups/xml/native/{classpath => xslt-classpath}/src/test/resources/test.html (100%)
[camel-quarkus] 04/04: Add xslt prefix to grouped XML test sub-modules so that the intent is clear
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 3.2.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit ada6e0d8effa4e935c1511bfec8a3fef3375bacd
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Sep 22 14:30:40 2023 +0100
Add xslt prefix to grouped XML test sub-modules so that the intent is clear
---
.../xml/jvm/{aggregate => xslt-aggregate}/pom.xml | 0
.../camel/quarkus/component/xml/it/XsltAggregateBuilder.java | 0
.../quarkus/component/xml/it/XsltAggregateResource.java | 0
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/aggregate.xsl | 0
.../camel/quarkus/component/xml/it/XsltAggregateTest.java | 0
integration-test-groups/xml/jvm/{bean => xslt-bean}/pom.xml | 0
.../camel/quarkus/component/xml/it/XsltBeanProducers.java | 0
.../camel/quarkus/component/xml/it/XsltBeanResource.java | 0
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/classpath-transform.xsl | 0
.../apache/camel/quarkus/component/xml/it/XsltBeanTest.java | 0
integration-test-groups/xml/jvm/{file => xslt-file}/pom.xml | 0
.../camel/quarkus/component/xml/it/XsltFileResource.java | 0
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/classpath-transform.xsl | 0
.../apache/camel/quarkus/component/xml/it/XsltFileTest.java | 0
integration-test-groups/xml/jvm/{http => xslt-http}/pom.xml | 0
.../camel/quarkus/component/xml/it/XsltHttpResource.java | 0
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/classpath-transform.xsl | 0
.../camel/quarkus/component/xml/it/XmlHttpTestResource.java | 0
.../apache/camel/quarkus/component/xml/it/XsltHttpTest.java | 0
integration-test-groups/xml/jvm/{ref => xslt-ref}/pom.xml | 0
.../camel/quarkus/component/xml/it/XsltRefProducers.java | 0
.../camel/quarkus/component/xml/it/XsltRefResource.java | 0
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/classpath-transform.xsl | 0
.../apache/camel/quarkus/component/xml/it/XsltRefTest.java | 0
.../xml/native/{classpath => xslt-classpath}/pom.xml | 0
.../quarkus/component/xml/it/FunctionsConfiguration.java | 0
.../apache/camel/quarkus/component/xml/it/XsltProducers.java | 0
.../apache/camel/quarkus/component/xml/it/XsltResource.java | 0
.../camel/quarkus/component/xml/it/XsltRouteBuilder.java | 0
.../src/main/resources/application.properties | 0
.../src/main/resources/xslt/aggregate.xsl | 0
.../src/main/resources/xslt/classpath-transform.xsl | 0
.../src/main/resources/xslt/extension-function.xsl | 0
.../src/main/resources/xslt/html-to-text.xsl | 0
.../src/main/resources/xslt/html-transform.xsl | 0
.../src/main/resources/xslt/include.xsl | 0
.../main/resources/xslt/include_not_existing_resource.xsl | 0
.../src/main/resources/xslt/saxon-extension-function.xsl | 0
.../src/main/resources/xslt/terminate.xsl | 0
.../org/apache/camel/quarkus/component/xml/it/XsltIT.java | 0
.../org/apache/camel/quarkus/component/xml/it/XsltTest.java | 0
.../src/test/resources/test.html | 0
integration-test-groups/xml/pom.xml | 12 ++++++------
48 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/integration-test-groups/xml/jvm/aggregate/pom.xml b/integration-test-groups/xml/jvm/xslt-aggregate/pom.xml
similarity index 100%
rename from integration-test-groups/xml/jvm/aggregate/pom.xml
rename to integration-test-groups/xml/jvm/xslt-aggregate/pom.xml
diff --git a/integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java b/integration-test-groups/xml/jvm/xslt-aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java
similarity index 100%
rename from integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java
rename to integration-test-groups/xml/jvm/xslt-aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateBuilder.java
diff --git a/integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java b/integration-test-groups/xml/jvm/xslt-aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java
similarity index 100%
rename from integration-test-groups/xml/jvm/aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java
rename to integration-test-groups/xml/jvm/xslt-aggregate/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateResource.java
diff --git a/integration-test-groups/xml/jvm/aggregate/src/main/resources/application.properties b/integration-test-groups/xml/jvm/xslt-aggregate/src/main/resources/application.properties
similarity index 100%
rename from integration-test-groups/xml/jvm/aggregate/src/main/resources/application.properties
rename to integration-test-groups/xml/jvm/xslt-aggregate/src/main/resources/application.properties
diff --git a/integration-test-groups/xml/jvm/aggregate/src/main/resources/xslt/aggregate.xsl b/integration-test-groups/xml/jvm/xslt-aggregate/src/main/resources/xslt/aggregate.xsl
similarity index 100%
rename from integration-test-groups/xml/jvm/aggregate/src/main/resources/xslt/aggregate.xsl
rename to integration-test-groups/xml/jvm/xslt-aggregate/src/main/resources/xslt/aggregate.xsl
diff --git a/integration-test-groups/xml/jvm/aggregate/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java b/integration-test-groups/xml/jvm/xslt-aggregate/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java
similarity index 100%
rename from integration-test-groups/xml/jvm/aggregate/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java
rename to integration-test-groups/xml/jvm/xslt-aggregate/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltAggregateTest.java
diff --git a/integration-test-groups/xml/jvm/bean/pom.xml b/integration-test-groups/xml/jvm/xslt-bean/pom.xml
similarity index 100%
rename from integration-test-groups/xml/jvm/bean/pom.xml
rename to integration-test-groups/xml/jvm/xslt-bean/pom.xml
diff --git a/integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java b/integration-test-groups/xml/jvm/xslt-bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java
similarity index 100%
rename from integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java
rename to integration-test-groups/xml/jvm/xslt-bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanProducers.java
diff --git a/integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java b/integration-test-groups/xml/jvm/xslt-bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java
similarity index 100%
rename from integration-test-groups/xml/jvm/bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java
rename to integration-test-groups/xml/jvm/xslt-bean/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltBeanResource.java
diff --git a/integration-test-groups/xml/jvm/bean/src/main/resources/application.properties b/integration-test-groups/xml/jvm/xslt-bean/src/main/resources/application.properties
similarity index 100%
rename from integration-test-groups/xml/jvm/bean/src/main/resources/application.properties
rename to integration-test-groups/xml/jvm/xslt-bean/src/main/resources/application.properties
diff --git a/integration-test-groups/xml/jvm/bean/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/jvm/xslt-bean/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
rename from integration-test-groups/xml/jvm/bean/src/main/resources/xslt/classpath-transform.xsl
rename to integration-test-groups/xml/jvm/xslt-bean/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-test-groups/xml/jvm/bean/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java b/integration-test-groups/xml/jvm/xslt-bean/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java
similarity index 100%
rename from integration-test-groups/xml/jvm/bean/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java
rename to integration-test-groups/xml/jvm/xslt-bean/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltBeanTest.java
diff --git a/integration-test-groups/xml/jvm/file/pom.xml b/integration-test-groups/xml/jvm/xslt-file/pom.xml
similarity index 100%
rename from integration-test-groups/xml/jvm/file/pom.xml
rename to integration-test-groups/xml/jvm/xslt-file/pom.xml
diff --git a/integration-test-groups/xml/jvm/file/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java b/integration-test-groups/xml/jvm/xslt-file/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java
similarity index 100%
rename from integration-test-groups/xml/jvm/file/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java
rename to integration-test-groups/xml/jvm/xslt-file/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltFileResource.java
diff --git a/integration-test-groups/xml/jvm/file/src/main/resources/application.properties b/integration-test-groups/xml/jvm/xslt-file/src/main/resources/application.properties
similarity index 100%
rename from integration-test-groups/xml/jvm/file/src/main/resources/application.properties
rename to integration-test-groups/xml/jvm/xslt-file/src/main/resources/application.properties
diff --git a/integration-test-groups/xml/jvm/file/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/jvm/xslt-file/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
rename from integration-test-groups/xml/jvm/file/src/main/resources/xslt/classpath-transform.xsl
rename to integration-test-groups/xml/jvm/xslt-file/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-test-groups/xml/jvm/file/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java b/integration-test-groups/xml/jvm/xslt-file/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java
similarity index 100%
rename from integration-test-groups/xml/jvm/file/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java
rename to integration-test-groups/xml/jvm/xslt-file/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltFileTest.java
diff --git a/integration-test-groups/xml/jvm/http/pom.xml b/integration-test-groups/xml/jvm/xslt-http/pom.xml
similarity index 100%
rename from integration-test-groups/xml/jvm/http/pom.xml
rename to integration-test-groups/xml/jvm/xslt-http/pom.xml
diff --git a/integration-test-groups/xml/jvm/http/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java b/integration-test-groups/xml/jvm/xslt-http/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java
similarity index 100%
rename from integration-test-groups/xml/jvm/http/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java
rename to integration-test-groups/xml/jvm/xslt-http/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltHttpResource.java
diff --git a/integration-test-groups/xml/jvm/http/src/main/resources/application.properties b/integration-test-groups/xml/jvm/xslt-http/src/main/resources/application.properties
similarity index 100%
rename from integration-test-groups/xml/jvm/http/src/main/resources/application.properties
rename to integration-test-groups/xml/jvm/xslt-http/src/main/resources/application.properties
diff --git a/integration-test-groups/xml/jvm/http/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/jvm/xslt-http/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
rename from integration-test-groups/xml/jvm/http/src/main/resources/xslt/classpath-transform.xsl
rename to integration-test-groups/xml/jvm/xslt-http/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java b/integration-test-groups/xml/jvm/xslt-http/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java
similarity index 100%
rename from integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java
rename to integration-test-groups/xml/jvm/xslt-http/src/test/java/org/apache/camel/quarkus/component/xml/it/XmlHttpTestResource.java
diff --git a/integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java b/integration-test-groups/xml/jvm/xslt-http/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java
similarity index 100%
rename from integration-test-groups/xml/jvm/http/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java
rename to integration-test-groups/xml/jvm/xslt-http/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltHttpTest.java
diff --git a/integration-test-groups/xml/jvm/ref/pom.xml b/integration-test-groups/xml/jvm/xslt-ref/pom.xml
similarity index 100%
rename from integration-test-groups/xml/jvm/ref/pom.xml
rename to integration-test-groups/xml/jvm/xslt-ref/pom.xml
diff --git a/integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java b/integration-test-groups/xml/jvm/xslt-ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java
similarity index 100%
rename from integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java
rename to integration-test-groups/xml/jvm/xslt-ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefProducers.java
diff --git a/integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java b/integration-test-groups/xml/jvm/xslt-ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java
similarity index 100%
rename from integration-test-groups/xml/jvm/ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java
rename to integration-test-groups/xml/jvm/xslt-ref/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRefResource.java
diff --git a/integration-test-groups/xml/jvm/ref/src/main/resources/application.properties b/integration-test-groups/xml/jvm/xslt-ref/src/main/resources/application.properties
similarity index 100%
rename from integration-test-groups/xml/jvm/ref/src/main/resources/application.properties
rename to integration-test-groups/xml/jvm/xslt-ref/src/main/resources/application.properties
diff --git a/integration-test-groups/xml/jvm/ref/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/jvm/xslt-ref/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
rename from integration-test-groups/xml/jvm/ref/src/main/resources/xslt/classpath-transform.xsl
rename to integration-test-groups/xml/jvm/xslt-ref/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-test-groups/xml/jvm/ref/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java b/integration-test-groups/xml/jvm/xslt-ref/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java
similarity index 100%
rename from integration-test-groups/xml/jvm/ref/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java
rename to integration-test-groups/xml/jvm/xslt-ref/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltRefTest.java
diff --git a/integration-test-groups/xml/native/classpath/pom.xml b/integration-test-groups/xml/native/xslt-classpath/pom.xml
similarity index 100%
rename from integration-test-groups/xml/native/classpath/pom.xml
rename to integration-test-groups/xml/native/xslt-classpath/pom.xml
diff --git a/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java b/integration-test-groups/xml/native/xslt-classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java
rename to integration-test-groups/xml/native/xslt-classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/FunctionsConfiguration.java
diff --git a/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java b/integration-test-groups/xml/native/xslt-classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
rename to integration-test-groups/xml/native/xslt-classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltProducers.java
diff --git a/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java b/integration-test-groups/xml/native/xslt-classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java
rename to integration-test-groups/xml/native/xslt-classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltResource.java
diff --git a/integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java b/integration-test-groups/xml/native/xslt-classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java
rename to integration-test-groups/xml/native/xslt-classpath/src/main/java/org/apache/camel/quarkus/component/xml/it/XsltRouteBuilder.java
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/application.properties b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/application.properties
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/application.properties
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/application.properties
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/aggregate.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/aggregate.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/aggregate.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/aggregate.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/classpath-transform.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/classpath-transform.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/classpath-transform.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/classpath-transform.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/extension-function.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/extension-function.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/extension-function.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/extension-function.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/html-to-text.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/html-to-text.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/html-to-text.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/html-to-text.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/html-transform.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/html-transform.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/html-transform.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/html-transform.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/include.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/include.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/include.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/include.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/include_not_existing_resource.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/include_not_existing_resource.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/include_not_existing_resource.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/include_not_existing_resource.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/saxon-extension-function.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/saxon-extension-function.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/saxon-extension-function.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/saxon-extension-function.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/main/resources/xslt/terminate.xsl b/integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/terminate.xsl
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/main/resources/xslt/terminate.xsl
rename to integration-test-groups/xml/native/xslt-classpath/src/main/resources/xslt/terminate.xsl
diff --git a/integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java b/integration-test-groups/xml/native/xslt-classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java
rename to integration-test-groups/xml/native/xslt-classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltIT.java
diff --git a/integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java b/integration-test-groups/xml/native/xslt-classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java
rename to integration-test-groups/xml/native/xslt-classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java
diff --git a/integration-test-groups/xml/native/classpath/src/test/resources/test.html b/integration-test-groups/xml/native/xslt-classpath/src/test/resources/test.html
similarity index 100%
rename from integration-test-groups/xml/native/classpath/src/test/resources/test.html
rename to integration-test-groups/xml/native/xslt-classpath/src/test/resources/test.html
diff --git a/integration-test-groups/xml/pom.xml b/integration-test-groups/xml/pom.xml
index 74343c21af..49e6bfb63f 100644
--- a/integration-test-groups/xml/pom.xml
+++ b/integration-test-groups/xml/pom.xml
@@ -37,12 +37,12 @@
<modules>
<!-- extensions a..z; do not remove this comment, it is important when sorting via mvn process-resources -Pformat -->
- <module>jvm/aggregate</module>
- <module>jvm/bean</module>
- <module>jvm/file</module>
- <module>jvm/http</module>
- <module>jvm/ref</module>
- <module>native/classpath</module>
+ <module>jvm/xslt-aggregate</module>
+ <module>jvm/xslt-bean</module>
+ <module>jvm/xslt-file</module>
+ <module>jvm/xslt-http</module>
+ <module>jvm/xslt-ref</module>
+ <module>native/xslt-classpath</module>
</modules>
</project>
[camel-quarkus] 03/04: Remove redundant usage.adoc from xml-jaxp extension
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 3.2.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 5cd98815786e7791c58573eb0f98595754119a64
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Sep 21 13:39:34 2023 +0100
Remove redundant usage.adoc from xml-jaxp extension
---
.../modules/ROOT/pages/reference/extensions/xml-jaxp.adoc | 15 ---------------
extensions-core/xml-jaxp/runtime/src/main/doc/usage.adoc | 11 -----------
2 files changed, 26 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/xml-jaxp.adoc b/docs/modules/ROOT/pages/reference/extensions/xml-jaxp.adoc
index a12019d80a..f7d37c3b7b 100644
--- a/docs/modules/ROOT/pages/reference/extensions/xml-jaxp.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/xml-jaxp.adoc
@@ -37,18 +37,3 @@ Or add the coordinates to your existing project:
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]
-
-[id="extensions-xml-jaxp-usage"]
-== Usage
-To use the XML Tokenize language, a StAX Reader implementation must be present on the classpath.
-
-For convenience, Camel Quarkus provides a StAX extension with native mode support.
-
-[source,xml]
-----
-<dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-support-stax</artifactId>
-</dependency>
-----
-
diff --git a/extensions-core/xml-jaxp/runtime/src/main/doc/usage.adoc b/extensions-core/xml-jaxp/runtime/src/main/doc/usage.adoc
deleted file mode 100644
index b49c71e2d7..0000000000
--- a/extensions-core/xml-jaxp/runtime/src/main/doc/usage.adoc
+++ /dev/null
@@ -1,11 +0,0 @@
-To use the XML Tokenize language, a StAX Reader implementation must be present on the classpath.
-
-For convenience, Camel Quarkus provides a StAX extension with native mode support.
-
-[source,xml]
-----
-<dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-support-stax</artifactId>
-</dependency>
-----
[camel-quarkus] 01/04: Updates to LDAP tests and usage docs (#5310)
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 3.2.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit dc220e3bf1924e6b9602f66c8ee5c768115ba55d
Author: Darren Coleman <dc...@redhat.com>
AuthorDate: Mon Sep 18 12:21:36 2023 +0100
Updates to LDAP tests and usage docs (#5310)
Fixes #5309
---
.../ROOT/pages/reference/extensions/ldap.adoc | 136 +--------------------
extensions/ldap/runtime/src/main/doc/usage.adoc | 134 +-------------------
.../quarkus/component/ldap/it/LdapResource.java | 48 +++++---
.../camel/quarkus/component/ldap/it/LdapTest.java | 28 ++++-
4 files changed, 60 insertions(+), 286 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/ldap.adoc b/docs/modules/ROOT/pages/reference/extensions/ldap.adoc
index f0880d6d3d..8194a85386 100644
--- a/docs/modules/ROOT/pages/reference/extensions/ldap.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/ldap.adoc
@@ -46,146 +46,16 @@ endif::[]
[id="extensions-ldap-usage"]
== Usage
-[id="extensions-ldap-usage-dircontext"]
-=== DirContext
-
-The URI, `ldap:ldapserver`, references a bean with the ID `ldapserver`. A CDI producer method may be used to instantiate a `DirContext` object as follows:
-
-[source,java]
-----
-public class LdapServerProducer {
-
- @Produces
- @Dependent
- @Named("ldapserver")
- public DirContext createLdapServer() throws Exception {
- Hashtable<String, String> env = new Hashtable<>();
- env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
- env.put(Context.PROVIDER_URL, "ldap://localhost:10389");
- env.put(Context.SECURITY_AUTHENTICATION, "none");
-
- return new InitialDirContext(env);
- }
-}
-----
-
-The preceding example creates a regular Sun based LDAP `DirContext` that connects anonymously to a locally hosted LDAP server. The use of the `@Named` annotation binds the `DirContext` into the Camel registry automatically.
-
-[id="extensions-ldap-usage-configuring-ssl"]
-=== Configuring SSL
-
-When connecting to an LDAP server over SSL/TLS, you may encounter situations where the default trust manager used by the JVM is unable to verify the certificate. This can happen, for example, when the server uses a self-signed certificate or when the certificate is issued by a non-trusted CA. In such cases, you may need to provide a custom trust manager implementation that can verify the server's certificate.
-
-The following code shows an implementation of a custom socket factory that can be used to create SSL/TLS sockets. The class name of the custom SSL socket factory is then specified in the `java.naming.ldap.factory.socket` property of the environment hashtable used to create the LDAP context.
-
-[source,java]
-----
-public class CustomSSLSocketFactory extends SSLSocketFactory {
-
- private SSLSocketFactory delegate;
-
- public CustomSSLSocketFactory() throws Exception {
- String trustStoreFilename = ConfigProvider.getConfig().getValue("ldap.trustStore", String.class);
- String trustStorePassword = ConfigProvider.getConfig().getValue("ldap.trustStorePassword", String.class);
- KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
- try (InputStream in = new FileInputStream(trustStoreFilename)) {
- keyStore.load(in, trustStorePassword.toCharArray());
- }
- TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
- tmf.init(keyStore);
- SSLContext ctx = SSLContext.getInstance("TLS");
- ctx.init(null, tmf.getTrustManagers(), null);
- delegate = ctx.getSocketFactory();
-
- }
-
- public static SocketFactory getDefault() {
- try {
- return new CustomSSLSocketFactory();
- } catch (Exception ex) {
- ex.printStackTrace();
- return null;
- }
- }
-
- @Override
- public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
- return delegate.createSocket(s, host, port, autoClose);
- }
-
- @Override
- public String[] getDefaultCipherSuites() {
- return delegate.getDefaultCipherSuites();
- }
-
- @Override
- public String[] getSupportedCipherSuites() {
- return delegate.getSupportedCipherSuites();
- }
-
- @Override
- public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
- return delegate.createSocket(host, port);
- }
-
- @Override
- public Socket createSocket(InetAddress address, int port) throws IOException {
- return delegate.createSocket(address, port);
- }
-
- @Override
- public Socket createSocket(String host, int port, InetAddress localAddress, int localPort)
- throws IOException, UnknownHostException {
- return delegate.createSocket(host, port, localAddress, localPort);
- }
-
- @Override
- public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
- throws IOException {
- return delegate.createSocket(address, port, localAddress, localPort);
- }
-}
-----
-
-The constructor uses the `ConfigProvider` to read the `ldap.trustStore` and `ldap.trustStorePassword` configuration properties, which could be specified in the `application.properties` file as follows:
-
-[source,properties]
-----
-ldap.trustStore=/path/to/truststore.jks
-ldap.trustStorePassword=secret
-----
-
-Finally, alter the `LdapServerProducer.createLdapServer()` method so that the `PROVIDER_URL` entry uses the `ldaps` protocol instead of `ldap`, and add the `CustomSSLSocketFactory` entry:
-
-[source,java]
-----
-public class LdapServerProducer {
-
- @Produces
- @Dependent
- @Named("ldapserver")
- public DirContext createLdapServer() throws Exception {
- Hashtable<String, String> env = new Hashtable<>();
- env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
- env.put(Context.PROVIDER_URL, "ldaps://" + InetAddress.getLocalHost().getCanonicalHostName() + ":10636");
- env.put(Context.SECURITY_AUTHENTICATION, "none");
- env.put("java.naming.ldap.factory.socket", CustomSSLSocketFactory.class.getName());
-
- return new InitialDirContext(env);
- }
-}
-----
-
[id="extensions-ldap-usage-using-ssl-in-native-mode"]
-==== Using SSL in Native Mode
+=== Using SSL in Native Mode
-When using a custom `SSLSocketFactory` in native mode, you need to register the class for reflection otherwise the class will not be made available on the classpath. Add the `@RegisterForReflection` annotation above the class definition, as follows:
+When using a custom `SSLSocketFactory` in native mode, such as the one in the xref:{cq-camel-components}::ldap-component.adoc#_configuring_ssl[Configuring SSL] section, you need to register the class for reflection otherwise the class will not be made available on the classpath. Add the `@RegisterForReflection` annotation above the class definition, as follows:
[source,java]
----
@RegisterForReflection
public class CustomSSLSocketFactory extends SSLSocketFactory {
- // The class definition is the same as above.
+ // The class definition is the same as in the above link.
}
----
diff --git a/extensions/ldap/runtime/src/main/doc/usage.adoc b/extensions/ldap/runtime/src/main/doc/usage.adoc
index ffbc96e7c5..dbb52638a8 100644
--- a/extensions/ldap/runtime/src/main/doc/usage.adoc
+++ b/extensions/ldap/runtime/src/main/doc/usage.adoc
@@ -1,139 +1,11 @@
-=== DirContext
+=== Using SSL in Native Mode
-The URI, `ldap:ldapserver`, references a bean with the ID `ldapserver`. A CDI producer method may be used to instantiate a `DirContext` object as follows:
-
-[source,java]
-----
-public class LdapServerProducer {
-
- @Produces
- @Dependent
- @Named("ldapserver")
- public DirContext createLdapServer() throws Exception {
- Hashtable<String, String> env = new Hashtable<>();
- env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
- env.put(Context.PROVIDER_URL, "ldap://localhost:10389");
- env.put(Context.SECURITY_AUTHENTICATION, "none");
-
- return new InitialDirContext(env);
- }
-}
-----
-
-The preceding example creates a regular Sun based LDAP `DirContext` that connects anonymously to a locally hosted LDAP server. The use of the `@Named` annotation binds the `DirContext` into the Camel registry automatically.
-
-=== Configuring SSL
-
-When connecting to an LDAP server over SSL/TLS, you may encounter situations where the default trust manager used by the JVM is unable to verify the certificate. This can happen, for example, when the server uses a self-signed certificate or when the certificate is issued by a non-trusted CA. In such cases, you may need to provide a custom trust manager implementation that can verify the server's certificate.
-
-The following code shows an implementation of a custom socket factory that can be used to create SSL/TLS sockets. The class name of the custom SSL socket factory is then specified in the `java.naming.ldap.factory.socket` property of the environment hashtable used to create the LDAP context.
-
-[source,java]
-----
-public class CustomSSLSocketFactory extends SSLSocketFactory {
-
- private SSLSocketFactory delegate;
-
- public CustomSSLSocketFactory() throws Exception {
- String trustStoreFilename = ConfigProvider.getConfig().getValue("ldap.trustStore", String.class);
- String trustStorePassword = ConfigProvider.getConfig().getValue("ldap.trustStorePassword", String.class);
- KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
- try (InputStream in = new FileInputStream(trustStoreFilename)) {
- keyStore.load(in, trustStorePassword.toCharArray());
- }
- TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
- tmf.init(keyStore);
- SSLContext ctx = SSLContext.getInstance("TLS");
- ctx.init(null, tmf.getTrustManagers(), null);
- delegate = ctx.getSocketFactory();
-
- }
-
- public static SocketFactory getDefault() {
- try {
- return new CustomSSLSocketFactory();
- } catch (Exception ex) {
- ex.printStackTrace();
- return null;
- }
- }
-
- @Override
- public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
- return delegate.createSocket(s, host, port, autoClose);
- }
-
- @Override
- public String[] getDefaultCipherSuites() {
- return delegate.getDefaultCipherSuites();
- }
-
- @Override
- public String[] getSupportedCipherSuites() {
- return delegate.getSupportedCipherSuites();
- }
-
- @Override
- public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
- return delegate.createSocket(host, port);
- }
-
- @Override
- public Socket createSocket(InetAddress address, int port) throws IOException {
- return delegate.createSocket(address, port);
- }
-
- @Override
- public Socket createSocket(String host, int port, InetAddress localAddress, int localPort)
- throws IOException, UnknownHostException {
- return delegate.createSocket(host, port, localAddress, localPort);
- }
-
- @Override
- public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
- throws IOException {
- return delegate.createSocket(address, port, localAddress, localPort);
- }
-}
-----
-
-The constructor uses the `ConfigProvider` to read the `ldap.trustStore` and `ldap.trustStorePassword` configuration properties, which could be specified in the `application.properties` file as follows:
-
-[source,properties]
-----
-ldap.trustStore=/path/to/truststore.jks
-ldap.trustStorePassword=secret
-----
-
-Finally, alter the `LdapServerProducer.createLdapServer()` method so that the `PROVIDER_URL` entry uses the `ldaps` protocol instead of `ldap`, and add the `CustomSSLSocketFactory` entry:
-
-[source,java]
-----
-public class LdapServerProducer {
-
- @Produces
- @Dependent
- @Named("ldapserver")
- public DirContext createLdapServer() throws Exception {
- Hashtable<String, String> env = new Hashtable<>();
- env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
- env.put(Context.PROVIDER_URL, "ldaps://" + InetAddress.getLocalHost().getCanonicalHostName() + ":10636");
- env.put(Context.SECURITY_AUTHENTICATION, "none");
- env.put("java.naming.ldap.factory.socket", CustomSSLSocketFactory.class.getName());
-
- return new InitialDirContext(env);
- }
-}
-----
-
-==== Using SSL in Native Mode
-
-When using a custom `SSLSocketFactory` in native mode, you need to register the class for reflection otherwise the class will not be made available on the classpath. Add the `@RegisterForReflection` annotation above the class definition, as follows:
+When using a custom `SSLSocketFactory` in native mode, such as the one in the xref:{cq-camel-components}::ldap-component.adoc#_configuring_ssl[Configuring SSL] section, you need to register the class for reflection otherwise the class will not be made available on the classpath. Add the `@RegisterForReflection` annotation above the class definition, as follows:
[source,java]
----
@RegisterForReflection
public class CustomSSLSocketFactory extends SSLSocketFactory {
- // The class definition is the same as above.
+ // The class definition is the same as in the above link.
}
----
diff --git a/integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java b/integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java
index 746524857b..73828a6c02 100644
--- a/integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java
+++ b/integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java
@@ -30,7 +30,9 @@ import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchResult;
import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.Dependent;
import jakarta.inject.Inject;
+import jakarta.inject.Named;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
@@ -50,6 +52,12 @@ public class LdapResource {
@Inject
CamelContext camelContext;
+ private String ldapHost;
+ private String ldapPort;
+ private boolean useSSL;
+ private String trustStoreFilename;
+ private String trustStorePassword;
+
/**
* Extracts the LDAP connection parameters passed from the test and creates a
* {@link javax.naming.directory.DirContext} from them.
@@ -62,43 +70,43 @@ public class LdapResource {
@POST
@Consumes(MediaType.APPLICATION_JSON)
public void configure(Map<String, String> options) throws Exception {
- String host = options.get("host");
- String port = options.get("port");
- boolean useSSL = Boolean.valueOf(options.get("ssl"));
- String trustStoreFilename = options.get("trustStore");
- String trustStorePassword = options.get("trustStorePassword");
-
- DirContext dirContext = createLdapContext(host, port, useSSL, trustStoreFilename, trustStorePassword);
- camelContext.getRegistry().bind("ldapserver", dirContext);
+ ldapHost = options.get("host");
+ ldapPort = options.get("port");
+ useSSL = Boolean.valueOf(options.get("ssl"));
+ trustStoreFilename = options.get("trustStore");
+ trustStorePassword = options.get("trustStorePassword");
}
@Path("/search")
@GET
@Produces(MediaType.APPLICATION_JSON)
- public Response search(@QueryParam("q") String filter) throws Exception {
- ProducerTemplate producer = camelContext.createProducerTemplate();
- List<SearchResult> results = producer.requestBody("direct:start", filter, List.class);
- return Response.ok(convertSearchResults(results)).build();
+ public Response search(@QueryParam("q") String q) throws Exception {
+ return Response.ok(searchByUid(q)).build();
}
@Path("/safeSearch")
@GET
@Produces(MediaType.APPLICATION_JSON)
- public Response safeSearch(@QueryParam("q") String unsafeFilter) throws Exception {
- String filter = String.format("(ou=%s)", LdapHelper.escapeFilter(unsafeFilter));
+ public Response safeSearch(@QueryParam("q") String q) throws Exception {
+ return Response.ok(searchByUid(LdapHelper.escapeFilter(q))).build();
+ }
+
+ @SuppressWarnings("unchecked")
+ private List<Map<String, String>> searchByUid(String uid) throws Exception {
+ String filter = String.format("(uid=%s)", uid);
ProducerTemplate producer = camelContext.createProducerTemplate();
List<SearchResult> results = producer.requestBody("direct:start", filter, List.class);
-
- return Response.ok(convertSearchResults(results)).build();
+ return convertSearchResults(results);
}
- private DirContext createLdapContext(String host, String port, boolean useSSL, String trustStoreFilename,
- String trustStorePassword)
- throws Exception {
+ @Produces
+ @Dependent
+ @Named("ldapserver")
+ public DirContext createLdapContext() throws Exception {
String scheme = useSSL ? "ldaps" : "ldap";
Hashtable<String, Object> env = new Hashtable<>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
- env.put(Context.PROVIDER_URL, String.format("%s://%s:%s", scheme, host, port));
+ env.put(Context.PROVIDER_URL, String.format("%s://%s:%s", scheme, ldapHost, ldapPort));
env.put(Context.SECURITY_AUTHENTICATION, "none");
if (useSSL) {
diff --git a/integration-tests/ldap/src/test/java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java b/integration-tests/ldap/src/test/java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java
index 672a437f82..962ec3b7c7 100644
--- a/integration-tests/ldap/src/test/java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java
+++ b/integration-tests/ldap/src/test/java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java
@@ -24,6 +24,7 @@ import java.nio.file.Paths;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
import com.unboundid.ldap.listener.InMemoryDirectoryServer;
import com.unboundid.ldap.listener.InMemoryDirectoryServerConfig;
@@ -110,7 +111,7 @@ class LdapTest {
TypeRef<List<Map<String, Object>>> typeRef = new TypeRef<>() {
};
List<Map<String, Object>> results = RestAssured.given()
- .queryParam("q", "(uid=tcruise)")
+ .queryParam("q", "tcruise")
.get("/ldap/search")
.then()
.statusCode(200)
@@ -132,14 +133,37 @@ class LdapTest {
TypeRef<List<Map<String, Object>>> typeRef = new TypeRef<>() {
};
+
+ // Verfiy that calling the unsafe endpoint with a wildcard returns multiple results.
List<Map<String, Object>> results = RestAssured.given()
.queryParam("q", "test*")
- .get("/ldap/safeSearch")
+ .get("/ldap/search")
.then()
.statusCode(200)
.extract().as(typeRef);
+ assertEquals(3, results.size());
+ assertEquals(List.of("test1", "test2", "testNoOU"),
+ results.stream().map(r -> r.get("uid")).collect(Collectors.toList()));
+ // Verify that the same query passed to the safeSearch returns no matching results.
+ results = RestAssured.given()
+ .queryParam("q", "test*")
+ .get("/ldap/safeSearch")
+ .then()
+ .statusCode(200)
+ .extract().as(typeRef);
assertEquals(0, results.size());
+
+ // Verify that non-escaped queries also work with escaped search
+ results = RestAssured.given()
+ .queryParam("q", "test1")
+ .get("/ldap/safeSearch")
+ .then()
+ .statusCode(200)
+ .extract().as(typeRef);
+ assertEquals(1, results.size());
+ assertEquals("test1", results.get(0).get("ou"));
+
}
/**
[camel-quarkus] 02/04: Update graalvm-docs-version in antora.yml
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 3.2.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit a742c99417d87294c341ba9078442fa1d7f4961b
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Sep 21 10:49:16 2023 +0100
Update graalvm-docs-version in antora.yml
---
docs/antora.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/antora.yml b/docs/antora.yml
index 3586c3c633..33afb4eae5 100644
--- a/docs/antora.yml
+++ b/docs/antora.yml
@@ -29,7 +29,7 @@ asciidoc:
camel-docs-version: 4.0.x # replace ${camel.docs.components.version}
quarkus-version: 3.2.6.Final # replace ${quarkus.version}
graalvm-version: 23.0.1 # replace ${graalvm.version}
- graalvm-docs-version: 22.3
+ graalvm-docs-version: jdk17
mapstruct-version: 1.5.5.Final # replace ${mapstruct.version}
min-maven-version: 3.8.2 # replace ${min-maven-version}
target-maven-version: 3.9.3 # replace ${target-maven-version}