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 950ed15bf7eb CAMEL-27223: camel-jbang - camel get endpoint and the
other listings mask the passwords in endpoint URIs (#30366)
950ed15bf7eb is described below
commit 950ed15bf7eb410b25a4760091bd3152e26ff206
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 19 13:02:21 2026 +0100
CAMEL-27223: camel-jbang - camel get endpoint and the other listings mask
the passwords in endpoint URIs (#30366)
camel get endpoint, consumer, producer, route, processor, service, kafka,
timeline, sql-trace, camel top route/processor and camel status show the
endpoint URIs the way Camel logs them: the values of sensitive options and
the
password in the user info are shown as xxxxxx, in the table and in the
--json
output. The new --mask option (default true) can be set to false to see the
URIs as configured.
The dev consoles keep the URIs as configured, as the tools use them to send
to,
browse and match endpoints.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc | 9 +++
.../jbang-commands/camel-jbang-get-consumer.adoc | 1 +
.../jbang-commands/camel-jbang-get-endpoint.adoc | 1 +
.../jbang-commands/camel-jbang-get-kafka.adoc | 1 +
.../jbang-commands/camel-jbang-get-processor.adoc | 1 +
.../jbang-commands/camel-jbang-get-producer.adoc | 1 +
.../jbang-commands/camel-jbang-get-route.adoc | 1 +
.../jbang-commands/camel-jbang-get-service.adoc | 1 +
.../jbang-commands/camel-jbang-get-sql-trace.adoc | 1 +
.../jbang-commands/camel-jbang-get-timeline.adoc | 1 +
.../pages/jbang-commands/camel-jbang-status.adoc | 1 +
.../jbang-commands/camel-jbang-top-processor.adoc | 1 +
.../jbang-commands/camel-jbang-top-route.adoc | 1 +
.../META-INF/camel-jbang-commands-metadata.json | 6 +-
.../commands/process/CamelProcessorStatus.java | 6 +-
.../core/commands/process/CamelRouteStatus.java | 6 +-
.../core/commands/process/IntegrationStatus.java | 17 +++--
.../jbang/core/commands/process/ListConsumer.java | 6 +-
.../jbang/core/commands/process/ListEndpoint.java | 7 +-
.../dsl/jbang/core/commands/process/ListKafka.java | 6 +-
.../jbang/core/commands/process/ListProducer.java | 6 +-
.../jbang/core/commands/process/ListService.java | 9 ++-
.../jbang/core/commands/process/ListSqlTrace.java | 7 +-
.../jbang/core/commands/process/ListTimeline.java | 13 ++--
.../camel/dsl/jbang/core/common/ListingFormat.java | 14 ++++
.../commands/process/CamelRouteStatusTest.java | 23 +++++++
.../commands/process/IntegrationStatusTest.java | 34 ++++++++++
.../core/commands/process/ListConsumerTest.java | 27 ++++++++
.../core/commands/process/ListEndpointTest.java | 73 ++++++++++++++++++++
.../core/commands/process/ListProducerTest.java | 25 +++++++
.../core/commands/process/ListServiceTest.java | 28 ++++++++
.../dsl/jbang/core/common/ListingFormatTest.java | 19 ++++++
.../src/test/resources/golden/cli-help.txt | 79 ++++++++++++++++++----
33 files changed, 396 insertions(+), 36 deletions(-)
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
index 174ac67456da..f1f516359024 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
@@ -2228,6 +2228,15 @@ a route id) waited for the timeout. Now both go to the
integration that runs. Wi
command exits with `3` and says what to give. A send without an endpoint to an
integration without routes is now
an error, rather than reported as sent.
+=== camel-jbang - camel get endpoint and the other listings mask the passwords
in endpoint URIs
+
+`camel get endpoint`, `camel get consumer`, `camel get producer`, `camel get
route`, `camel get processor`,
+`camel get service`, `camel get kafka`, `camel get timeline`, `camel get
sql-trace`, `camel top route`,
+`camel top processor` and `camel status` now show the endpoint URIs the way
Camel logs them: the values of options
+such as `password`, `secretKey`, `authenticationToken` or `keyStorePassword`,
and the password in the user info, are
+shown as `xxxxxx`. This applies to the table and to the `--json` output. To
see the URIs as configured, use
+`--mask=false`.
+
=== camel-aws2-kinesis - each endpoint uses its own client
Each `aws2-kinesis` endpoint now uses the Kinesis client of its own
configuration (`region`, credentials,
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-consumer.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-consumer.adoc
index 31f1d4a21067..69beff202b3c 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-consumer.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-consumer.adoc
@@ -23,6 +23,7 @@ camel get consumer [options]
| `--filter` | Filter consumers by URI | | String
| `--json` | Output in JSON Format | | boolean
| `--limit` | Filter consumers by limiting to the given number of rows | | int
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--scheduled` | Filter consumer to only show scheduled based consumers | |
boolean
| `--short-uri` | List endpoint URI without query parameters (short) | |
boolean
| `--sort` | Sort by pid, name or age | pid | String
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-endpoint.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-endpoint.adoc
index 47f03a2a4353..f0aa45843eee 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-endpoint.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-endpoint.adoc
@@ -25,6 +25,7 @@ camel get endpoint [options]
| `--filter-total` | Filter endpoints that must be higher than the given usage
| | long
| `--json` | Output in JSON Format | | boolean
| `--limit` | Filter endpoints by limiting to the given number of rows | | int
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--short-uri` | List endpoint URI without query parameters (short) | |
boolean
| `--sort` | Sort by pid, name, age, total, or size | pid | String
| `--verbose` | Show additional size statistics (min/max body and headers) |
| boolean
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-kafka.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-kafka.adoc
index 28c2a577f380..b985ca8dce4f 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-kafka.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-kafka.adoc
@@ -22,6 +22,7 @@ camel get kafka [options]
| `--committed` | Show committed offset (slower due to sync call to Kafka
brokers) | | boolean
| `--duration` | How long to keep watching or following, in millis or as a
duration such as 30s (default: until Enter is pressed) | | long
| `--json` | Output in JSON Format | | boolean
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--short-uri` | List endpoint URI without query parameters (short) | |
boolean
| `--sort` | Sort by pid, name or age | pid | String
| `--watch` | Execute periodically and showing output fullscreen | | boolean
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-processor.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-processor.adoc
index 9789fe50aae7..f840ff0711c1 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-processor.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-processor.adoc
@@ -26,6 +26,7 @@ camel get processor [options]
| `--group` | Filter processors by group | | String[]
| `--json` | Output in JSON Format | | boolean
| `--limit` | Filter routes by limiting to the given number of rows | | int
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--note` | Include note in the ID column (if available) | | boolean
| `--remote` | Break down counters into remote/total pairs | | boolean
| `--running` | Only include running processors | | boolean
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-producer.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-producer.adoc
index 46520fd71e47..63e7da9799f1 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-producer.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-producer.adoc
@@ -23,6 +23,7 @@ camel get producer [options]
| `--filter` | Filter producers by URI | | String
| `--json` | Output in JSON Format | | boolean
| `--limit` | Filter producers by limiting to the given number of rows | | int
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--short-uri` | List endpoint URI without query parameters (short) | |
boolean
| `--sort` | Sort by pid, name or age | pid | String
| `--watch` | Execute periodically and showing output fullscreen | | boolean
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-route.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-route.adoc
index 7fe54bf928e7..fb31b1ec1aaa 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-route.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-route.adoc
@@ -28,6 +28,7 @@ camel get route [options]
| `--group` | Filter routes by group | | String[]
| `--json` | Output in JSON Format | | boolean
| `--limit` | Filter routes by limiting to the given number of rows | | int
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--note` | Include note in the ID column (if available) | | boolean
| `--remote` | Break down counters into remote/total pairs | | boolean
| `--running` | Only include running routes | | boolean
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-service.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-service.adoc
index 736b66fde5a1..255e89692205 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-service.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-service.adoc
@@ -21,6 +21,7 @@ camel get service [options]
| Option | Description | Default | Type
| `--duration` | How long to keep watching or following, in millis or as a
duration such as 30s (default: until Enter is pressed) | | long
| `--json` | Output in JSON Format | | boolean
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--metadata` | Show service metadata (only available for some services) | |
boolean
| `--short-uri` | List endpoint URI without query parameters (short) | |
boolean
| `--sort` | Sort by pid, name or age | pid | String
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-sql-trace.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-sql-trace.adoc
index dc9dd7f16a29..c2b3c97759db 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-sql-trace.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-sql-trace.adoc
@@ -21,6 +21,7 @@ camel get sql-trace [options]
| Option | Description | Default | Type
| `--duration` | How long to keep watching or following, in millis or as a
duration such as 30s (default: until Enter is pressed) | | long
| `--json` | Output in JSON Format | | boolean
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--sort` | Sort by pid, name or age | pid | String
| `--watch` | Execute periodically and showing output fullscreen | | boolean
| `-h,--help` | Display this help and exit | | boolean
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-timeline.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-timeline.adoc
index bb32937ebfae..054ccd917e24 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-timeline.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-get-timeline.adoc
@@ -25,6 +25,7 @@ camel get timeline [options]
| `--filter` | Filter by route ID (pattern) | | String
| `--json` | Output in JSON Format | | boolean
| `--limit` | Filter the exchanges by limiting to the given number of rows |
| int
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--seconds` | The number of seconds to show, up to the seconds the
integration records | 60 | int
| `--short-uri` | List endpoint URI without query parameters (short) | |
boolean
| `--sort` | Sort the exchanges by pid, name, age, elapsed (the slowest
first), or since (the newest first) | since | String
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-status.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-status.adoc
index af8ffaca0861..5f921ac2112c 100644
--- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-status.adoc
+++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-status.adoc
@@ -22,6 +22,7 @@ camel status [options]
| `--errors` | How many of the last errors to show | 5 | int
| `--json` | Output in JSON Format: one document, with the routes as camel get
route has them, and the log records newest first | | boolean
| `--log-lines` | How many of the last log records to show | 20 | int
+| `--mask` | Whether to mask the endpoint URIs of the routes to avoid printing
sensitive information such as password or access keys | true | boolean
| `-h,--help` | Display this help and exit | | boolean
|===
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-top-processor.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-top-processor.adoc
index efb2fc6dd932..bb137cfedaa9 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-top-processor.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-top-processor.adoc
@@ -26,6 +26,7 @@ camel top processor [options]
| `--group` | Filter processors by group | | String[]
| `--json` | Output in JSON Format | | boolean
| `--limit` | Filter routes by limiting to the given number of rows | | int
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--note` | Include note in the ID column (if available) | | boolean
| `--remote` | Break down counters into remote/total pairs | | boolean
| `--running` | Only include running processors | | boolean
diff --git
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-top-route.adoc
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-top-route.adoc
index b1e0c6b66791..a9c6f4410e96 100644
---
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-top-route.adoc
+++
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-top-route.adoc
@@ -28,6 +28,7 @@ camel top route [options]
| `--group` | Filter routes by group | | String[]
| `--json` | Output in JSON Format | | boolean
| `--limit` | Filter routes by limiting to the given number of rows | | int
+| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive
information such as password or access keys | true | boolean
| `--note` | Include note in the ID column (if available) | | boolean
| `--remote` | Break down counters into remote/total pairs | | boolean
| `--running` | Only include running routes | | boolean
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
b/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
index d815861b96bb..048cdace21fb 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
+++
b/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json
@@ -14,7 +14,7 @@
{ "name": "eval", "fullName": "eval", "description": "Evaluate Camel
expressions and scripts", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.EvalCommand", "options": [ { "names":
"-h,--help", "description": "Display this help and exit", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "expression",
"fullName": "eval expression", "description": "Evaluates Camel expression",
"sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.EvalExpressio
[...]
{ "name": "explain", "fullName": "explain", "description": "Explain what a
Camel route does using AI\/LLM", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Explain", "options": [ { "names":
"--api-key", "description": "API key for authentication. Also reads
ANTHROPIC_API_KEY, OPENAI_API_KEY, WATSONX_APIKEY, or LLM_API_KEY env vars",
"javaType": "java.lang.String", "type": "string" }, { "names": "--api-type",
"description": "API type: 'ollama', 'openai' (OpenAI-compatible), ' [...]
{ "name": "export", "fullName": "export", "description": "Export to other
runtimes (Camel Main, Spring Boot, or Quarkus)", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Export", "options": [ { "names":
"--build-property", "description": "Maven build properties, ex.
--build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, {
"names": "--camel-spring-boot-version", "description": "Camel version to use
with Spring Boot", "javaType": "java.lang.String", "ty [...]
- { "name": "get", "fullName": "get", "description": "Get status of Camel
integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.CamelStatus", "options": [ {
"names": "--watch", "description": "Execute periodically and showing output
fullscreen", "javaType": "boolean", "type": "boolean" }, { "names":
"-h,--help", "description": "Display this help and exit", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "about",
"fullName": "get about" [...]
+ { "name": "get", "fullName": "get", "description": "Get status of Camel
integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.CamelStatus", "options": [ {
"names": "--watch", "description": "Execute periodically and showing output
fullscreen", "javaType": "boolean", "type": "boolean" }, { "names":
"-h,--help", "description": "Display this help and exit", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "about",
"fullName": "get about" [...]
{ "name": "harden", "fullName": "harden", "description": "Suggest security
hardening for Camel routes using AI\/LLM", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Harden", "options": [ { "names":
"--api-key", "description": "API key for authentication. Also reads
OPENAI_API_KEY or LLM_API_KEY env vars", "javaType": "java.lang.String",
"type": "string" }, { "names": "--api-type", "description": "API type: 'ollama'
or 'openai' (OpenAI-compatible)", "defaultValue": "ollama", [...]
{ "name": "hawtio", "fullName": "hawtio", "description": "Launch Hawtio
web console", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.Hawtio", "options": [ {
"names": "--host", "description": "Hostname to bind the Hawtio web console to",
"defaultValue": "127.0.0.1", "javaType": "java.lang.String", "type": "string"
}, { "names": "--open-url,--openUrl", "description": "To automatic open Hawtio
web console in the web browser (without an interactive terminal the default
[...]
{ "name": "infra", "fullName": "infra", "description": "List and Run
external services for testing and prototyping", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.infra.InfraCommand", "options": [ {
"names": "--json", "description": "Output in JSON Format", "javaType":
"boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display
this help and exit", "javaType": "boolean", "type": "boolean" } ],
"subcommands": [ { "name": "get", "fullName": "infra get", " [...]
@@ -31,9 +31,9 @@
{ "name": "script", "fullName": "script", "description": "Run Camel
integration as shell script for terminal scripting", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.Script", "options": [ { "names":
"--logging", "description": "Can be used to turn on logging (logs to file in
<user home>\/.camel directory)", "defaultValue": "false", "javaType":
"boolean", "type": "boolean" }, { "names": "--logging-level", "description":
"Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "d [...]
{ "name": "semantic", "fullName": "semantic", "description": "List
semantic definitions and expert contracts", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.action.CamelSemantic", "options": [ {
"names": "--expert", "description": "Show the operations and parameter contract
of this expert", "javaType": "java.lang.String", "type": "string" }, { "names":
"--json", "description": "Output a single JSON document", "javaType":
"boolean", "type": "boolean" }, { "names": "--timeou [...]
{ "name": "shell", "fullName": "shell", "description": "Interactive Camel
CLI shell.", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Shell",
"options": [ { "names": "-h,--help", "description": "Display this help and
exit", "javaType": "boolean", "type": "boolean" } ] },
- { "name": "status", "fullName": "status", "description": "The state of a
running Camel integration in one call: where it runs and its files, its routes,
health, last errors and last reload, its JVM, and the end of its log",
"sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.IntegrationStatus",
"options": [ { "names": "--errors", "description": "How many of the last errors
to show", "defaultValue": "5", "javaType": "int", "type": "integer" }, {
"names": "--json", "descri [...]
+ { "name": "status", "fullName": "status", "description": "The state of a
running Camel integration in one call: where it runs and its files, its routes,
health, last errors and last reload, its JVM, and the end of its log",
"sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.IntegrationStatus",
"options": [ { "names": "--errors", "description": "How many of the last errors
to show", "defaultValue": "5", "javaType": "int", "type": "integer" }, {
"names": "--json", "descri [...]
{ "name": "stop", "fullName": "stop", "description": "Shuts down running
Camel integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.StopProcess", "options": [ {
"names": "--all", "description": "Stop all running Camel integrations",
"javaType": "boolean", "type": "boolean" }, { "names": "--kill", "description":
"To force killing the process (SIGKILL)", "javaType": "boolean", "type":
"boolean" }, { "names": "--no-wait", "description": "Do not wait for the in
[...]
- { "name": "top", "fullName": "top", "description": "Top status of Camel
integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.CamelTop", "options": [ {
"names": "--watch", "description": "Execute periodically and showing output
fullscreen", "javaType": "boolean", "type": "boolean" }, { "names":
"-h,--help", "description": "Display this help and exit", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "context",
"fullName": "top context [...]
+ { "name": "top", "fullName": "top", "description": "Top status of Camel
integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.process.CamelTop", "options": [ {
"names": "--watch", "description": "Execute periodically and showing output
fullscreen", "javaType": "boolean", "type": "boolean" }, { "names":
"-h,--help", "description": "Display this help and exit", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "context",
"fullName": "top context [...]
{ "name": "trace", "fullName": "trace", "description": "Tail message
traces from running Camel integrations", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.action.CamelTraceAction", "options":
[ { "names": "--action", "description": "Action to start, stop, clear, list
status, or dump traces", "defaultValue": "status", "javaType":
"java.lang.String", "type": "string" }, { "names": "--ago", "description": "Use
ago instead of yyyy-MM-dd HH:mm:ss in timestamp.", "javaType": "b [...]
{ "name": "transform", "fullName": "transform", "description": "Transform
message or Camel routes", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.TransformCommand", "options": [ {
"names": "-h,--help", "description": "Display this help and exit", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "dataweave",
"fullName": "transform dataweave", "description": "Convert DataWeave scripts to
DataSonnet format", "sourceClass": "org.apache.camel.dsl.jbang.c [...]
{ "name": "update", "fullName": "update", "description": "Update Camel
project", "sourceClass":
"org.apache.camel.dsl.jbang.core.commands.update.UpdateCommand", "options": [ {
"names": "-h,--help", "description": "Display this help and exit", "javaType":
"boolean", "type": "boolean" } ], "subcommands": [ { "name": "list",
"fullName": "update list", "description": "List available update versions for
Camel and its runtime variants", "sourceClass":
"org.apache.camel.dsl.jbang.core.comma [...]
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelProcessorStatus.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelProcessorStatus.java
index 0a2e4fc09364..b8139ddf6c78 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelProcessorStatus.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelProcessorStatus.java
@@ -82,6 +82,10 @@ public class CamelProcessorStatus extends
ProcessWatchCommand {
@Option(name = "source", hasValue = false, description = "Prefer to
display source filename/code instead of IDs")
boolean source;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
@Option(name = "limit", description = "Filter routes by limiting to the
given number of rows")
int limit;
@@ -133,7 +137,7 @@ public class CamelProcessorStatus extends
ProcessWatchCommand {
row.description = o.getString("description");
row.note = o.getString("note");
row.nodePrefixId = o.getString("nodePrefixId");
- row.processor = o.getString("from");
+ row.processor = ListingFormat.masked(o.getString("from"),
mask);
row.source = o.getString("source");
row.state = o.getString("state");
Map<String, ?> stats = o.getMap("statistics");
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatus.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatus.java
index c5fbe2771ecd..7092624df38b 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatus.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatus.java
@@ -77,6 +77,10 @@ public class CamelRouteStatus extends ProcessWatchCommand {
@Option(name = "wide-uri", hasValue = false, description = "List endpoint
URI in full details")
boolean wideUri;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
@Option(name = "limit", description = "Filter routes by limiting to the
given number of rows")
int limit;
@@ -135,7 +139,7 @@ public class CamelRouteStatus extends ProcessWatchCommand {
row.group = o.getString("group");
row.description = o.getString("description");
row.note = o.getString("note");
- row.from = o.getString("from");
+ row.from = ListingFormat.masked(o.getString("from"), mask);
Boolean bool = o.getBoolean("remote");
if (bool != null) {
// older camel versions does not include this information
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/IntegrationStatus.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/IntegrationStatus.java
index 5a8d0ae92a8d..80ea12543fb5 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/IntegrationStatus.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/IntegrationStatus.java
@@ -31,6 +31,7 @@ import
org.apache.camel.dsl.jbang.core.commands.ai.ReloadOutcome;
import org.apache.camel.dsl.jbang.core.common.CliException;
import org.apache.camel.dsl.jbang.core.common.CliExitCode;
import org.apache.camel.dsl.jbang.core.common.JsonOutput;
+import org.apache.camel.dsl.jbang.core.common.ListingFormat;
import org.apache.camel.dsl.jbang.core.common.ProcessFinder;
import org.apache.camel.dsl.jbang.core.common.ProcessFinder.CamelProcess;
import org.apache.camel.dsl.jbang.run.common.LogFileReader;
@@ -72,6 +73,10 @@ public class IntegrationStatus extends ProcessBaseCommand {
@Option(name = "errors", description = "How many of the last errors to
show", defaultValue = "5")
int errors = 5;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask the endpoint URIs of the routes to
avoid printing sensitive information such as password or access keys")
+ boolean mask = true;
+
public IntegrationStatus(CamelJBangMain main) {
super(main);
}
@@ -88,7 +93,7 @@ public class IntegrationStatus extends ProcessBaseCommand {
CamelProcess process = found.size() == 1 ? found.get(0) :
ProcessFinder.requireOne(query);
JsonObject log = LogFileReader.read(process.pid(), process.name(),
Math.max(logLines, RELOAD_RECORDS), null,
null, false);
- JsonObject status = status(process, loadErrorFile(process.pid()), log,
logLines, errors);
+ JsonObject status = status(process, loadErrorFile(process.pid()), log,
logLines, errors, mask);
if (jsonOutput) {
JsonOutput.print(printer(), status);
} else {
@@ -105,13 +110,15 @@ public class IntegrationStatus extends ProcessBaseCommand
{
* @param log its log as {@link LogFileReader} reads it, newest first
* @param logLines how many log records to keep
* @param errors how many errors to keep
+ * @param mask whether to mask the secrets in the endpoint URIs of
the routes
*/
- static JsonObject status(CamelProcess process, JsonObject errorFile,
JsonObject log, int logLines, int errors) {
+ static JsonObject status(
+ CamelProcess process, JsonObject errorFile, JsonObject log, int
logLines, int errors, boolean mask) {
JsonObject root = process.status();
JsonObject context = root.get("context") instanceof JsonObject jo ? jo
: new JsonObject();
JsonObject runtime = root.get("runtime") instanceof JsonObject jo ? jo
: new JsonObject();
JsonObject stats = context.get("statistics") instanceof JsonObject jo
? jo : null;
- JsonArray routes = routes(root);
+ JsonArray routes = routes(root, mask);
JsonObject health = health(root);
JsonArray lastErrors = errors(errorFile, errors);
List<JsonObject> records = records(log);
@@ -296,7 +303,7 @@ public class IntegrationStatus extends ProcessBaseCommand {
return answer;
}
- private static JsonArray routes(JsonObject root) {
+ private static JsonArray routes(JsonObject root, boolean mask) {
JsonArray answer = new JsonArray();
if (!(root.get("routes") instanceof JsonArray routes)) {
return answer;
@@ -307,7 +314,7 @@ public class IntegrationStatus extends ProcessBaseCommand {
}
JsonObject jo = new JsonObject();
jo.put("routeId", route.getString("routeId"));
- jo.put("from", route.getString("from"));
+ jo.put("from", ListingFormat.masked(route.getString("from"),
mask));
// where the route is: orders.camel.yaml:4, relative to the
directory it was started from
String source = route.getString("source");
jo.put("source", source != null && source.startsWith("file:") ?
source.substring(5) : source);
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumer.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumer.java
index 7b7230566568..fdef3e17a832 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumer.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumer.java
@@ -73,6 +73,10 @@ public class ListConsumer extends ProcessWatchCommand {
@Option(name = "wide-uri", hasValue = false, description = "List endpoint
URI in full details")
boolean wideUri;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
public ListConsumer(CamelJBangMain main) {
super(main);
}
@@ -100,7 +104,7 @@ public class ListConsumer extends ProcessWatchCommand {
}
row.pid = Long.toString(ph.pid());
row.id = o.getString("id");
- row.uri = o.getString("uri");
+ row.uri = ListingFormat.masked(o.getString("uri"), mask);
row.state = o.getString("state");
// the console says clazz and hosted (class and
hostedService before Camel 4.23)
row.className = o.getStringOrDefault("clazz",
o.getString("class"));
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListEndpoint.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListEndpoint.java
index 26aeddff65e8..ba9c782ef9da 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListEndpoint.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListEndpoint.java
@@ -33,6 +33,7 @@ import org.aesh.command.option.Option;
import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
import org.apache.camel.dsl.jbang.core.common.CompletionCandidates;
import org.apache.camel.dsl.jbang.core.common.EndpointScope;
+import org.apache.camel.dsl.jbang.core.common.ListingFormat;
import org.apache.camel.dsl.jbang.core.common.ProcessHelper;
import org.apache.camel.dsl.jbang.core.common.RowSort;
import org.apache.camel.dsl.jbang.core.common.TerminalWidthHelper;
@@ -94,6 +95,10 @@ public class ListEndpoint extends ProcessWatchCommand {
@Option(name = "wide-uri", hasValue = false, description = "List endpoint
URI in full details")
boolean wideUri;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
public ListEndpoint(CamelJBangMain main) {
super(main);
}
@@ -120,7 +125,7 @@ public class ListEndpoint extends ProcessWatchCommand {
row.name = ProcessHelper.extractName(root, ph);
}
row.pid = Long.toString(ph.pid());
- row.endpoint = o.getString("uri");
+ row.endpoint = ListingFormat.masked(o.getString("uri"),
mask);
row.stub = o.getBooleanOrDefault("stub", false);
row.remote = o.getBooleanOrDefault("remote", true);
row.scope = EndpointScope.of(row.endpoint, row.remote);
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListKafka.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListKafka.java
index c95dbed39ba4..2aeee44552cf 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListKafka.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListKafka.java
@@ -72,6 +72,10 @@ public class ListKafka extends ProcessWatchCommand {
@Option(name = "wide-uri", hasValue = false, description = "List endpoint
URI in full details")
boolean wideUri;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
public ListKafka(CamelJBangMain main) {
super(main);
}
@@ -126,7 +130,7 @@ public class ListKafka extends ProcessWatchCommand {
Row row = copy.copy();
jo = (JsonObject) arr.get(i);
row.routeId = jo.getString("routeId");
- row.uri = jo.getString("uri");
+ row.uri = ListingFormat.masked(jo.getString("uri"),
mask);
row.state = jo.getString("state");
JsonArray wa = (JsonArray) jo.get("workers");
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListProducer.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListProducer.java
index 6c7b832db526..191184f93cee 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListProducer.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListProducer.java
@@ -68,6 +68,10 @@ public class ListProducer extends ProcessWatchCommand {
@Option(name = "wide-uri", hasValue = false, description = "List endpoint
URI in full details")
boolean wideUri;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
public ListProducer(CamelJBangMain main) {
super(main);
}
@@ -94,7 +98,7 @@ public class ListProducer extends ProcessWatchCommand {
row.name = ProcessHelper.extractName(root, ph);
}
row.pid = Long.toString(ph.pid());
- row.uri = o.getString("uri");
+ row.uri = ListingFormat.masked(o.getString("uri"), mask);
row.id = o.getString("routeId");
row.state = o.getString("state");
// the console says clazz (class before Camel 4.23)
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListService.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListService.java
index c01ef5525fe2..ad147e4c4fc9 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListService.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListService.java
@@ -31,6 +31,7 @@ import org.aesh.command.option.Argument;
import org.aesh.command.option.Option;
import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
import org.apache.camel.dsl.jbang.core.common.CopyableRow;
+import org.apache.camel.dsl.jbang.core.common.ListingFormat;
import org.apache.camel.dsl.jbang.core.common.PidNameAgeCompletionCandidates;
import org.apache.camel.dsl.jbang.core.common.ProcessHelper;
import org.apache.camel.dsl.jbang.core.common.RowSort;
@@ -65,6 +66,10 @@ public class ListService extends ProcessWatchCommand {
@Option(name = "wide-uri", hasValue = false, description = "List endpoint
URI in full details")
boolean wideUri;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
public ListService(CamelJBangMain main) {
super(main);
}
@@ -99,8 +104,8 @@ public class ListService extends ProcessWatchCommand {
row.direction = jo.getString("direction");
row.hosted = jo.getBooleanOrDefault("hosted", false);
row.protocol = jo.getString("protocol");
- row.serviceUrl = jo.getString("serviceUrl");
- row.endpointUri = jo.getString("endpointUri");
+ row.serviceUrl =
ListingFormat.masked(jo.getString("serviceUrl"), mask);
+ row.endpointUri =
ListingFormat.masked(jo.getString("endpointUri"), mask);
row.hits = jo.getLongOrDefault("hits", 0);
row.routeId = jo.getString("routeId");
row.metadata = jo.getMap("metadata");
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListSqlTrace.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListSqlTrace.java
index 610dca60236e..e7dbefd46cdb 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListSqlTrace.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListSqlTrace.java
@@ -30,6 +30,7 @@ import org.aesh.command.CommandDefinition;
import org.aesh.command.option.Argument;
import org.aesh.command.option.Option;
import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
+import org.apache.camel.dsl.jbang.core.common.ListingFormat;
import org.apache.camel.dsl.jbang.core.common.PidNameAgeCompletionCandidates;
import org.apache.camel.dsl.jbang.core.common.ProcessHelper;
import org.apache.camel.dsl.jbang.core.common.RowSort;
@@ -57,6 +58,10 @@ public class ListSqlTrace extends ProcessWatchCommand {
completer = PidNameAgeCompletionCandidates.class)
String sort;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
public ListSqlTrace(CamelJBangMain main) {
super(main);
}
@@ -86,7 +91,7 @@ public class ListSqlTrace extends ProcessWatchCommand {
row.routeId = o.getString("routeId");
row.query = o.getString("query");
row.category = o.getString("category");
- row.endpoint = o.getString("endpoint");
+ row.endpoint =
ListingFormat.masked(o.getString("endpoint"), mask);
row.duration = o.getLongOrDefault("duration", 0);
row.rowCount = o.getIntegerOrDefault("rowCount", 0);
row.updateCount = o.getIntegerOrDefault("updateCount",
0);
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListTimeline.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListTimeline.java
index 44d2484394c3..6379f14d278c 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListTimeline.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/ListTimeline.java
@@ -36,6 +36,7 @@ import org.aesh.command.option.Option;
import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
import org.apache.camel.dsl.jbang.core.common.ActionClient;
import org.apache.camel.dsl.jbang.core.common.CompletionCandidates;
+import org.apache.camel.dsl.jbang.core.common.ListingFormat;
import org.apache.camel.dsl.jbang.core.common.ProcessHelper;
import org.apache.camel.dsl.jbang.core.common.RowSort;
import org.apache.camel.dsl.jbang.core.common.TerminalWidthHelper;
@@ -110,6 +111,10 @@ public class ListTimeline extends ProcessWatchCommand {
@Option(name = "wide-uri", hasValue = false, description = "List endpoint
URI in full details")
boolean wideUri;
+ @Option(name = "mask", hasValue = false, defaultValue = "true",
+ description = "Whether to mask endpoint URIs to avoid printing
sensitive information such as password or access keys")
+ boolean mask = true;
+
public ListTimeline(CamelJBangMain main) {
super(main);
}
@@ -181,7 +186,7 @@ public class ListTimeline extends ProcessWatchCommand {
}
}
- private static void addRoutes(Row base, JsonObject timeline,
List<RouteRow> rows) {
+ private void addRoutes(Row base, JsonObject timeline, List<RouteRow> rows)
{
JsonArray routes = (JsonArray) timeline.get("routes");
if (routes == null) {
return;
@@ -201,7 +206,7 @@ public class ListTimeline extends ProcessWatchCommand {
RouteRow row = new RouteRow();
row.copy(base);
row.routeId = r.getString("routeId");
- row.from = r.getString("from");
+ row.from = ListingFormat.masked(r.getString("from"), mask);
long[] completed = values(r, "completed");
long[] recovered = values(r, "recovered");
long[] handled = values(r, "handled");
@@ -235,7 +240,7 @@ public class ListTimeline extends ProcessWatchCommand {
}
}
- private static void addExchanges(Row base, JsonObject timeline,
List<ExchangeRow> rows) {
+ private void addExchanges(Row base, JsonObject timeline, List<ExchangeRow>
rows) {
JsonArray kept = (JsonArray) timeline.get("exchanges");
if (kept == null) {
return;
@@ -256,7 +261,7 @@ public class ListTimeline extends ProcessWatchCommand {
JsonArray sends = (JsonArray) e.get("endpointSends");
row.sends = sends != null ? sends.size() : 0;
row.chaosRule = e.getString("chaosRule");
- row.endpointUri = e.getString("fromEndpointUri");
+ row.endpointUri =
ListingFormat.masked(e.getString("fromEndpointUri"), mask);
rows.add(row);
}
}
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/ListingFormat.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/ListingFormat.java
index 02996d8e0e01..f1fdc1f568dc 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/ListingFormat.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/ListingFormat.java
@@ -19,6 +19,8 @@ package org.apache.camel.dsl.jbang.core.common;
import java.util.Comparator;
import java.util.function.Function;
+import org.apache.camel.util.URISupport;
+
/**
* The values the listings of running integrations show the same way, such as
the short form of an endpoint URI.
*/
@@ -40,6 +42,18 @@ public final class ListingFormat {
return uri;
}
+ /**
+ * The endpoint URI with the values of its sensitive options (such as
passwords and access keys) masked as
+ * <tt>xxxxxx</tt>, the same way Camel logs it, or as it is when not
masked.
+ *
+ * @param uri the endpoint URI, as the integration has it
+ * @param mask whether to mask the sensitive values (the --mask option);
when {@code false} the URI is returned
+ * as-is
+ */
+ public static String masked(String uri, boolean mask) {
+ return mask && uri != null ? URISupport.sanitizeUri(uri) : uri;
+ }
+
/**
* The time since the last started, completed and failed exchange, such as
<tt>1s/2s/-</tt>.
*/
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatusTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatusTest.java
index 9583a5bdfe09..9276e6ae721b 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatusTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatusTest.java
@@ -366,6 +366,29 @@ class CamelRouteStatusTest extends
ProcessCommandTestSupport {
assertThat(printer.getOutput()).contains("route1",
"route2").doesNotContain("route3", "route5");
}
+ @Test
+ void fromMasksTheSecretOptionsOfTheUri() throws Exception {
+ writeStatusFile(TEST_PID, integration("myApp",
+ route("route1",
"mongodb:db?database=test&password=RAW(s3cret)", "Started", stats(1, 0, 0,
5))));
+
+ assertThat(call(command("--wide-uri"))).isZero();
+ // the table wraps the long URIs
+ assertThat(printer.getOutput().replaceAll("\\s",
"")).contains("password=xxxxxx").doesNotContain("s3cret");
+
+ printer = new StringPrinter();
+ assertThat(call(command("--json"))).isZero();
+ JsonArray routes = Jsoner.deserialize(printer.getOutput(), (JsonArray)
null);
+ JsonObject route = routes.getMap(0);
+
assertThat(route.getString("from")).isEqualTo("mongodb:db?database=test&password=xxxxxx");
+
+ // as configured when asked for
+ printer = new StringPrinter();
+ assertThat(call(command("--json", "--mask=false"))).isZero();
+ routes = Jsoner.deserialize(printer.getOutput(), (JsonArray) null);
+ route = routes.getMap(0);
+
assertThat(route.getString("from")).isEqualTo("mongodb:db?database=test&password=RAW(s3cret)");
+ }
+
private CamelRouteStatus command(String... args) {
CamelRouteStatus command = new CamelRouteStatus(new
CamelJBangMain().withPrinter(printer));
CommandLineTestHelper.parse(command, args);
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/IntegrationStatusTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/IntegrationStatusTest.java
index a4aff4035a3e..25e0ef7db8c8 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/IntegrationStatusTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/IntegrationStatusTest.java
@@ -24,6 +24,7 @@ import
org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
import org.apache.camel.dsl.jbang.core.common.CliException;
import org.apache.camel.dsl.jbang.core.common.CliExitCode;
import org.apache.camel.dsl.jbang.core.common.CommandLineHelper;
+import org.apache.camel.dsl.jbang.run.common.StringPrinter;
import org.apache.camel.util.json.JsonArray;
import org.apache.camel.util.json.JsonObject;
import org.apache.camel.util.json.Jsoner;
@@ -216,6 +217,39 @@ class IntegrationStatusTest extends
ProcessCommandTestSupport {
}
}
+ @Test
+ void theFromOfTheRoutesIsMasked() throws Exception {
+ writeStatusFile(TEST_PID,
+ json("""
+ {"context":{"name":"orders","state":"Started"},
+
"routes":[{"routeId":"orders","from":"mongodb:db?database=test&password=RAW(s3cret)",
+ "state":"Started","uptime":"1m0s",
+
"statistics":{"exchangesTotal":1,"exchangesFailed":0,"exchangesInflight":0}}]}
+ """));
+ IntegrationStatus command = command();
+ command.jsonOutput = true;
+
+ assertThat(call(command)).isEqualTo(CliExitCode.OK);
+ JsonArray routes = json(printer.getStdout()).getCollection("routes");
+ JsonObject route = (JsonObject) routes.get(0);
+
assertThat(route.getString("from")).isEqualTo("mongodb:db?database=test&password=xxxxxx");
+
+ printer = new StringPrinter();
+ command = command();
+ assertThat(call(command)).isEqualTo(CliExitCode.OK);
+
assertThat(printer.getStdout()).contains("mongodb:db?database=test&password=xxxxxx").doesNotContain("s3cret");
+
+ // as configured when asked for
+ printer = new StringPrinter();
+ command = command();
+ command.jsonOutput = true;
+ command.mask = false;
+ assertThat(call(command)).isEqualTo(CliExitCode.OK);
+ routes = json(printer.getStdout()).getCollection("routes");
+ route = (JsonObject) routes.get(0);
+
assertThat(route.getString("from")).isEqualTo("mongodb:db?database=test&password=RAW(s3cret)");
+ }
+
private IntegrationStatus command() {
return new IntegrationStatus(new
CamelJBangMain().withPrinter(printer));
}
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumerTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumerTest.java
index 81f032f291fa..980065e55e9f 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumerTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListConsumerTest.java
@@ -31,6 +31,7 @@ import org.mockito.MockedStatic;
import org.mockito.junit.jupiter.MockitoExtension;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mockStatic;
@@ -163,6 +164,32 @@ class ListConsumerTest extends ProcessCommandTestSupport {
}
}
+ @Test
+ void testJsonOutputMasksSecretOptionsOfUri() throws Exception {
+ JsonObject c = consumer();
+ c.put("uri",
"sftp://scott@localhost/inbox?password=RAW(tiger)&delay=5000");
+ JsonObject root = new JsonObject();
+ root.put("context", contextObj());
+ root.put("consumers", consumerContainer(c));
+ writeStatusFile(TEST_PID, root);
+
+ ListConsumer command = new ListConsumer(new
CamelJBangMain().withPrinter(printer));
+ command.sort = "pid";
+ command.jsonOutput = true;
+
+ try (MockedStatic<ProcessHandle> mocked =
mockStatic(ProcessHandle.class)) {
+ ProcessHandle ph = mockProcessHandle(TEST_PID);
+ ProcessHandle currentHandle = mockCurrentHandle();
+ mocked.when(ProcessHandle::current).thenReturn(currentHandle);
+ mocked.when(ProcessHandle::allProcesses).thenAnswer(inv ->
Stream.of(ph));
+
+ assertEquals(0, command.doCall());
+ String output = printer.getOutput();
+ assertTrue(output.contains("password=xxxxxx&delay=5000"), output);
+ assertFalse(output.contains("tiger"), output);
+ }
+ }
+
private static JsonObject contextObj() {
JsonObject ctx = new JsonObject();
ctx.put("name", "myApp");
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListEndpointTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListEndpointTest.java
index b5b7f93b10fe..f3c3d3339340 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListEndpointTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListEndpointTest.java
@@ -217,6 +217,79 @@ class ListEndpointTest extends ProcessCommandTestSupport {
}
}
+ @Test
+ void testMasksSecretOptionsOfUri() throws Exception {
+ JsonObject root = buildEndpointStatus("myApp",
+ endpoint("mongodb:db?database=test&password=RAW(se&cret)",
"out", "1"),
+
endpoint("kafka:orders?configurationProperties[trust_store_password]=changeit",
"in", "1"));
+ writeStatusFile(TEST_PID, root);
+
+ ListEndpoint command = new ListEndpoint(new
CamelJBangMain().withPrinter(printer));
+ command.sort = "pid";
+ command.wideUri = true;
+
+ try (MockedStatic<ProcessHandle> mocked =
mockStatic(ProcessHandle.class)) {
+ ProcessHandle ph = mockProcessHandle(TEST_PID);
+ ProcessHandle currentHandle = mockCurrentHandle();
+ mocked.when(ProcessHandle::current).thenReturn(currentHandle);
+ mocked.when(ProcessHandle::allProcesses).thenAnswer(inv ->
Stream.of(ph));
+
+ assertEquals(0, command.doCall());
+ String output = printer.getOutput();
+ // the table wraps the long URIs
+ assertTrue(output.replaceAll("\\s",
"").contains("mongodb:db?database=test&password=xxxxxx"), output);
+ assertTrue(output.replaceAll("\\s",
"").contains("configurationProperties[trust_store_password]=xxxxxx"),
+ output);
+ assertFalse(output.contains("se&cret"), output);
+ assertFalse(output.contains("changeit"), output);
+ }
+ }
+
+ @Test
+ void testJsonOutputMasksSecretOptionsOfUri() throws Exception {
+ JsonObject root = buildEndpointStatus("myApp",
+ endpoint("aws2-s3:bucket?accessKey=RAW(ak)&secretKey=RAW(sk)",
"out", "1"));
+ writeStatusFile(TEST_PID, root);
+
+ ListEndpoint command = new ListEndpoint(new
CamelJBangMain().withPrinter(printer));
+ command.sort = "pid";
+ command.jsonOutput = true;
+
+ try (MockedStatic<ProcessHandle> mocked =
mockStatic(ProcessHandle.class)) {
+ ProcessHandle ph = mockProcessHandle(TEST_PID);
+ ProcessHandle currentHandle = mockCurrentHandle();
+ mocked.when(ProcessHandle::current).thenReturn(currentHandle);
+ mocked.when(ProcessHandle::allProcesses).thenAnswer(inv ->
Stream.of(ph));
+
+ assertEquals(0, command.doCall());
+ JsonArray rows = (JsonArray)
Jsoner.deserialize(printer.getOutput().trim());
+ assertEquals("aws2-s3:bucket?accessKey=xxxxxx&secretKey=xxxxxx",
((JsonObject) rows.get(0)).getString("uri"));
+ }
+ }
+
+ @Test
+ void testNoMaskShowsUriAsConfigured() throws Exception {
+ JsonObject root = buildEndpointStatus("myApp",
+ endpoint("aws2-s3:bucket?accessKey=RAW(ak)&secretKey=RAW(sk)",
"out", "1"));
+ writeStatusFile(TEST_PID, root);
+
+ ListEndpoint command = new ListEndpoint(new
CamelJBangMain().withPrinter(printer));
+ command.sort = "pid";
+ command.jsonOutput = true;
+ command.mask = false;
+
+ try (MockedStatic<ProcessHandle> mocked =
mockStatic(ProcessHandle.class)) {
+ ProcessHandle ph = mockProcessHandle(TEST_PID);
+ ProcessHandle currentHandle = mockCurrentHandle();
+ mocked.when(ProcessHandle::current).thenReturn(currentHandle);
+ mocked.when(ProcessHandle::allProcesses).thenAnswer(inv ->
Stream.of(ph));
+
+ assertEquals(0, command.doCall());
+ JsonArray rows = (JsonArray)
Jsoner.deserialize(printer.getOutput().trim());
+ assertEquals("aws2-s3:bucket?accessKey=RAW(ak)&secretKey=RAW(sk)",
((JsonObject) rows.get(0)).getString("uri"));
+ }
+ }
+
private static String lineOf(String output, String uri) {
return output.lines().filter(l ->
l.contains(uri)).findFirst().orElse("");
}
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListProducerTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListProducerTest.java
index addce01746de..6a9090da990c 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListProducerTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListProducerTest.java
@@ -198,6 +198,31 @@ class ListProducerTest extends ProcessCommandTestSupport {
}
}
+ @Test
+ void testMasksSecretOptionsOfUri() throws Exception {
+ JsonObject root = new JsonObject();
+ root.put("context", contextObj());
+ root.put("producers", producerContainer(producer("route1",
"pqc:sign?keyStorePassword=changeit&signer=dilithium")));
+ writeStatusFile(TEST_PID, root);
+
+ ListProducer command = new ListProducer(new
CamelJBangMain().withPrinter(printer));
+ command.sort = "pid";
+ command.wideUri = true;
+
+ try (MockedStatic<ProcessHandle> mocked =
mockStatic(ProcessHandle.class)) {
+ ProcessHandle ph = mockProcessHandle(TEST_PID);
+ ProcessHandle currentHandle = mockCurrentHandle();
+ mocked.when(ProcessHandle::current).thenReturn(currentHandle);
+ mocked.when(ProcessHandle::allProcesses).thenAnswer(inv ->
Stream.of(ph));
+
+ assertEquals(0, command.doCall());
+ String output = printer.getOutput();
+ // the table wraps the long URIs
+ assertTrue(output.replaceAll("\\s",
"").contains("pqc:sign?keyStorePassword=xxxxxx&signer=dilithium"), output);
+ assertFalse(output.contains("changeit"), output);
+ }
+ }
+
private static JsonObject contextObj() {
JsonObject ctx = new JsonObject();
ctx.put("name", "myApp");
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListServiceTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListServiceTest.java
index 315902e39040..8bc6e1d07366 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListServiceTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/process/ListServiceTest.java
@@ -140,6 +140,34 @@ class ListServiceTest extends ProcessCommandTestSupport {
}
}
+ @Test
+ void testJsonOutputMasksSecretOptionsOfUri() throws Exception {
+ JsonObject entry = service("mongodb", "out", "mongodb",
"mongodb://admin:s3cret@localhost:27017");
+ entry.put("endpointUri",
"mongodb:db?database=test&password=RAW(s3cret)");
+
+ JsonObject root = new JsonObject();
+ root.put("context", contextObj());
+ root.put("services", serviceContainer(entry));
+ writeStatusFile(TEST_PID, root);
+
+ ListService command = new ListService(new
CamelJBangMain().withPrinter(printer));
+ command.sort = "pid";
+ command.jsonOutput = true;
+
+ try (MockedStatic<ProcessHandle> mocked =
mockStatic(ProcessHandle.class)) {
+ ProcessHandle ph = mockProcessHandle(TEST_PID);
+ ProcessHandle currentHandle = mockCurrentHandle();
+ mocked.when(ProcessHandle::current).thenReturn(currentHandle);
+ mocked.when(ProcessHandle::allProcesses).thenAnswer(inv ->
Stream.of(ph));
+
+ assertEquals(0, command.doCall());
+ String output = printer.getOutput();
+ assertTrue(output.contains("admin:xxxxxx@localhost:27017"),
output);
+
assertTrue(output.contains("mongodb:db?database=test&password=xxxxxx"), output);
+ assertFalse(output.contains("s3cret"), output);
+ }
+ }
+
private static JsonObject contextObj() {
JsonObject ctx = new JsonObject();
ctx.put("name", "myApp");
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/common/ListingFormatTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/common/ListingFormatTest.java
index 31574cfc03ee..2af4e3df7cac 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/common/ListingFormatTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/common/ListingFormatTest.java
@@ -37,6 +37,25 @@ class ListingFormatTest {
assertThat(ListingFormat.uri(null, true)).isNull();
}
+ @Test
+ void maskedUri() {
+
assertThat(ListingFormat.masked("mongodb:db?database=test&password=RAW(se&cret)&collection=orders",
true))
+
.isEqualTo("mongodb:db?database=test&password=xxxxxx&collection=orders");
+
assertThat(ListingFormat.masked("aws2-s3:bucket?accessKey=RAW(ak)&secretKey=RAW(sk)",
true))
+ .isEqualTo("aws2-s3:bucket?accessKey=xxxxxx&secretKey=xxxxxx");
+
assertThat(ListingFormat.masked("docling:convert?authenticationToken=tok",
true))
+ .isEqualTo("docling:convert?authenticationToken=xxxxxx");
+ assertThat(ListingFormat.masked("pqc:sign?keyStorePassword=changeit",
true))
+ .isEqualTo("pqc:sign?keyStorePassword=xxxxxx");
+
assertThat(ListingFormat.masked("kafka:orders?configurationProperties[trust_store_password]=changeit",
true))
+
.isEqualTo("kafka:orders?configurationProperties[trust_store_password]=xxxxxx");
+ assertThat(ListingFormat.masked("ftp://scott:tiger@localhost/inbox",
true))
+ .isEqualTo("ftp://scott:xxxxxx@localhost/inbox");
+ assertThat(ListingFormat.masked("mongodb:db?password=secret",
false)).isEqualTo("mongodb:db?password=secret");
+ assertThat(ListingFormat.masked("timer:tick",
true)).isEqualTo("timer:tick");
+ assertThat(ListingFormat.masked(null, true)).isNull();
+ }
+
@Test
void sinceLast() {
assertThat(ListingFormat.sinceLast("1s", "2s",
null)).isEqualTo("1s/2s/-");
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/resources/golden/cli-help.txt
b/dsl/camel-jbang/camel-jbang-core/src/test/resources/golden/cli-help.txt
index 047ccf9b1586..60d765c1f5e9 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/test/resources/golden/cli-help.txt
+++ b/dsl/camel-jbang/camel-jbang-core/src/test/resources/golden/cli-help.txt
@@ -3976,7 +3976,7 @@ Examples:
Get status of Camel consumers
Usage: camel get consumer [-h] [--sort=<sort>] [--limit=<limit>]
[--filter=<filter>] [--scheduled] [--short-uri]
- [--wide-uri] [--watch] [--json]
+ [--wide-uri] [--mask] [--watch] [--json]
[--duration=<duration>] [<name>]
Options:
@@ -3990,6 +3990,10 @@ Options:
consumers
--short-uri List endpoint URI without query parameters (short)
--wide-uri List endpoint URI in full details
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--watch Execute periodically and showing output fullscreen
--json Output in JSON Format
--duration=<duration>
@@ -4076,8 +4080,8 @@ Usage: camel get endpoint [-h] [--sort=<sort>]
[--limit=<limit>]
[--filter=<filter>]
[--filter-direction=<filter-direction>]
[--filter-total=<filter-total>] [--verbose]
- [--short-uri] [--wide-uri] [--watch] [--json]
- [--duration=<duration>] [<name>]
+ [--short-uri] [--wide-uri] [--mask] [--watch]
+ [--json] [--duration=<duration>] [<name>]
Options:
-h, --help Display this help and exit
@@ -4095,6 +4099,10 @@ Options:
headers)
--short-uri List endpoint URI without query parameters (short)
--wide-uri List endpoint URI in full details
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--watch Execute periodically and showing output fullscreen
--json Output in JSON Format
--duration=<duration>
@@ -4360,8 +4368,8 @@ Examples:
== camel get kafka --help
List Kafka consumers of Camel integrations
Usage: camel get kafka [-h] [--sort=<sort>] [--committed] [--short-uri]
- [--wide-uri] [--watch] [--json] [--duration=<duration>]
- [<name>]
+ [--wide-uri] [--mask] [--watch] [--json]
+ [--duration=<duration>] [<name>]
Options:
-h, --help Display this help and exit
@@ -4371,6 +4379,10 @@ Options:
Kafka brokers)
--short-uri List endpoint URI without query parameters (short)
--wide-uri List endpoint URI in full details
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--watch Execute periodically and showing output fullscreen
--json Output in JSON Format
--duration=<duration>
@@ -4439,7 +4451,7 @@ Examples:
== camel get processor --help
Get status of Camel processors
-Usage: camel get processor [-h] [--sort=<sort>] [--remote] [--source]
+Usage: camel get processor [-h] [--sort=<sort>] [--remote] [--source] [--mask]
[--limit=<limit>] [--filter-mean=<filter-mean>]
[--running] [--filter=<filter>] [--group=<group>]
[--description] [--note] [--show-group] [--watch]
@@ -4452,6 +4464,10 @@ Options:
--remote Break down counters into remote/total pairs
--source Prefer to display source filename/code instead of
IDs
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--limit=<limit> Filter routes by limiting to the given number of
rows
--filter-mean=<filter-mean>
@@ -4480,7 +4496,8 @@ Examples:
Get status of Camel producers
Usage: camel get producer [-h] [--sort=<sort>] [--limit=<limit>]
[--filter=<filter>] [--short-uri] [--wide-uri]
- [--watch] [--json] [--duration=<duration>] [<name>]
+ [--mask] [--watch] [--json] [--duration=<duration>]
+ [<name>]
Options:
-h, --help Display this help and exit
@@ -4491,6 +4508,10 @@ Options:
--filter=<filter> Filter producers by URI
--short-uri List endpoint URI without query parameters (short)
--wide-uri List endpoint URI in full details
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--watch Execute periodically and showing output fullscreen
--json Output in JSON Format
--duration=<duration>
@@ -4557,7 +4578,7 @@ Examples:
== camel get route --help
Get status of Camel routes
Usage: camel get route [-h] [--sort=<sort>] [--source] [--remote] [--short-uri]
- [--wide-uri] [--limit=<limit>]
+ [--wide-uri] [--mask] [--limit=<limit>]
[--filter-mean=<filter-mean>] [--running]
[--filter=<filter>] [--group=<group>] [--error]
[--description] [--note] [--show-group] [--checksum]
@@ -4572,6 +4593,10 @@ Options:
--remote Break down counters into remote/total pairs
--short-uri List endpoint URI without query parameters (short)
--wide-uri List endpoint URI in full details
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--limit=<limit> Filter routes by limiting to the given number of
rows
--filter-mean=<filter-mean>
@@ -4670,7 +4695,7 @@ Examples:
== camel get service --help
Get services of Camel integrations
Usage: camel get service [-h] [--sort=<sort>] [--metadata] [--short-uri]
- [--wide-uri] [--watch] [--json]
+ [--wide-uri] [--mask] [--watch] [--json]
[--duration=<duration>] [<name>]
Options:
@@ -4681,6 +4706,10 @@ Options:
services)
--short-uri List endpoint URI without query parameters (short)
--wide-uri List endpoint URI in full details
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--watch Execute periodically and showing output fullscreen
--json Output in JSON Format
--duration=<duration>
@@ -4717,13 +4746,17 @@ Examples:
== camel get sql-trace --help
Get SQL query trace data
-Usage: camel get sql-trace [-h] [--sort=<sort>] [--watch] [--json]
+Usage: camel get sql-trace [-h] [--sort=<sort>] [--mask] [--watch] [--json]
[--duration=<duration>] [<name>]
Options:
-h, --help Display this help and exit
--sort=<sort> Sort by pid, name or age
Default: pid
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--watch Execute periodically and showing output fullscreen
--json Output in JSON Format
--duration=<duration>
@@ -4765,7 +4798,7 @@ Get what the routes did per second, the errors, and the
failed and slowest
exchanges
Usage: camel get timeline [-h] [--seconds=<seconds>] [--filter=<filter>]
[--exchanges] [--errors] [--sort=<sort>]
- [--limit=<limit>] [--short-uri] [--wide-uri]
+ [--limit=<limit>] [--short-uri] [--wide-uri]
[--mask]
[--watch] [--json] [--duration=<duration>] [<name>]
Options:
@@ -4786,6 +4819,10 @@ Options:
of rows
--short-uri List endpoint URI without query parameters (short)
--wide-uri List endpoint URI in full details
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--watch Execute periodically and showing output fullscreen
--json Output in JSON Format
--duration=<duration>
@@ -6184,7 +6221,7 @@ The state of a running Camel integration in one call:
where it runs and its
files, its routes, health, last errors and last reload, its JVM, and the end of
its log
Usage: camel status [-h] [--json] [--log-lines=<log-lines>] [--errors=<errors>]
- [<name>]
+ [--mask] [<name>]
Options:
-h, --help Display this help and exit
@@ -6196,6 +6233,10 @@ Options:
Default: 20
--errors=<errors> How many of the last errors to show
Default: 5
+ --mask Whether to mask the endpoint URIs of the routes to
+ avoid printing sensitive information such as
+ password or access keys
+ Default: true
<name> Name or pid of the running Camel integration
(default: the only one running)
@@ -6301,7 +6342,7 @@ Examples:
== camel top processor --help
Top performing processors
-Usage: camel top processor [-h] [--sort=<sort>] [--remote] [--source]
+Usage: camel top processor [-h] [--sort=<sort>] [--remote] [--source] [--mask]
[--limit=<limit>] [--filter-mean=<filter-mean>]
[--running] [--filter=<filter>] [--group=<group>]
[--description] [--note] [--show-group] [--watch]
@@ -6314,6 +6355,10 @@ Options:
--remote Break down counters into remote/total pairs
--source Prefer to display source filename/code instead of
IDs
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--limit=<limit> Filter routes by limiting to the given number of
rows
--filter-mean=<filter-mean>
@@ -6340,7 +6385,7 @@ Examples:
== camel top route --help
Top performing routes
Usage: camel top route [-h] [--sort=<sort>] [--source] [--remote] [--short-uri]
- [--wide-uri] [--limit=<limit>]
+ [--wide-uri] [--mask] [--limit=<limit>]
[--filter-mean=<filter-mean>] [--running]
[--filter=<filter>] [--group=<group>] [--error]
[--description] [--note] [--show-group] [--checksum]
@@ -6355,6 +6400,10 @@ Options:
--remote Break down counters into remote/total pairs
--short-uri List endpoint URI without query parameters (short)
--wide-uri List endpoint URI in full details
+ --mask Whether to mask endpoint URIs to avoid printing
+ sensitive information such as password or access
+ keys
+ Default: true
--limit=<limit> Filter routes by limiting to the given number of
rows
--filter-mean=<filter-mean>
@@ -6945,7 +6994,7 @@ exit: 2
stderr:
ERROR: Option --sort was specified, but no value was given.
Usage: camel get route [-h] [--sort=<sort>] [--source] [--remote]
[--short-uri]
- [--wide-uri] [--limit=<limit>]
+ [--wide-uri] [--mask] [--limit=<limit>]
[--filter-mean=<filter-mean>] [--running]
[--filter=<filter>] [--group=<group>] [--error]
[--description] [--note] [--show-group] [--checksum]