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 8159674bb66f CAMEL-23832: camel-ldif - improve the component and
option descriptions (#30932)
8159674bb66f is described below
commit 8159674bb66f55094d666133319bb9d3f2047172
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Nov 27 13:41:53 2026 +0100
CAMEL-23832: camel-ldif - improve the component and option descriptions
(#30932)
This commit rewrites the component description and the texts of the 2
endpoint options of ldif (the component has no
headers). The ldapConnectionName text now says that the producer looks the
LdapConnection bean up for each message,
binds it when it is not authenticated and closes it after the message, and
why the bean should be a prototype. The
allowUrlBody text says what the producer does with a body that does not
start with version: 1, in both cases.
Documentation only, no behavior change. The component JSON, the catalog
copy, the doc page header and the DSL are
regenerated. camel-ldif is marked as done in
tasks/component-descriptions.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
.../org/apache/camel/catalog/components/ldif.json | 6 +--
.../apache/camel/catalog/docs/ldif-component.adoc | 2 +-
.../org/apache/camel/component/ldif/ldif.json | 6 +--
.../camel-ldif/src/main/docs/ldif-component.adoc | 2 +-
.../apache/camel/component/ldif/LdifEndpoint.java | 24 +++++------
.../component/ComponentsBuilderFactory.java | 2 +-
.../component/dsl/LdifComponentBuilderFactory.java | 4 +-
.../builder/endpoint/StaticEndpointBuilders.java | 24 +++++------
.../endpoint/dsl/LdifEndpointBuilderFactory.java | 48 +++++++++++-----------
tasks/component-descriptions.md | 2 +-
10 files changed, 57 insertions(+), 63 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ldif.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ldif.json
index 49b888277411..27c30c937f4d 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ldif.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/ldif.json
@@ -3,7 +3,7 @@
"kind": "component",
"name": "ldif",
"title": "LDIF",
- "description": "Perform updates on an LDAP server from an LDIF body
content.",
+ "description": "Apply the changes of an LDIF message body to an LDAP
server.",
"deprecated": false,
"firstVersion": "2.20.0",
"label": "database,security",
@@ -32,8 +32,8 @@
"producerOut": { "carriers": [ "list", "text" ], "description": "A List of
one status String per LDIF entry: success, or the LDAP result code, the DN and
the message from the server, such as entryAlreadyExists (68) on
uid=a,dc=example,dc=org. No body or an empty body gives an empty String" }
},
"properties": {
- "ldapConnectionName": { "index": 0, "kind": "path", "displayName": "Ldap
Connection Name", "group": "producer", "label": "", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The name of the LdapConnection bean to
pull from the registry. Note that this must be of scope prototype to avoid it
being shared among threads or using a connection that has timed out. The
connection is closed after each [...]
+ "ldapConnectionName": { "index": 0, "kind": "path", "displayName": "Ldap
Connection Name", "group": "producer", "label": "", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The name of the
org.apache.directory.ldap.client.api.LdapConnection bean in the registry. The
producer looks it up for each message, binds it with its configured name and
credentials when it is not authenticated, and clos [...]
"lazyStartProducer": { "index": 1, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produc [...]
- "allowUrlBody": { "index": 2, "kind": "parameter", "displayName": "Allow
Url Body", "group": "security", "label": "security", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "security": "insecure:dev", "defaultValue": false,
"description": "Whether to allow a message body that is not LDIF content to be
dereferenced as a URL and fetched. When disabled (default), a body that does
not start with version: 1 is rejecte [...]
+ "allowUrlBody": { "index": 2, "kind": "parameter", "displayName": "Allow
Url Body", "group": "security", "label": "security", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "security": "insecure:dev", "defaultValue": false,
"description": "Whether the producer reads a message body that does not start
with version: 1 as the URL of an LDIF file, and applies the LDIF content that
it fetches from that URL. If false, [...]
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/ldif-component.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/ldif-component.adoc
index c18b66fe06f5..8d01872d306a 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/ldif-component.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/ldif-component.adoc
@@ -2,7 +2,7 @@
:doctitle: LDIF
:shortname: ldif
:artifactid: camel-ldif
-:description: Perform updates on an LDAP server from an LDIF body content.
+:description: Apply the changes of an LDIF message body to an LDAP server.
:since: 2.20
:supportlevel: Stable
:tabs-sync-option:
diff --git
a/components/camel-ldif/src/generated/resources/META-INF/org/apache/camel/component/ldif/ldif.json
b/components/camel-ldif/src/generated/resources/META-INF/org/apache/camel/component/ldif/ldif.json
index 49b888277411..27c30c937f4d 100644
---
a/components/camel-ldif/src/generated/resources/META-INF/org/apache/camel/component/ldif/ldif.json
+++
b/components/camel-ldif/src/generated/resources/META-INF/org/apache/camel/component/ldif/ldif.json
@@ -3,7 +3,7 @@
"kind": "component",
"name": "ldif",
"title": "LDIF",
- "description": "Perform updates on an LDAP server from an LDIF body
content.",
+ "description": "Apply the changes of an LDIF message body to an LDAP
server.",
"deprecated": false,
"firstVersion": "2.20.0",
"label": "database,security",
@@ -32,8 +32,8 @@
"producerOut": { "carriers": [ "list", "text" ], "description": "A List of
one status String per LDIF entry: success, or the LDAP result code, the DN and
the message from the server, such as entryAlreadyExists (68) on
uid=a,dc=example,dc=org. No body or an empty body gives an empty String" }
},
"properties": {
- "ldapConnectionName": { "index": 0, "kind": "path", "displayName": "Ldap
Connection Name", "group": "producer", "label": "", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The name of the LdapConnection bean to
pull from the registry. Note that this must be of scope prototype to avoid it
being shared among threads or using a connection that has timed out. The
connection is closed after each [...]
+ "ldapConnectionName": { "index": 0, "kind": "path", "displayName": "Ldap
Connection Name", "group": "producer", "label": "", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": false, "description": "The name of the
org.apache.directory.ldap.client.api.LdapConnection bean in the registry. The
producer looks it up for each message, binds it with its configured name and
credentials when it is not authenticated, and clos [...]
"lazyStartProducer": { "index": 1, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produc [...]
- "allowUrlBody": { "index": 2, "kind": "parameter", "displayName": "Allow
Url Body", "group": "security", "label": "security", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "security": "insecure:dev", "defaultValue": false,
"description": "Whether to allow a message body that is not LDIF content to be
dereferenced as a URL and fetched. When disabled (default), a body that does
not start with version: 1 is rejecte [...]
+ "allowUrlBody": { "index": 2, "kind": "parameter", "displayName": "Allow
Url Body", "group": "security", "label": "security", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "security": "insecure:dev", "defaultValue": false,
"description": "Whether the producer reads a message body that does not start
with version: 1 as the URL of an LDIF file, and applies the LDIF content that
it fetches from that URL. If false, [...]
}
}
diff --git a/components/camel-ldif/src/main/docs/ldif-component.adoc
b/components/camel-ldif/src/main/docs/ldif-component.adoc
index c18b66fe06f5..8d01872d306a 100644
--- a/components/camel-ldif/src/main/docs/ldif-component.adoc
+++ b/components/camel-ldif/src/main/docs/ldif-component.adoc
@@ -2,7 +2,7 @@
:doctitle: LDIF
:shortname: ldif
:artifactid: camel-ldif
-:description: Perform updates on an LDAP server from an LDIF body content.
+:description: Apply the changes of an LDIF message body to an LDAP server.
:since: 2.20
:supportlevel: Stable
:tabs-sync-option:
diff --git
a/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
b/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
index 99fcf44b71a9..f166cfcae07a 100644
---
a/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
+++
b/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
@@ -30,7 +30,7 @@ import org.apache.camel.spi.UriPath;
import org.apache.camel.support.DefaultEndpoint;
/**
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*/
@UriEndpoint(firstVersion = "2.20.0", scheme = "ldif", title = "LDIF", syntax
= "ldif:ldapConnectionName", producerOnly = true,
category = { Category.DATABASE, Category.SECURITY })
@@ -43,10 +43,17 @@ import org.apache.camel.support.DefaultEndpoint;
+ " the DN and the message
from the server, such as entryAlreadyExists (68) on"
+ " uid=a,dc=example,dc=org.
No body or an empty body gives an empty String"))
public class LdifEndpoint extends DefaultEndpoint {
- @UriPath
+ @UriPath(description = "The name of the
org.apache.directory.ldap.client.api.LdapConnection bean in the registry. The"
+ + " producer looks it up for each message, binds it
with its configured name and credentials"
+ + " when it is not authenticated, and closes it
after the message. Use a bean of scope prototype,"
+ + " so that concurrent messages do not share a
connection.")
@Metadata(required = true)
private String ldapConnectionName;
- @UriParam(label = "security", defaultValue = "false", security =
"insecure:dev")
+ @UriParam(description = "Whether the producer reads a message body that
does not start with version: 1 as the URL of an"
+ + " LDIF file, and applies the LDIF content that
it fetches from that URL. If false, such a body"
+ + " fails with an IllegalArgumentException. Enable
it only for a trusted body, as the producer"
+ + " fetches any URL that the body names (SSRF).",
+ label = "security", defaultValue = "false", security =
"insecure:dev")
private boolean allowUrlBody;
protected LdifEndpoint(String endpointUri, String remaining, LdifComponent
component) {
@@ -68,11 +75,6 @@ public class LdifEndpoint extends DefaultEndpoint {
return ldapConnectionName;
}
- /**
- * The name of the LdapConnection bean to pull from the registry. Note
that this must be of scope "prototype" to
- * avoid it being shared among threads or using a connection that has
timed out. The connection is closed after each
- * message, and bound again with its configured name and credentials when
it is used for the next message.
- */
public void setLdapConnectionName(String ldapConnectionName) {
this.ldapConnectionName = ldapConnectionName;
}
@@ -81,12 +83,6 @@ public class LdifEndpoint extends DefaultEndpoint {
return allowUrlBody;
}
- /**
- * Whether to allow a message body that is not LDIF content to be
dereferenced as a URL and fetched. When disabled
- * (default), a body that does not start with <tt>version: 1</tt> is
rejected with an
- * {@link IllegalArgumentException} instead of being fetched as a URL,
which avoids a content-sniffed URL fetch
- * (SSRF) from untrusted body content.
- */
public void setAllowUrlBody(boolean allowUrlBody) {
this.allowUrlBody = allowUrlBody;
}
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index 244284353677..d8bc11cbf01d 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -3523,7 +3523,7 @@ public interface ComponentsBuilderFactory {
}
/**
* LDIF (camel-ldif)
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*
* Category: database,security
* Since: 2.20
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LdifComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LdifComponentBuilderFactory.java
index a9655c479987..dbb194db6e8d 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LdifComponentBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LdifComponentBuilderFactory.java
@@ -24,7 +24,7 @@ import org.apache.camel.builder.component.ComponentBuilder;
import org.apache.camel.component.ldif.LdifComponent;
/**
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*
* Generated by camel build tools - do NOT edit this file!
*/
@@ -33,7 +33,7 @@ public interface LdifComponentBuilderFactory {
/**
* LDIF (camel-ldif)
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*
* Category: database,security
* Since: 2.20
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index d99076c7ebed..ae1c2f59a5b4 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -11682,7 +11682,7 @@ public class StaticEndpointBuilders {
}
/**
* LDIF (camel-ldif)
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*
* Category: database,security
* Since: 2.20
@@ -11691,11 +11691,11 @@ public class StaticEndpointBuilders {
* Syntax: <code>ldif:ldapConnectionName</code>
*
* Path parameter: ldapConnectionName (required)
- * The name of the LdapConnection bean to pull from the registry. Note that
- * this must be of scope prototype to avoid it being shared among threads
or
- * using a connection that has timed out. The connection is closed after
- * each message, and bound again with its configured name and credentials
- * when it is used for the next message.
+ * The name of the org.apache.directory.ldap.client.api.LdapConnection bean
+ * in the registry. The producer looks it up for each message, binds it
with
+ * its configured name and credentials when it is not authenticated, and
+ * closes it after the message. Use a bean of scope prototype, so that
+ * concurrent messages do not share a connection.
*
* @param path ldapConnectionName
* @return the dsl builder
@@ -11705,7 +11705,7 @@ public class StaticEndpointBuilders {
}
/**
* LDIF (camel-ldif)
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*
* Category: database,security
* Since: 2.20
@@ -11714,11 +11714,11 @@ public class StaticEndpointBuilders {
* Syntax: <code>ldif:ldapConnectionName</code>
*
* Path parameter: ldapConnectionName (required)
- * The name of the LdapConnection bean to pull from the registry. Note that
- * this must be of scope prototype to avoid it being shared among threads
or
- * using a connection that has timed out. The connection is closed after
- * each message, and bound again with its configured name and credentials
- * when it is used for the next message.
+ * The name of the org.apache.directory.ldap.client.api.LdapConnection bean
+ * in the registry. The producer looks it up for each message, binds it
with
+ * its configured name and credentials when it is not authenticated, and
+ * closes it after the message. Use a bean of scope prototype, so that
+ * concurrent messages do not share a connection.
*
* @param componentName to use a custom component name for the endpoint
* instead of the default name
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LdifEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LdifEndpointBuilderFactory.java
index 6e1df2e771e4..8dbcf12affa8 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LdifEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LdifEndpointBuilderFactory.java
@@ -27,7 +27,7 @@ import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
/**
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*
* Generated by camel build tools - do NOT edit this file!
*/
@@ -45,12 +45,11 @@ public interface LdifEndpointBuilderFactory {
}
/**
- * Whether to allow a message body that is not LDIF content to be
- * dereferenced as a URL and fetched. When disabled (default), a body
- * that does not start with version: 1 is rejected with an
- * IllegalArgumentException instead of being fetched as a URL, which
- * avoids a content-sniffed URL fetch (SSRF) from untrusted body
- * content.
+ * Whether the producer reads a message body that does not start with
+ * version: 1 as the URL of an LDIF file, and applies the LDIF content
+ * that it fetches from that URL. If false, such a body fails with an
+ * IllegalArgumentException. Enable it only for a trusted body, as the
+ * producer fetches any URL that the body names (SSRF).
*
* The option is a: <code>boolean</code> type.
*
@@ -65,12 +64,11 @@ public interface LdifEndpointBuilderFactory {
return this;
}
/**
- * Whether to allow a message body that is not LDIF content to be
- * dereferenced as a URL and fetched. When disabled (default), a body
- * that does not start with version: 1 is rejected with an
- * IllegalArgumentException instead of being fetched as a URL, which
- * avoids a content-sniffed URL fetch (SSRF) from untrusted body
- * content.
+ * Whether the producer reads a message body that does not start with
+ * version: 1 as the URL of an LDIF file, and applies the LDIF content
+ * that it fetches from that URL. If false, such a body fails with an
+ * IllegalArgumentException. Enable it only for a trusted body, as the
+ * producer fetches any URL that the body names (SSRF).
*
* The option will be converted to a <code>boolean</code> type.
*
@@ -147,7 +145,7 @@ public interface LdifEndpointBuilderFactory {
public interface LdifBuilders {
/**
* LDIF (camel-ldif)
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*
* Category: database,security
* Since: 2.20
@@ -156,11 +154,11 @@ public interface LdifEndpointBuilderFactory {
* Syntax: <code>ldif:ldapConnectionName</code>
*
* Path parameter: ldapConnectionName (required)
- * The name of the LdapConnection bean to pull from the registry. Note
- * that this must be of scope prototype to avoid it being shared among
- * threads or using a connection that has timed out. The connection is
- * closed after each message, and bound again with its configured name
- * and credentials when it is used for the next message.
+ * The name of the org.apache.directory.ldap.client.api.LdapConnection
+ * bean in the registry. The producer looks it up for each message,
+ * binds it with its configured name and credentials when it is not
+ * authenticated, and closes it after the message. Use a bean of scope
+ * prototype, so that concurrent messages do not share a connection.
*
* @param path ldapConnectionName
* @return the dsl builder
@@ -170,7 +168,7 @@ public interface LdifEndpointBuilderFactory {
}
/**
* LDIF (camel-ldif)
- * Perform updates on an LDAP server from an LDIF body content.
+ * Apply the changes of an LDIF message body to an LDAP server.
*
* Category: database,security
* Since: 2.20
@@ -179,11 +177,11 @@ public interface LdifEndpointBuilderFactory {
* Syntax: <code>ldif:ldapConnectionName</code>
*
* Path parameter: ldapConnectionName (required)
- * The name of the LdapConnection bean to pull from the registry. Note
- * that this must be of scope prototype to avoid it being shared among
- * threads or using a connection that has timed out. The connection is
- * closed after each message, and bound again with its configured name
- * and credentials when it is used for the next message.
+ * The name of the org.apache.directory.ldap.client.api.LdapConnection
+ * bean in the registry. The producer looks it up for each message,
+ * binds it with its configured name and credentials when it is not
+ * authenticated, and closes it after the message. Use a bean of scope
+ * prototype, so that concurrent messages do not share a connection.
*
* @param componentName to use a custom component name for the endpoint
* instead of the default name
diff --git a/tasks/component-descriptions.md b/tasks/component-descriptions.md
index be9cc796c3ea..06763a59af33 100644
--- a/tasks/component-descriptions.md
+++ b/tasks/component-descriptions.md
@@ -260,7 +260,7 @@ or removes its row.
| camel-langchain4j-web-search | langchain4j-web-search | |
| camel-language | language | |
| camel-ldap | ldap | |
-| camel-ldif | ldif | |
+| camel-ldif | ldif | yes |
| camel-log | log | |
| camel-lucene | lucene | |
| camel-lumberjack | lumberjack | |