This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch CAMEL-27683-slack-webhookurl-secret
in repository https://gitbox.apache.org/repos/asf/camel.git

commit fc768375b6d2e30644a4b30c1c2a5db9eae46084
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Nov 27 16:50:50 2026 +0100

    CAMEL-27683: camel-slack - webhookUrl is not marked as a secret option
    
    The URL of a Slack incoming webhook is the credential to post to the
    channel, but webhookUrl (endpoint and component) and the component token
    were not secret options, so the URL was shown in clear text in endpoint
    URIs, logs, dev consoles and tooling.
    
    Mark them secret, add webhookurl to the sensitive keys of SensitiveUtils
    and the catalog sensitive-keys.json so URISupport.sanitizeUri masks it,
    and regenerate the metadata and the DSL.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../org/apache/camel/catalog/components/slack.json | 38 ++++++------
 .../apache/camel/catalog/main/sensitive-keys.json  |  1 +
 .../component/slack/SlackEndpointUriFactory.java   |  3 +-
 .../org/apache/camel/component/slack/slack.json    | 38 ++++++------
 .../camel/component/slack/SlackComponent.java      |  4 +-
 .../camel/component/slack/SlackEndpoint.java       |  2 +-
 .../component/slack/SlackSecretOptionsTest.java    | 72 ++++++++++++++++++++++
 .../java/org/apache/camel/util/SensitiveUtils.java |  2 +
 .../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc    | 11 ++++
 .../dsl/SlackComponentBuilderFactory.java          |  4 +-
 .../endpoint/dsl/SlackEndpointBuilderFactory.java  |  2 +-
 11 files changed, 132 insertions(+), 45 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/slack.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/slack.json
