This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch CAMEL-21918-2 in repository https://gitbox.apache.org/repos/asf/camel.git
commit e8abc4dc4100e625c6d5350d62580132bf6fff5e Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Tue Apr 1 18:45:57 2025 +0200 CAMEL-21918 - Camel-IBM-Secret-Manager: Document Refresh feature Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../main/docs/ibm-secrets-manager-component.adoc | 2 + docs/user-manual/modules/ROOT/pages/security.adoc | 49 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/components/camel-ibm-secrets-manager/src/main/docs/ibm-secrets-manager-component.adoc b/components/camel-ibm-secrets-manager/src/main/docs/ibm-secrets-manager-component.adoc index a0d07023e20..781e0d16be0 100644 --- a/components/camel-ibm-secrets-manager/src/main/docs/ibm-secrets-manager-component.adoc +++ b/components/camel-ibm-secrets-manager/src/main/docs/ibm-secrets-manager-component.adoc @@ -234,6 +234,8 @@ camel.main.context-reload-enabled = true where `camel.vault.ibm.refreshEnabled` will enable the automatic context reload and `camel.vault.ibm.secrets` is a regex representing the secrets we want to track for updates. +where `camel.vault.ibm.eventStreamBootstrapServers` is the comma-separated list of Bootstrap Servers for IBM Event Stream, `camel.vault.ibm.eventStreamTopic`, `camel.vault.ibm.eventStreamUsername`, `camel.vault.ibm.eventStreamPassword`, `camel.vault.ibm.eventStreamGroupId` and `camel.vault.ibm.eventStreamConsumerPollTimeout` are the IBM Event Stream parameters for connecting and consuming events related to Secrets. + Note that `camel.vault.ibm.secrets` is not mandatory: if not specified the task responsible for checking updates events will take into accounts or the properties with an `ibm:` prefix. include::spring-boot:partial$starter.adoc[] diff --git a/docs/user-manual/modules/ROOT/pages/security.adoc b/docs/user-manual/modules/ROOT/pages/security.adoc index b875b439717..b946dd8c2af 100644 --- a/docs/user-manual/modules/ROOT/pages/security.adoc +++ b/docs/user-manual/modules/ROOT/pages/security.adoc @@ -919,3 +919,52 @@ where `camel.vault.azure.eventhubConnectionString` is the eventhub connection st Note that `camel.vault.azure.secrets` is not mandatory: if not specified the task responsible for checking updates events will take into accounts or the properties with an `azure:` prefix. The only requirement is adding the camel-azure-key-vault jar to your Camel application. + +==== Automatic Camel context reloading on Secret Refresh while using IBM Secrets Manager + +Being able to reload Camel context on a Secret Refresh could be done by specifying the IBM Event Streams credentials combined with the IBM Secrets Manager one (the same used for IBM Secrets Manager Property Function). + +With Environment variables: + +[source,bash] +---- +export CAMEL_VAULT_IBM_TOKEN=token +export CAMEL_VAULT_IBM_SERVICE_URL=serviceUrl +export CAMEL_VAULT_IBM_EVENTSTREAM_BOOTSTRAP_SERVERS=bootstrapServers +export CAMEL_VAULT_IBM_EVENTSTREAM_TOPIC=topic +export CAMEL_VAULT_IBM_EVENTSTREAM_USERNAME=token +export CAMEL_VAULT_IBM_EVENTSTREAM_PASSWORD=password +export CAMEL_VAULT_IBM_EVENTSTREAM_CONSUMER_GROUP_ID=groupId +export CAMEL_VAULT_IBM_EVENTSTREAM_CONSUMER_POLL_TIMEOUT=3000 +---- + +or as plain Camel main properties: + +[source,properties] +---- +camel.vault.ibm.token = token +camel.vault.ibm.serviceUrl = serviceUrl +camel.vault.ibm.eventStreamBootstrapServers = bootstrapServers +camel.vault.ibm.eventStreamTopic = topic +camel.vault.ibm.eventStreamUsername = token +camel.vault.ibm.eventStreamPassword = password +camel.vault.ibm.eventStreamGroupId = groupId +camel.vault.ibm.eventStreamConsumerPollTimeout=3000 +---- + +To enable the automatic refresh, you'll need additional properties to set: + +[source,properties] +---- +camel.vault.ibm.refreshEnabled=true +camel.vault.ibm.secrets=Secret +camel.main.context-reload-enabled = true +---- + +where `camel.vault.ibm.refreshEnabled` will enable the automatic context reload and `camel.vault.ibm.secrets` is a regex representing the secrets we want to track for updates. + +where `camel.vault.ibm.eventStreamBootstrapServers` is the comma-separated list of Bootstrap Servers for IBM Event Stream, `camel.vault.ibm.eventStreamTopic`, `camel.vault.ibm.eventStreamUsername`, `camel.vault.ibm.eventStreamPassword`, `camel.vault.ibm.eventStreamGroupId` and `camel.vault.ibm.eventStreamConsumerPollTimeout` are the IBM Event Stream parameters for connecting and consuming events related to Secrets. + +Note that `camel.vault.ibm.secrets` is not mandatory: if not specified the task responsible for checking updates events will take into accounts or the properties with an `ibm:` prefix. + +The only requirement is adding the camel-ibm-secrets-manager jar to your Camel application.