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

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 117f97f6002cd524358c22c9e9fef0882fa5a660
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue Jul 12 14:15:11 2022 +0200

    CAMEL-18208 - vault: allow to retrieve a specific secret version/revision - 
Google Secret Manager
---
 .../main/docs/google-secret-manager-component.adoc | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git 
a/components/camel-google/camel-google-secret-manager/src/main/docs/google-secret-manager-component.adoc
 
b/components/camel-google/camel-google-secret-manager/src/main/docs/google-secret-manager-component.adoc
index e90b83e52cc..6889d3ca727 100644
--- 
a/components/camel-google/camel-google-secret-manager/src/main/docs/google-secret-manager-component.adoc
+++ 
b/components/camel-google/camel-google-secret-manager/src/main/docs/google-secret-manager-component.adoc
@@ -192,6 +192,44 @@ You could specify a default value in case the particular 
field of secret is not
 
 In this case if the secret doesn't exist or the secret exists, but the 
username field is not part of the secret, the property will fallback to "admin" 
as value.
 
+There is also the syntax to get a particular version of the secret for both 
the approach, with field/default value specified or only with secret:
+
+[source,xml]
+----
+<camelContext>
+    <route>
+        <from uri="direct:start"/>
+        <to uri="{{gcp:route@1}}"/>
+    </route>
+</camelContext>
+----
+
+This approach will return the RAW route secret with version '1'.
+
+[source,xml]
+----
+<camelContext>
+    <route>
+        <from uri="direct:start"/>
+        <to uri="{{gcp:route:default@1}}"/>
+    </route>
+</camelContext>
+----
+
+This approach will return the route secret value with version '1' or default 
value in case the secret doesn't exist or the version doesn't exist.
+
+[source,xml]
+----
+<camelContext>
+    <route>
+        <from uri="direct:start"/>
+        <log message="Username is {{gcp:database/username:admin@1}}"/>
+    </route>
+</camelContext>
+----
+
+This approach will return the username field of the database secret with 
version '1' or admin in case the secret doesn't exist or the version doesn't 
exist.
+
 NOTE: For the moment we are not considering the rotation function, if any will 
be applied, but it is in the work to be done.
 
 There are only two requirements: 

Reply via email to