index 979d5565c39a..5c13b83230be 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/slack.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/slack.json
@@ -29,8 +29,8 @@
     "autowiredEnabled": { "index": 2, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
     "healthCheckConsumerEnabled": { "index": 3, "kind": "property", 
"displayName": "Health Check Consumer Enabled", "group": "health", "label": 
"health", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Used for enabling or disabling all consumer based health checks 
from this component" },
     "healthCheckProducerEnabled": { "index": 4, "kind": "property", 
"displayName": "Health Check Producer Enabled", "group": "health", "label": 
"health", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Used for enabling or disabling all producer based health checks 
from this component. Notice: Camel has by default disabled all producer based 
health-checks. You can turn on producer [...]
-    "token": { "index": 5, "kind": "property", "displayName": "Token", 
"group": "token", "label": "token", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "The OAuth token of a Slack app, a bot token 
(xoxb-) or a user token (xoxp-), that endpoints use unless they set their own 
token. The producer needs the chat:write scope, the consumer the history and 
read scopes of its conversationType, such a [...]
-    "webhookUrl": { "index": 6, "kind": "property", "displayName": "Webhook 
Url", "group": "webhook", "label": "webhook", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "The URL of a Slack incoming webhook, 
such as https:\/\/hooks.slack.com\/services\/..., that the producers post the 
message to as JSON. Endpoints use it unless they set their own webhookUrl, and 
only when no token is set." }
+    "token": { "index": 5, "kind": "property", "displayName": "Token", 
"group": "security", "label": "token,security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "description": "The OAuth token of a Slack app, a bot 
token (xoxb-) or a user token (xoxp-), that endpoints use unless they set their 
own token. The producer needs the chat:write scope, the consumer the history 
and read scopes of its conversationT [...]
+    "webhookUrl": { "index": 6, "kind": "property", "displayName": "Webhook 
Url", "group": "security", "label": "webhook,security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "description": "The URL of a Slack incoming 
webhook, such as https:\/\/hooks.slack.com\/services\/..., that the producers 
post the message to as JSON. Endpoints use it unless they set their own 
webhookUrl, and only when no token is set." }
   },
   "bodyTypes": {
     "consumerOut": { "carriers": [ "pojo" ], "javaType": 
"com.slack.api.model.Message", "description": "One message per new message of 
the conversation, the most recent first, or the oldest first with naturalOrder; 
the first poll gives the last message of the history. The text is ${body.text}" 
},
@@ -52,23 +52,23 @@
     "iconEmoji": { "index": 11, "kind": "parameter", "displayName": "Icon 
Emoji", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": true, "autowired": 
false, "secret": false, "description": "An emoji, such as :ghost:, shown as the 
icon of the messages that the producer sends. Slack applies it only for a bot 
token with the chat:write.customize scope, or for a legacy incoming webhook." },
     "iconUrl": { "index": 12, "kind": "parameter", "displayName": "Icon Url", 
"group": "producer", "label": "producer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": true, "autowired": false, 
"secret": false, "description": "The URL of an image shown as the icon of the 
messages that the producer sends. Slack applies it only for a bot token with 
the chat:write.customize scope, or for a legacy incoming webhook. iconEmoji 
takes precedence over it." },
     "username": { "index": 13, "kind": "parameter", "displayName": "Username", 
"group": "producer", "label": "producer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": true, "autowired": false, 
"secret": true, "security": "secret", "description": "The name shown as the 
author of the messages that the producer sends. Slack applies it only for a bot 
token with the chat:write.customize scope, or for a legacy incoming webhook." },
-    "webhookUrl": { "index": 14, "kind": "parameter", "displayName": "Webhook 
Url", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "The URL of a Slack incoming webhook, 
such as https:\/\/hooks.slack.com\/services\/..., that the producer posts the 
message to as JSON. It is used only when no token is set. The consumer does not 
use it." },
-    "lazyStartProducer": { "index": 15, "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 produ [...]
-    "backoffErrorThreshold": { "index": 16, "kind": "parameter", 
"displayName": "Backoff Error Threshold", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "integer", "javaType": "int", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
number of subsequent error polls (failed due some error) that should happen 
before the backoffMultipler should kick-in." },
-    "backoffIdleThreshold": { "index": 17, "kind": "parameter", "displayName": 
"Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "The number of subsequent 
idle polls that should happen before the backoffMultipler should kick-in." },
-    "backoffMultiplier": { "index": 18, "kind": "parameter", "displayName": 
"Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "To let the scheduled 
polling consumer backoff if there has been a number of subsequent idles\/errors 
in a row. The multiplier is then the number of polls that will be skipped 
before the next actual attempt is h [...]
-    "delay": { "index": 19, "kind": "parameter", "displayName": "Delay", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"duration", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "10000", "description": "Milliseconds before 
the next poll." },
-    "greedy": { "index": 20, "kind": "parameter", "displayName": "Greedy", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "If greedy is enabled, 
then the ScheduledPollConsumer will run immediately again, if the previous run 
polled 1 or more messages." },
-    "healthCheckMaxPollDuration": { "index": 21, "kind": "parameter", 
"displayName": "Health Check Max Poll Duration", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "duration", "javaType": 
"long", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "0", "description": "How long a poll may run before the health 
check of the consumer reports DOWN. The health check is otherwise based on the 
polls that are done, so it stays UP while a p [...]
-    "initialDelay": { "index": 22, "kind": "parameter", "displayName": 
"Initial Delay", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "long", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 1000, "description": 
"Milliseconds before the first poll starts." },
-    "repeatCount": { "index": 23, "kind": "parameter", "displayName": "Repeat 
Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit 
of number of fires. So if you set it to 1, the scheduler will only fire once. 
If you set it to 5, it will only fire five times. A value of zero or negative 
means fire forever." },
-    "runLoggingLevel": { "index": 24, "kind": "parameter", "displayName": "Run 
Logging Level", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "enum", "javaType": "org.apache.camel.LoggingLevel", 
"enum": [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": "TRACE", 
"description": "The consumer logs a start\/complete log line when it polls. 
This option allows you to configure the log [...]
-    "scheduledExecutorService": { "index": 25, "kind": "parameter", 
"displayName": "Scheduled Executor Service", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "object", "javaType": 
"java.util.concurrent.ScheduledExecutorService", "deprecated": false, 
"autowired": false, "secret": false, "description": "Allows for configuring a 
custom\/shared thread pool to use for the consumer. By default each consumer 
has its own single threaded thread pool." },
-    "scheduler": { "index": 26, "kind": "parameter", "displayName": 
"Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "none", "description": "To 
use a cron scheduler from either camel-spring or camel-quartz component. Use 
value spring or quartz for built in scheduler" },
-    "schedulerProperties": { "index": 27, "kind": "parameter", "displayName": 
"Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "object", "javaType": 
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", 
"multiValue": true, "deprecated": false, "autowired": false, "secret": false, 
"description": "To configure additional properties when using a custom 
scheduler or any of the Quartz, Spring based scheduler. This i [...]
-    "startScheduler": { "index": 28, "kind": "parameter", "displayName": 
"Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Whether the scheduler should be auto started." },
-    "timeUnit": { "index": 29, "kind": "parameter", "displayName": "Time 
Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "enum", "javaType": "java.util.concurrent.TimeUnit", "enum": [ 
"NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", 
"DAYS" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and 
delay options." },
-    "useFixedDelay": { "index": 30, "kind": "parameter", "displayName": "Use 
Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in 
JDK for details." }
+    "lazyStartProducer": { "index": 14, "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 produ [...]
+    "backoffErrorThreshold": { "index": 15, "kind": "parameter", 
"displayName": "Backoff Error Threshold", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "integer", "javaType": "int", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
number of subsequent error polls (failed due some error) that should happen 
before the backoffMultipler should kick-in." },
+    "backoffIdleThreshold": { "index": 16, "kind": "parameter", "displayName": 
"Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "The number of subsequent 
idle polls that should happen before the backoffMultipler should kick-in." },
+    "backoffMultiplier": { "index": 17, "kind": "parameter", "displayName": 
"Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "To let the scheduled 
polling consumer backoff if there has been a number of subsequent idles\/errors 
in a row. The multiplier is then the number of polls that will be skipped 
before the next actual attempt is h [...]
+    "delay": { "index": 18, "kind": "parameter", "displayName": "Delay", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"duration", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "10000", "description": "Milliseconds before 
the next poll." },
+    "greedy": { "index": 19, "kind": "parameter", "displayName": "Greedy", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "If greedy is enabled, 
then the ScheduledPollConsumer will run immediately again, if the previous run 
polled 1 or more messages." },
+    "healthCheckMaxPollDuration": { "index": 20, "kind": "parameter", 
"displayName": "Health Check Max Poll Duration", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "duration", "javaType": 
"long", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "0", "description": "How long a poll may run before the health 
check of the consumer reports DOWN. The health check is otherwise based on the 
polls that are done, so it stays UP while a p [...]
+    "initialDelay": { "index": 21, "kind": "parameter", "displayName": 
"Initial Delay", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "long", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 1000, "description": 
"Milliseconds before the first poll starts." },
+    "repeatCount": { "index": 22, "kind": "parameter", "displayName": "Repeat 
Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit 
of number of fires. So if you set it to 1, the scheduler will only fire once. 
If you set it to 5, it will only fire five times. A value of zero or negative 
means fire forever." },
+    "runLoggingLevel": { "index": 23, "kind": "parameter", "displayName": "Run 
Logging Level", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "enum", "javaType": "org.apache.camel.LoggingLevel", 
"enum": [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": "TRACE", 
"description": "The consumer logs a start\/complete log line when it polls. 
This option allows you to configure the log [...]
+    "scheduledExecutorService": { "index": 24, "kind": "parameter", 
"displayName": "Scheduled Executor Service", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "object", "javaType": 
"java.util.concurrent.ScheduledExecutorService", "deprecated": false, 
"autowired": false, "secret": false, "description": "Allows for configuring a 
custom\/shared thread pool to use for the consumer. By default each consumer 
has its own single threaded thread pool." },
+    "scheduler": { "index": 25, "kind": "parameter", "displayName": 
"Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "none", "description": "To 
use a cron scheduler from either camel-spring or camel-quartz component. Use 
value spring or quartz for built in scheduler" },
+    "schedulerProperties": { "index": 26, "kind": "parameter", "displayName": 
"Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "object", "javaType": 
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", 
"multiValue": true, "deprecated": false, "autowired": false, "secret": false, 
"description": "To configure additional properties when using a custom 
scheduler or any of the Quartz, Spring based scheduler. This i [...]
+    "startScheduler": { "index": 27, "kind": "parameter", "displayName": 
"Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Whether the scheduler should be auto started." },
+    "timeUnit": { "index": 28, "kind": "parameter", "displayName": "Time 
Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "enum", "javaType": "java.util.concurrent.TimeUnit", "enum": [ 
"NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", 
"DAYS" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and 
delay options." },
+    "useFixedDelay": { "index": 29, "kind": "parameter", "displayName": "Use 
Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in 
JDK for details." },
+    "webhookUrl": { "index": 30, "kind": "parameter", "displayName": "Webhook 
Url", "group": "security", "label": "producer,security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "description": "The 
URL of a Slack incoming webhook, such as 
https:\/\/hooks.slack.com\/services\/..., that the producer posts the message 
to as JSON. It is used only when no token is set. The consumer does no [...]
   },
   "dstWorlds": {
     "SlackWorld": { "javaType": 
"org.apache.camel.component.slack.dst.SlackWorld", "fake": "a fake Slack Web 
API (conversations.history) returned by a mocked Slack.getInstance", "covers": 
[ "the polling consumer with maxResults and naturalOrder", "the pages of 
conversations.history (oldest and cursor)", "route suspend and resume while a 
batch is routed" ], "faults": [ "the first page of conversations.history 
answers ratelimited", "conversations.history answers slowly", "the route is 
susp [...]
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/sensitive-keys.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/sensitive-keys.json
index 230d234f5dc9..6c36959eb00e 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/sensitive-keys.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/sensitive-keys.json
@@ -108,6 +108,7 @@
   "username",
   "userpassword",
   "verificationcode",
+  "webhookurl",
   "webhookverifytoken",
   "zookeeperpassword"
 ]
diff --git 
a/components/camel-slack/src/generated/java/org/apache/camel/component/slack/SlackEndpointUriFactory.java
 
b/components/camel-slack/src/generated/java/org/apache/camel/component/slack/SlackEndpointUriFactory.java
index 797ad5628406..c04a4e447f62 100644
--- 
a/components/camel-slack/src/generated/java/org/apache/camel/component/slack/SlackEndpointUriFactory.java
+++ 
b/components/camel-slack/src/generated/java/org/apache/camel/component/slack/SlackEndpointUriFactory.java
@@ -57,9 +57,10 @@ public class SlackEndpointUriFactory extends 
org.apache.camel.support.component.
         props.add("username");
         props.add("webhookUrl");
         PROPERTY_NAMES = Collections.unmodifiableSet(props);
-        Set<String> secretProps = new HashSet<>(2);
+        Set<String> secretProps = new HashSet<>(3);
         secretProps.add("token");
         secretProps.add("username");
+        secretProps.add("webhookUrl");
         SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
         ENDPOINT_IDENTITY_PROPERTY_NAMES = Collections.emptySet();
         Map<String, String> prefixes = new HashMap<>(1);
diff --git 
a/components/camel-slack/src/generated/resources/META-INF/org/apache/camel/component/slack/slack.json
 
b/components/camel-slack/src/generated/resources/META-INF/org/apache/camel/component/slack/slack.json
index 979d5565c39a..5c13b83230be 100644
--- 
a/components/camel-slack/src/generated/resources/META-INF/org/apache/camel/component/slack/slack.json
+++ 
b/components/camel-slack/src/generated/resources/META-INF/org/apache/camel/component/slack/slack.json
@@ -29,8 +29,8 @@
     "autowiredEnabled": { "index": 2, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching t [...]
     "healthCheckConsumerEnabled": { "index": 3, "kind": "property", 
"displayName": "Health Check Consumer Enabled", "group": "health", "label": 
"health", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Used for enabling or disabling all consumer based health checks 
from this component" },
     "healthCheckProducerEnabled": { "index": 4, "kind": "property", 
"displayName": "Health Check Producer Enabled", "group": "health", "label": 
"health", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Used for enabling or disabling all producer based health checks 
from this component. Notice: Camel has by default disabled all producer based 
health-checks. You can turn on producer [...]
-    "token": { "index": 5, "kind": "property", "displayName": "Token", 
"group": "token", "label": "token", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "The OAuth token of a Slack app, a bot token 
(xoxb-) or a user token (xoxp-), that endpoints use unless they set their own 
token. The producer needs the chat:write scope, the consumer the history and 
read scopes of its conversationType, such a [...]
-    "webhookUrl": { "index": 6, "kind": "property", "displayName": "Webhook 
Url", "group": "webhook", "label": "webhook", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "The URL of a Slack incoming webhook, 
such as https:\/\/hooks.slack.com\/services\/..., that the producers post the 
message to as JSON. Endpoints use it unless they set their own webhookUrl, and 
only when no token is set." }
+    "token": { "index": 5, "kind": "property", "displayName": "Token", 
"group": "security", "label": "token,security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": true, "description": "The OAuth token of a Slack app, a bot 
token (xoxb-) or a user token (xoxp-), that endpoints use unless they set their 
own token. The producer needs the chat:write scope, the consumer the history 
and read scopes of its conversationT [...]
+    "webhookUrl": { "index": 6, "kind": "property", "displayName": "Webhook 
Url", "group": "security", "label": "webhook,security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "description": "The URL of a Slack incoming 
webhook, such as https:\/\/hooks.slack.com\/services\/..., that the producers 
post the message to as JSON. Endpoints use it unless they set their own 
webhookUrl, and only when no token is set." }
   },
   "bodyTypes": {
     "consumerOut": { "carriers": [ "pojo" ], "javaType": 
"com.slack.api.model.Message", "description": "One message per new message of 
the conversation, the most recent first, or the oldest first with naturalOrder; 
the first poll gives the last message of the history. The text is ${body.text}" 
},
@@ -52,23 +52,23 @@
     "iconEmoji": { "index": 11, "kind": "parameter", "displayName": "Icon 
Emoji", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": true, "autowired": 
false, "secret": false, "description": "An emoji, such as :ghost:, shown as the 
icon of the messages that the producer sends. Slack applies it only for a bot 
token with the chat:write.customize scope, or for a legacy incoming webhook." },
     "iconUrl": { "index": 12, "kind": "parameter", "displayName": "Icon Url", 
"group": "producer", "label": "producer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": true, "autowired": false, 
"secret": false, "description": "The URL of an image shown as the icon of the 
messages that the producer sends. Slack applies it only for a bot token with 
the chat:write.customize scope, or for a legacy incoming webhook. iconEmoji 
takes precedence over it." },
     "username": { "index": 13, "kind": "parameter", "displayName": "Username", 
"group": "producer", "label": "producer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": true, "autowired": false, 
"secret": true, "security": "secret", "description": "The name shown as the 
author of the messages that the producer sends. Slack applies it only for a bot 
token with the chat:write.customize scope, or for a legacy incoming webhook." },
-    "webhookUrl": { "index": 14, "kind": "parameter", "displayName": "Webhook 
Url", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "The URL of a Slack incoming webhook, 
such as https:\/\/hooks.slack.com\/services\/..., that the producer posts the 
message to as JSON. It is used only when no token is set. The consumer does not 
use it." },
-    "lazyStartProducer": { "index": 15, "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 produ [...]
-    "backoffErrorThreshold": { "index": 16, "kind": "parameter", 
"displayName": "Backoff Error Threshold", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "integer", "javaType": "int", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
number of subsequent error polls (failed due some error) that should happen 
before the backoffMultipler should kick-in." },
-    "backoffIdleThreshold": { "index": 17, "kind": "parameter", "displayName": 
"Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "The number of subsequent 
idle polls that should happen before the backoffMultipler should kick-in." },
-    "backoffMultiplier": { "index": 18, "kind": "parameter", "displayName": 
"Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "To let the scheduled 
polling consumer backoff if there has been a number of subsequent idles\/errors 
in a row. The multiplier is then the number of polls that will be skipped 
before the next actual attempt is h [...]
-    "delay": { "index": 19, "kind": "parameter", "displayName": "Delay", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"duration", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "10000", "description": "Milliseconds before 
the next poll." },
-    "greedy": { "index": 20, "kind": "parameter", "displayName": "Greedy", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "If greedy is enabled, 
then the ScheduledPollConsumer will run immediately again, if the previous run 
polled 1 or more messages." },
-    "healthCheckMaxPollDuration": { "index": 21, "kind": "parameter", 
"displayName": "Health Check Max Poll Duration", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "duration", "javaType": 
"long", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "0", "description": "How long a poll may run before the health 
check of the consumer reports DOWN. The health check is otherwise based on the 
polls that are done, so it stays UP while a p [...]
-    "initialDelay": { "index": 22, "kind": "parameter", "displayName": 
"Initial Delay", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "long", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 1000, "description": 
"Milliseconds before the first poll starts." },
-    "repeatCount": { "index": 23, "kind": "parameter", "displayName": "Repeat 
Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit 
of number of fires. So if you set it to 1, the scheduler will only fire once. 
If you set it to 5, it will only fire five times. A value of zero or negative 
means fire forever." },
-    "runLoggingLevel": { "index": 24, "kind": "parameter", "displayName": "Run 
Logging Level", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "enum", "javaType": "org.apache.camel.LoggingLevel", 
"enum": [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": "TRACE", 
"description": "The consumer logs a start\/complete log line when it polls. 
This option allows you to configure the log [...]
-    "scheduledExecutorService": { "index": 25, "kind": "parameter", 
"displayName": "Scheduled Executor Service", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "object", "javaType": 
"java.util.concurrent.ScheduledExecutorService", "deprecated": false, 
"autowired": false, "secret": false, "description": "Allows for configuring a 
custom\/shared thread pool to use for the consumer. By default each consumer 
has its own single threaded thread pool." },
-    "scheduler": { "index": 26, "kind": "parameter", "displayName": 
"Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "none", "description": "To 
use a cron scheduler from either camel-spring or camel-quartz component. Use 
value spring or quartz for built in scheduler" },
-    "schedulerProperties": { "index": 27, "kind": "parameter", "displayName": 
"Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "object", "javaType": 
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", 
"multiValue": true, "deprecated": false, "autowired": false, "secret": false, 
"description": "To configure additional properties when using a custom 
scheduler or any of the Quartz, Spring based scheduler. This i [...]
-    "startScheduler": { "index": 28, "kind": "parameter", "displayName": 
"Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Whether the scheduler should be auto started." },
-    "timeUnit": { "index": 29, "kind": "parameter", "displayName": "Time 
Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "enum", "javaType": "java.util.concurrent.TimeUnit", "enum": [ 
"NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", 
"DAYS" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and 
delay options." },
-    "useFixedDelay": { "index": 30, "kind": "parameter", "displayName": "Use 
Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in 
JDK for details." }
+    "lazyStartProducer": { "index": 14, "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 produ [...]
+    "backoffErrorThreshold": { "index": 15, "kind": "parameter", 
"displayName": "Backoff Error Threshold", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "integer", "javaType": "int", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
number of subsequent error polls (failed due some error) that should happen 
before the backoffMultipler should kick-in." },
+    "backoffIdleThreshold": { "index": 16, "kind": "parameter", "displayName": 
"Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "The number of subsequent 
idle polls that should happen before the backoffMultipler should kick-in." },
+    "backoffMultiplier": { "index": 17, "kind": "parameter", "displayName": 
"Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "int", "deprecated": false, 
"autowired": false, "secret": false, "description": "To let the scheduled 
polling consumer backoff if there has been a number of subsequent idles\/errors 
in a row. The multiplier is then the number of polls that will be skipped 
before the next actual attempt is h [...]
+    "delay": { "index": 18, "kind": "parameter", "displayName": "Delay", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"duration", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "10000", "description": "Milliseconds before 
the next poll." },
+    "greedy": { "index": 19, "kind": "parameter", "displayName": "Greedy", 
"group": "scheduler", "label": "consumer,scheduler", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "If greedy is enabled, 
then the ScheduledPollConsumer will run immediately again, if the previous run 
polled 1 or more messages." },
+    "healthCheckMaxPollDuration": { "index": 20, "kind": "parameter", 
"displayName": "Health Check Max Poll Duration", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "duration", "javaType": 
"long", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "0", "description": "How long a poll may run before the health 
check of the consumer reports DOWN. The health check is otherwise based on the 
polls that are done, so it stays UP while a p [...]
+    "initialDelay": { "index": 21, "kind": "parameter", "displayName": 
"Initial Delay", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "integer", "javaType": "long", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": 1000, "description": 
"Milliseconds before the first poll starts." },
+    "repeatCount": { "index": 22, "kind": "parameter", "displayName": "Repeat 
Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "integer", "javaType": "long", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 0, "description": "Specifies a maximum limit 
of number of fires. So if you set it to 1, the scheduler will only fire once. 
If you set it to 5, it will only fire five times. A value of zero or negative 
means fire forever." },
+    "runLoggingLevel": { "index": 23, "kind": "parameter", "displayName": "Run 
Logging Level", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "enum", "javaType": "org.apache.camel.LoggingLevel", 
"enum": [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": "TRACE", 
"description": "The consumer logs a start\/complete log line when it polls. 
This option allows you to configure the log [...]
+    "scheduledExecutorService": { "index": 24, "kind": "parameter", 
"displayName": "Scheduled Executor Service", "group": "scheduler", "label": 
"consumer,scheduler", "required": false, "type": "object", "javaType": 
"java.util.concurrent.ScheduledExecutorService", "deprecated": false, 
"autowired": false, "secret": false, "description": "Allows for configuring a 
custom\/shared thread pool to use for the consumer. By default each consumer 
has its own single threaded thread pool." },
+    "scheduler": { "index": 25, "kind": "parameter", "displayName": 
"Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "none", "description": "To 
use a cron scheduler from either camel-spring or camel-quartz component. Use 
value spring or quartz for built in scheduler" },
+    "schedulerProperties": { "index": 26, "kind": "parameter", "displayName": 
"Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "object", "javaType": 
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", 
"multiValue": true, "deprecated": false, "autowired": false, "secret": false, 
"description": "To configure additional properties when using a custom 
scheduler or any of the Quartz, Spring based scheduler. This i [...]
+    "startScheduler": { "index": 27, "kind": "parameter", "displayName": 
"Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": true, 
"description": "Whether the scheduler should be auto started." },
+    "timeUnit": { "index": 28, "kind": "parameter", "displayName": "Time 
Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, 
"type": "enum", "javaType": "java.util.concurrent.TimeUnit", "enum": [ 
"NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", 
"DAYS" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and 
delay options." },
+    "useFixedDelay": { "index": 29, "kind": "parameter", "displayName": "Use 
Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in 
JDK for details." },
+    "webhookUrl": { "index": 30, "kind": "parameter", "displayName": "Webhook 
Url", "group": "security", "label": "producer,security", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": true, "security": "secret", "description": "The 
URL of a Slack incoming webhook, such as 
https:\/\/hooks.slack.com\/services\/..., that the producer posts the message 
to as JSON. It is used only when no token is set. The consumer does no [...]
   },
   "dstWorlds": {
     "SlackWorld": { "javaType": 
"org.apache.camel.component.slack.dst.SlackWorld", "fake": "a fake Slack Web 
API (conversations.history) returned by a mocked Slack.getInstance", "covers": 
[ "the polling consumer with maxResults and naturalOrder", "the pages of 
conversations.history (oldest and cursor)", "route suspend and resume while a 
batch is routed" ], "faults": [ "the first page of conversations.history 
answers ratelimited", "conversations.history answers slowly", "the route is 
susp [...]
diff --git 
a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponent.java
 
b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponent.java
index 1e3b1dd164bc..a750c5dade3a 100644
--- 
a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponent.java
+++ 
b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackComponent.java
@@ -27,13 +27,13 @@ import org.apache.camel.support.HealthCheckComponent;
 @Component("slack")
 public class SlackComponent extends HealthCheckComponent {
 
-    @Metadata(label = "webhook",
+    @Metadata(label = "webhook,security", secret = true,
               description = "The URL of a Slack incoming webhook, such as 
https://hooks.slack.com/services/..., that the"
                             + " producers post the message to as JSON. 
Endpoints use it unless they set their own"
                             + " webhookUrl, and only when no token is set.")
     private String webhookUrl;
 
-    @Metadata(label = "token",
+    @Metadata(label = "token,security", secret = true,
               description = "The OAuth token of a Slack app, a bot token 
(xoxb-) or a user token (xoxp-), that endpoints"
                             + " use unless they set their own token. The 
producer needs the chat:write scope, the consumer"
                             + " the history and read scopes of its 
conversationType, such as channels:history and"
diff --git 
a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java
 
b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java
index 07e4ab4a372b..9f71557b7936 100644
--- 
a/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java
+++ 
b/components/camel-slack/src/main/java/org/apache/camel/component/slack/SlackEndpoint.java
@@ -61,7 +61,7 @@ public class SlackEndpoint extends ScheduledPollEndpoint {
                            + " of conversationType.")
     @Metadata(required = true)
     private String channel;
-    @UriParam(label = "producer",
+    @UriParam(label = "producer,security", secret = true,
               description = "The URL of a Slack incoming webhook, such as 
https://hooks.slack.com/services/..., that the"
                             + " producer posts the message to as JSON. It is 
used only when no token is set. The consumer"
                             + " does not use it.")
diff --git 
a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackSecretOptionsTest.java
 
b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackSecretOptionsTest.java
new file mode 100644
index 000000000000..ee7b5dcc636f
--- /dev/null
+++ 
b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackSecretOptionsTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.slack;
+
+import java.util.Set;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.spi.EndpointUriFactory;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.apache.camel.util.SensitiveUtils;
+import org.apache.camel.util.URISupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * The webhook URL of Slack is the credential to post to the channel, so it 
must be masked like the token.
+ */
+public class SlackSecretOptionsTest extends CamelTestSupport {
+
+    private static final String WEBHOOK_URL = 
"https://hooks.slack.com/services/T0000/B0000/abcdefghijklmnop";;
+
+    @Test
+    public void testSanitizeUriMasksWebhookUrl() {
+        String sanitized = URISupport.sanitizeUri("slack:#general?webhookUrl=" 
+ WEBHOOK_URL);
+
+        assertFalse(sanitized.contains("hooks.slack.com"), sanitized);
+        assertEquals("slack:#general?webhookUrl=xxxxxx", sanitized);
+    }
+
+    @Test
+    public void testSanitizeUriMasksRawWebhookUrl() {
+        String sanitized = 
URISupport.sanitizeUri("slack:#general?iconEmoji=:ghost:&webhookUrl=RAW(" + 
WEBHOOK_URL + ")");
+
+        assertFalse(sanitized.contains("hooks.slack.com"), sanitized);
+        assertEquals("slack:#general?iconEmoji=:ghost:&webhookUrl=xxxxxx", 
sanitized);
+    }
+
+    @Test
+    public void testEndpointToStringMasksWebhookUrl() {
+        Endpoint endpoint = 
context.getEndpoint("slack:#general?webhookUrl=RAW(" + WEBHOOK_URL + ")");
+
+        assertEquals(WEBHOOK_URL, ((SlackEndpoint) endpoint).getWebhookUrl());
+        assertFalse(endpoint.toString().contains("hooks.slack.com"), 
endpoint.toString());
+    }
+
+    @Test
+    public void testWebhookUrlIsSecretOption() {
+        EndpointUriFactory factory = 
context.getCamelContextExtension().getEndpointUriFactory("slack");
+        Set<String> secrets = factory.secretPropertyNames();
+
+        assertTrue(secrets.contains("webhookUrl"), secrets.toString());
+        assertTrue(secrets.contains("token"), secrets.toString());
+        
assertTrue(SensitiveUtils.containsSensitive("camel.component.slack.webhookUrl"));
+    }
+}
diff --git 
a/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java 
b/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java
index a660d261848d..85828ee8ce0d 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java
@@ -147,6 +147,7 @@ public final class SensitiveUtils {
                     "username",
                     "userpassword",
                     "verificationcode",
+                    "webhookurl",
                     "webhookverifytoken",
                     "zookeeperpassword"
             // SENSITIVE-KEYS: END
@@ -305,6 +306,7 @@ public final class SensitiveUtils {
                                                     + "|\\Qusername\\E"
                                                     + "|\\Quserpassword\\E"
                                                     + "|\\Qverificationcode\\E"
+                                                    + "|\\Qwebhookurl\\E"
                                                     + 
"|\\Qwebhookverifytoken\\E"
                                                     + 
"|\\Qzookeeperpassword\\E"
     // SENSITIVE-PATTERN: END
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 25708c2cd51b..56300694d88b 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
@@ -12297,6 +12297,17 @@ With `allowUrlBody=true`, a body that does not start 
with `version: 1` and is no
 with a space or a relative name, now fails with an `InvalidPayloadException`, 
as a URL with an unknown scheme already
 did. Before, it failed with an `IllegalArgumentException`. A URL that cannot 
be fetched keeps its own exception.
 
+=== camel-slack - webhookUrl is a secret option
+
+The `webhookUrl` option of the endpoint and the component, and the `token` 
option of the component, are now secret
+options. The URL of a Slack incoming webhook lets anyone who has it post to 
the channel. It is now shown as `xxxxxx` in
+the endpoint URI in logs, in the dev consoles and in tooling, like the 
`token`. In the documentation and tooling these
+options are now in the `security` group.
+
+The `camel.security.secretPolicy` check now also reports `webhookUrl` (such as
+`camel.component.slack.webhookUrl`) when it is configured as plain text: a 
warning by default, and the startup fails
+with `camel.main.profile=prod`. Configure it with a property placeholder or a 
vault reference instead.
+
 === Kamelets - removed Kamelets
 
 The Kamelet catalog (camel-kamelets 4.24) removes Kamelets that could not work 
on Camel 4.23 or 4.24:
diff --git 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SlackComponentBuilderFactory.java
 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SlackComponentBuilderFactory.java
index 7587814d0d07..b0938a4eacf5 100644
--- 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SlackComponentBuilderFactory.java
+++ 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/SlackComponentBuilderFactory.java
@@ -174,7 +174,7 @@ public interface SlackComponentBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Group: token
+         * Group: security
          * 
          * @param token the value to set
          * @return the dsl builder
@@ -192,7 +192,7 @@ public interface SlackComponentBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Group: webhook
+         * Group: security
          * 
          * @param webhookUrl the value to set
          * @return the dsl builder
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SlackEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SlackEndpointBuilderFactory.java
index b53521e8553a..1960df2aa229 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SlackEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SlackEndpointBuilderFactory.java
@@ -953,7 +953,7 @@ public interface SlackEndpointBuilderFactory {
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
-         * Group: producer
+         * Group: security
          * 
          * @param webhookUrl the value to set
          * @return the dsl builder

Reply via email to