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 df8eac5c17ef CAMEL-27165: camel-mongodb - connectionUriString is 
marked secret (#30337)
df8eac5c17ef is described below

commit df8eac5c17efde36dd37096980ab934d922332f3
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Nov 18 13:21:26 2026 +0100

    CAMEL-27165: camel-mongodb - connectionUriString is marked secret (#30337)
    
    The connection string can hold a password, as in
    mongodb://user:password@host/ or a MongoDB Atlas mongodb+srv:// string,
    so it is marked secret like the username and password options.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../resources/org/apache/camel/catalog/components/mongodb.json         | 2 +-
 .../org/apache/camel/component/mongodb/MongoDbEndpointUriFactory.java  | 3 ++-
 .../resources/META-INF/org/apache/camel/component/mongodb/mongodb.json | 2 +-
 .../main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java  | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json
index 117f654e930b..14621bc09bfc 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json
@@ -67,7 +67,7 @@
     "connectionBean": { "index": 0, "kind": "path", "displayName": "Connection 
Bean", "group": "common", "label": "", "required": true, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Sets the connection bean reference used to 
lookup a client for connecting to a database if neither the hosts nor the 
connectionUriString parameter is present." },
     "collection": { "index": 1, "kind": "parameter", "displayName": 
"Collection", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "endpointIdentity": true, "description": "Sets the name 
of the MongoDB collection to bind to this endpoint" },
     "collectionIndex": { "index": 2, "kind": "parameter", "displayName": 
"Collection Index", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "Sets the collection index (JSON FORMAT 
: { field1 : order1, field2 : order2})" },
-    "connectionUriString": { "index": 3, "kind": "parameter", "displayName": 
"Connection Uri String", "group": "common", "label": "common", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Set the whole Connection 
String\/Uri for mongodb endpoint. When set, the endpoint creates its client 
from it, instead of using the client of the component or the connectionBean." },
+    "connectionUriString": { "index": 3, "kind": "parameter", "displayName": 
"Connection Uri String", "group": "common", "label": "common", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "description": "Set 
the whole Connection String\/Uri for mongodb endpoint. When set, the endpoint 
creates its client from it, instead of using the client of the component or the 
connectionBean." },
     "createCollection": { "index": 4, "kind": "parameter", "displayName": 
"Create Collection", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Create the collection 
during initialisation if it doesn't exist. Default is true." },
     "database": { "index": 5, "kind": "parameter", "displayName": "Database", 
"group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "endpointIdentity": true, "description": "Sets the name of the 
MongoDB database to target" },
     "hosts": { "index": 6, "kind": "parameter", "displayName": "Hosts", 
"group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Host address of mongodb server in 
[host]:[port] format. It's possible to also use more than one address, as a 
comma separated list of hosts: [host1]:[port1],[host2]:[port2]. If this 
parameter is specified, the provided connectionBean is ignored." },
diff --git 
a/components/camel-mongodb/src/generated/java/org/apache/camel/component/mongodb/MongoDbEndpointUriFactory.java
 
b/components/camel-mongodb/src/generated/java/org/apache/camel/component/mongodb/MongoDbEndpointUriFactory.java
index 72115efe415c..3d5c61d31d27 100644
--- 
a/components/camel-mongodb/src/generated/java/org/apache/camel/component/mongodb/MongoDbEndpointUriFactory.java
+++ 
b/components/camel-mongodb/src/generated/java/org/apache/camel/component/mongodb/MongoDbEndpointUriFactory.java
@@ -85,7 +85,8 @@ public class MongoDbEndpointUriFactory extends 
org.apache.camel.support.componen
         props.add("writeResultAsHeader");
         props.add("zlibCompressionLevel");
         PROPERTY_NAMES = Collections.unmodifiableSet(props);
-        Set<String> secretProps = new HashSet<>(2);
+        Set<String> secretProps = new HashSet<>(3);
+        secretProps.add("connectionUriString");
         secretProps.add("password");
         secretProps.add("username");
         SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
diff --git 
a/components/camel-mongodb/src/generated/resources/META-INF/org/apache/camel/component/mongodb/mongodb.json
 
b/components/camel-mongodb/src/generated/resources/META-INF/org/apache/camel/component/mongodb/mongodb.json
index 117f654e930b..14621bc09bfc 100644
--- 
a/components/camel-mongodb/src/generated/resources/META-INF/org/apache/camel/component/mongodb/mongodb.json
+++ 
b/components/camel-mongodb/src/generated/resources/META-INF/org/apache/camel/component/mongodb/mongodb.json
@@ -67,7 +67,7 @@
     "connectionBean": { "index": 0, "kind": "path", "displayName": "Connection 
Bean", "group": "common", "label": "", "required": true, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Sets the connection bean reference used to 
lookup a client for connecting to a database if neither the hosts nor the 
connectionUriString parameter is present." },
     "collection": { "index": 1, "kind": "parameter", "displayName": 
"Collection", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "endpointIdentity": true, "description": "Sets the name 
of the MongoDB collection to bind to this endpoint" },
     "collectionIndex": { "index": 2, "kind": "parameter", "displayName": 
"Collection Index", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "Sets the collection index (JSON FORMAT 
: { field1 : order1, field2 : order2})" },
-    "connectionUriString": { "index": 3, "kind": "parameter", "displayName": 
"Connection Uri String", "group": "common", "label": "common", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Set the whole Connection 
String\/Uri for mongodb endpoint. When set, the endpoint creates its client 
from it, instead of using the client of the component or the connectionBean." },
+    "connectionUriString": { "index": 3, "kind": "parameter", "displayName": 
"Connection Uri String", "group": "common", "label": "common", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "description": "Set 
the whole Connection String\/Uri for mongodb endpoint. When set, the endpoint 
creates its client from it, instead of using the client of the component or the 
connectionBean." },
     "createCollection": { "index": 4, "kind": "parameter", "displayName": 
"Create Collection", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Create the collection 
during initialisation if it doesn't exist. Default is true." },
     "database": { "index": 5, "kind": "parameter", "displayName": "Database", 
"group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "endpointIdentity": true, "description": "Sets the name of the 
MongoDB database to target" },
     "hosts": { "index": 6, "kind": "parameter", "displayName": "Hosts", 
"group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Host address of mongodb server in 
[host]:[port] format. It's possible to also use more than one address, as a 
comma separated list of hosts: [host1]:[port1],[host2]:[port2]. If this 
parameter is specified, the provided connectionBean is ignored." },
diff --git 
a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
 
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
index 13e5f136ed08..52f599ed3b4c 100644
--- 
a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
+++ 
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
@@ -258,7 +258,7 @@ public class MongoDbEndpoint extends DefaultEndpoint 
implements EndpointServiceL
     private String changeStreamToken;
     @UriParam(description = "Set the whole Connection String/Uri for mongodb 
endpoint. When set, the endpoint creates"
                             + " its client from it, instead of using the 
client of the component or the connectionBean.",
-              label = "common")
+              label = "common", security = "secret")
     private String connectionUriString;
 
     // tailable cursor consumer by default

Reply via email to