You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/07/29 10:39:11 UTC

(camel) branch CAMEL-21021 created (now 6d4be79c8ac)

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

acosentino pushed a change to branch CAMEL-21021
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 6d4be79c8ac CAMEL-21021 - Camel-AWS-Secrets-Manager: Give the ability of refreshing the context on Secrets update by using Eventbridge service instead of pure Cloudtrail

This branch includes the following new commits:

     new 7acca82fb48 CAMEL-21021 - Camel-AWS-Secrets-Manager: Give the ability of refreshing the context on Secrets update by using Eventbridge service instead of pure Cloudtrail
     new 6d4be79c8ac CAMEL-21021 - Camel-AWS-Secrets-Manager: Give the ability of refreshing the context on Secrets update by using Eventbridge service instead of pure Cloudtrail

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/02: CAMEL-21021 - Camel-AWS-Secrets-Manager: Give the ability of refreshing the context on Secrets update by using Eventbridge service instead of pure Cloudtrail

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7acca82fb48d5954f731161162dd43cdf69399f7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 29 09:36:23 2024 +0200

    CAMEL-21021 - Camel-AWS-Secrets-Manager: Give the ability of refreshing the context on Secrets update by using Eventbridge service instead of pure Cloudtrail
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../apache/camel/vault/AwsVaultConfiguration.java  | 27 ++++++++++++++++++++++
 .../main/AwsVaultConfigurationConfigurer.java      | 12 ++++++++++
 .../AwsVaultConfigurationPropertiesConfigurer.java | 12 ++++++++++
 .../camel-main-configuration-metadata.json         |  2 ++
 core/camel-main/src/main/docs/main.adoc            |  4 +++-
 .../main/AwsVaultConfigurationProperties.java      | 17 ++++++++++++++
 .../java/org/apache/camel/main/MainVaultTest.java  | 24 +++++++++++++++++++
 7 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/core/camel-api/src/main/java/org/apache/camel/vault/AwsVaultConfiguration.java b/core/camel-api/src/main/java/org/apache/camel/vault/AwsVaultConfiguration.java
index e686031d21a..72ed6b656b7 100644
--- a/core/camel-api/src/main/java/org/apache/camel/vault/AwsVaultConfiguration.java
+++ b/core/camel-api/src/main/java/org/apache/camel/vault/AwsVaultConfiguration.java
@@ -41,6 +41,10 @@ public class AwsVaultConfiguration extends VaultConfiguration {
     private long refreshPeriod = 30000;
     @Metadata
     private String secrets;
+    @Metadata
+    private boolean useSqsNotification;
+    @Metadata
+    private String sqsQueueName;
 
     public String getAccessKey() {
         return accessKey;
@@ -140,4 +144,27 @@ public class AwsVaultConfiguration extends VaultConfiguration {
     public void setSecrets(String secrets) {
         this.secrets = secrets;
     }
+
+    public boolean isUseSqsNotification() {
+        return useSqsNotification;
+    }
+
+    /**
+     * Whether to use AWS SQS for secrets updates notification, this will require setting up Eventbridge/Cloudtrail/SQS
+     * communication
+     */
+    public void setUseSqsNotification(boolean useSqsNotification) {
+        this.useSqsNotification = useSqsNotification;
+    }
+
+    public String getSqsQueueName() {
+        return sqsQueueName;
+    }
+
+    /**
+     * In case of usage of SQS notification this field will specified the Queue name to use
+     */
+    public void setSqsQueueName(String sqsQueueName) {
+        this.sqsQueueName = sqsQueueName;
+    }
 }
diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
index 79ab686dbd4..12636eefeb5 100644
--- a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
+++ b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
@@ -47,6 +47,10 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "secretkey":
         case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "secrets": target.setSecrets(property(camelContext, java.lang.String.class, value)); return true;
+        case "sqsqueuename":
+        case "sqsQueueName": target.setSqsQueueName(property(camelContext, java.lang.String.class, value)); return true;
+        case "usesqsnotification":
+        case "useSqsNotification": target.setUseSqsNotification(property(camelContext, boolean.class, value)); return true;
         default: return false;
         }
     }
@@ -78,6 +82,10 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "secretkey":
         case "secretKey": return java.lang.String.class;
         case "secrets": return java.lang.String.class;
+        case "sqsqueuename":
+        case "sqsQueueName": return java.lang.String.class;
+        case "usesqsnotification":
+        case "useSqsNotification": return boolean.class;
         default: return null;
         }
     }
@@ -110,6 +118,10 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "secretkey":
         case "secretKey": return target.getSecretKey();
         case "secrets": return target.getSecrets();
+        case "sqsqueuename":
+        case "sqsQueueName": return target.getSqsQueueName();
+        case "usesqsnotification":
+        case "useSqsNotification": return target.isUseSqsNotification();
         default: return null;
         }
     }
diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
index de5336e6680..a61c7726914 100644
--- a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
+++ b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
@@ -47,6 +47,10 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "secretkey":
         case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "secrets": target.setSecrets(property(camelContext, java.lang.String.class, value)); return true;
+        case "sqsqueuename":
+        case "sqsQueueName": target.setSqsQueueName(property(camelContext, java.lang.String.class, value)); return true;
+        case "usesqsnotification":
+        case "useSqsNotification": target.setUseSqsNotification(property(camelContext, boolean.class, value)); return true;
         default: return false;
         }
     }
@@ -78,6 +82,10 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "secretkey":
         case "secretKey": return java.lang.String.class;
         case "secrets": return java.lang.String.class;
+        case "sqsqueuename":
+        case "sqsQueueName": return java.lang.String.class;
+        case "usesqsnotification":
+        case "useSqsNotification": return boolean.class;
         default: return null;
         }
     }
@@ -110,6 +118,10 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "secretkey":
         case "secretKey": return target.getSecretKey();
         case "secrets": return target.getSecrets();
+        case "sqsqueuename":
+        case "sqsQueueName": return target.getSqsQueueName();
+        case "usesqsnotification":
+        case "useSqsNotification": return target.isUseSqsNotification();
         default: return null;
         }
     }
diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index e917f1a6269..e313418d297 100644
--- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -306,6 +306,8 @@
     { "name": "camel.vault.aws.region", "description": "The AWS region", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.secretKey", "description": "The AWS secret key", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.secrets", "description": "Specify the secret names (or pattern) to check for updates. Multiple secrets can be separated by comma.", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.vault.aws.sqsQueueName", "description": "In case of usage of SQS notification this field will specified the Queue name to use", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.vault.aws.useSqsNotification", "description": "Whether to use AWS SQS for secrets updates notification, this will require setting up Eventbridge\/Cloudtrail\/SQS communication", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.vault.azure.azureIdentityEnabled", "description": "Whether the Azure Identity Authentication should be used or not.", "sourceType": "org.apache.camel.vault.AzureVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.vault.azure.blobAccessKey", "description": "The Eventhubs Blob Access Key for CheckpointStore purpose", "sourceType": "org.apache.camel.vault.AzureVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.azure.blobAccountName", "description": "The Eventhubs Blob Account Name for CheckpointStore purpose", "sourceType": "org.apache.camel.vault.AzureVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
diff --git a/core/camel-main/src/main/docs/main.adoc b/core/camel-main/src/main/docs/main.adoc
index 7933f980f5d..1cbf2c55858 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -325,7 +325,7 @@ The camel.rest supports 29 options, which are listed below.
 
 
 === Camel AWS Vault configurations
-The camel.vault.aws supports 9 options, which are listed below.
+The camel.vault.aws supports 11 options, which are listed below.
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
@@ -339,6 +339,8 @@ The camel.vault.aws supports 9 options, which are listed below.
 | *camel.vault.aws.region* | The AWS region |  | String
 | *camel.vault.aws.secretKey* | The AWS secret key |  | String
 | *camel.vault.aws.secrets* | Specify the secret names (or pattern) to check for updates. Multiple secrets can be separated by comma. |  | String
+| *camel.vault.aws.sqsQueueName* | In case of usage of SQS notification this field will specified the Queue name to use |  | String
+| *camel.vault.aws.useSqs{zwsp}Notification* | Whether to use AWS SQS for secrets updates notification, this will require setting up Eventbridge/Cloudtrail/SQS communication | false | boolean
 |===
 
 
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/AwsVaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/AwsVaultConfigurationProperties.java
index 9dc9e3d3a7e..bce45e8d3a9 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/AwsVaultConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/AwsVaultConfigurationProperties.java
@@ -121,4 +121,21 @@ public class AwsVaultConfigurationProperties extends AwsVaultConfiguration imple
         return this;
     }
 
+    /**
+     * Whether to use AWS SQS for secrets updates notification, this will require setting up Eventbridge/Cloudtrail/SQS
+     * communication
+     */
+    public AwsVaultConfigurationProperties withUseSqsNotification(boolean useSqsNotification) {
+        setUseSqsNotification(useSqsNotification);
+        return this;
+    }
+
+    /**
+     * In case of usage of SQS notification this field will specified the Queue name to use
+     */
+    public AwsVaultConfigurationProperties withSqsQueueName(String sqsQueueName) {
+        setSqsQueueName(sqsQueueName);
+        return this;
+    }
+
 }
diff --git a/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java b/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
index 312725ae10b..d70347ecf1e 100644
--- a/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
+++ b/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
@@ -82,11 +82,35 @@ public class MainVaultTest {
         main.addInitialProperty("camel.vault.aws.defaultCredentialsProvider", "false");
         main.addInitialProperty("camel.vault.aws.profileCredentialsProvider", "true");
         main.addInitialProperty("camel.vault.aws.profileName", "jack");
+        main.addInitialProperty("camel.vault.aws.sqsQueueName", "sqs-2");
+        main.addInitialProperty("camel.vault.aws.useSqsNotification", "true");
 
         main.start();
         return main;
     }
 
+    @Test
+    public void testUseSqsNotification() {
+        final Main main = getMain();
+
+        CamelContext context = main.getCamelContext();
+        assertNotNull(context);
+
+        AwsVaultConfiguration cfg = context.getVaultConfiguration().aws();
+        assertNotNull(cfg);
+
+        Assertions.assertEquals("myKey", cfg.getAccessKey());
+        Assertions.assertEquals("mySecret", cfg.getSecretKey());
+        Assertions.assertEquals("myRegion", cfg.getRegion());
+        Assertions.assertFalse(cfg.isDefaultCredentialsProvider());
+        Assertions.assertTrue(cfg.isProfileCredentialsProvider());
+        Assertions.assertEquals("jack", cfg.getProfileName());
+        Assertions.assertEquals("sqs-2", cfg.getSqsQueueName());
+        Assertions.assertTrue(cfg.isUseSqsNotification());
+
+        main.stop();
+    }
+
     @Test
     public void testMainAwsFluent() {
         Main main = new Main();


(camel) 02/02: CAMEL-21021 - Camel-AWS-Secrets-Manager: Give the ability of refreshing the context on Secrets update by using Eventbridge service instead of pure Cloudtrail

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6d4be79c8ac538096fecbe86a9870e7acfd1bac6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 29 12:25:36 2024 +0200

    CAMEL-21021 - Camel-AWS-Secrets-Manager: Give the ability of refreshing the context on Secrets update by using Eventbridge service instead of pure Cloudtrail
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../main/camel-main-configuration-metadata.json    |   2 +
 .../camel-aws/camel-aws-secrets-manager/pom.xml    |   5 +
 .../vault/CloudTrailReloadTriggerTask.java         | 195 ++++++++++++++++-----
 .../apache/camel/vault/AwsVaultConfiguration.java  |  12 +-
 .../main/AwsVaultConfigurationConfigurer.java      |  12 +-
 .../AwsVaultConfigurationPropertiesConfigurer.java |  12 +-
 .../camel-main-configuration-metadata.json         |   2 +-
 core/camel-main/src/main/docs/main.adoc            |   2 +-
 .../main/AwsVaultConfigurationProperties.java      |   6 +-
 .../java/org/apache/camel/main/MainVaultTest.java  |   4 +-
 10 files changed, 181 insertions(+), 71 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index e917f1a6269..70262ec7595 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -306,6 +306,8 @@
     { "name": "camel.vault.aws.region", "description": "The AWS region", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.secretKey", "description": "The AWS secret key", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.secrets", "description": "Specify the secret names (or pattern) to check for updates. Multiple secrets can be separated by comma.", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.vault.aws.sqsQueueUrl", "description": "In case of usage of SQS notification this field will specified the Queue URL to use", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.vault.aws.useSqsNotification", "description": "Whether to use AWS SQS for secrets updates notification, this will require setting up Eventbridge\/Cloudtrail\/SQS communication", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.vault.azure.azureIdentityEnabled", "description": "Whether the Azure Identity Authentication should be used or not.", "sourceType": "org.apache.camel.vault.AzureVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.vault.azure.blobAccessKey", "description": "The Eventhubs Blob Access Key for CheckpointStore purpose", "sourceType": "org.apache.camel.vault.AzureVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.azure.blobAccountName", "description": "The Eventhubs Blob Account Name for CheckpointStore purpose", "sourceType": "org.apache.camel.vault.AzureVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
diff --git a/components/camel-aws/camel-aws-secrets-manager/pom.xml b/components/camel-aws/camel-aws-secrets-manager/pom.xml
index 0434ae80ebf..3642b67f0a3 100644
--- a/components/camel-aws/camel-aws-secrets-manager/pom.xml
+++ b/components/camel-aws/camel-aws-secrets-manager/pom.xml
@@ -56,6 +56,11 @@
             <artifactId>cloudtrail</artifactId>
             <version>${aws-java-sdk2-version}</version>
         </dependency>
+        <dependency>
+            <groupId>software.amazon.awssdk</groupId>
+            <artifactId>sqs</artifactId>
+            <version>${aws-java-sdk2-version}</version>
+        </dependency>
         <dependency>
             <groupId>software.amazon.awssdk</groupId>
             <artifactId>apache-client</artifactId>
diff --git a/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/vault/CloudTrailReloadTriggerTask.java b/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/vault/CloudTrailReloadTriggerTask.java
index 3a810c218a9..a1412c09b18 100644
--- a/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/vault/CloudTrailReloadTriggerTask.java
+++ b/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/vault/CloudTrailReloadTriggerTask.java
@@ -24,6 +24,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.camel.RuntimeCamelException;
@@ -50,6 +53,13 @@ import software.amazon.awssdk.services.cloudtrail.model.LookupAttributeKey;
 import software.amazon.awssdk.services.cloudtrail.model.LookupEventsRequest;
 import software.amazon.awssdk.services.cloudtrail.model.LookupEventsResponse;
 import software.amazon.awssdk.services.cloudtrail.model.Resource;
+import software.amazon.awssdk.services.sqs.SqsClient;
+import software.amazon.awssdk.services.sqs.SqsClientBuilder;
+import software.amazon.awssdk.services.sqs.model.DeleteMessageRequest;
+import software.amazon.awssdk.services.sqs.model.Message;
+import software.amazon.awssdk.services.sqs.model.QueueDoesNotExistException;
+import software.amazon.awssdk.services.sqs.model.ReceiveMessageRequest;
+import software.amazon.awssdk.services.sqs.model.ReceiveMessageResponse;
 
 /**
  * Period task which checks if AWS secrets has been updated and can trigger Camel to be reloaded.
@@ -69,6 +79,12 @@ public class CloudTrailReloadTriggerTask extends ServiceSupport implements Camel
     private static final String CAMEL_AWS_VAULT_PROFILE_NAME_ENV
             = "CAMEL_AWS_VAULT_PROFILE_NAME";
 
+    private static final String CAMEL_AWS_VAULT_SQS_QUEUE_URL_ENV
+            = "CAMEL_AWS_VAULT_SQS_QUEUE_URL";
+
+    private static final String CAMEL_AWS_VAULT_USE_SQS_NOTIFICATION_ENV
+            = "CAMEL_AWS_VAULT_USE_SQS_NOTIFICATION";
+
     private static final Logger LOG = LoggerFactory.getLogger(CloudTrailReloadTriggerTask.class);
     private static final String SECRETSMANAGER_AMAZONAWS_COM = "secretsmanager.amazonaws.com";
 
@@ -78,11 +94,14 @@ public class CloudTrailReloadTriggerTask extends ServiceSupport implements Camel
     private boolean reloadEnabled = true;
     private String secrets;
     private CloudTrailClient cloudTrailClient;
+    private SqsClient sqsClient;
     private SecretsManagerPropertiesFunction propertiesFunction;
     private volatile Instant lastTime;
     private volatile Instant lastCheckTime;
     private volatile Instant lastReloadTime;
     private final Map<String, Instant> updates = new HashMap<>();
+    private boolean useSqsNotification;
+    private String queueUrl;
 
     public CloudTrailReloadTriggerTask() {
     }
@@ -153,7 +172,10 @@ public class CloudTrailReloadTriggerTask extends ServiceSupport implements Camel
                 = Boolean.parseBoolean(System.getenv(CAMEL_AWS_VAULT_USE_DEFAULT_CREDENTIALS_PROVIDER_ENV));
         boolean useProfileCredentialsProvider
                 = Boolean.parseBoolean(System.getenv(CAMEL_AWS_VAULT_USE_PROFILE_CREDENTIALS_PROVIDER_ENV));
+        useSqsNotification
+                = Boolean.parseBoolean(System.getenv(CAMEL_AWS_VAULT_USE_SQS_NOTIFICATION_ENV));
         String profileName = System.getenv(CAMEL_AWS_VAULT_PROFILE_NAME_ENV);
+        queueUrl = System.getenv(CAMEL_AWS_VAULT_SQS_QUEUE_URL_ENV);
         if (ObjectHelper.isEmpty(accessKey) && ObjectHelper.isEmpty(secretKey) && ObjectHelper.isEmpty(region)) {
             AwsVaultConfiguration awsVaultConfiguration = getCamelContext().getVaultConfiguration().aws();
             if (ObjectHelper.isNotEmpty(awsVaultConfiguration)) {
@@ -163,26 +185,50 @@ public class CloudTrailReloadTriggerTask extends ServiceSupport implements Camel
                 useDefaultCredentialsProvider = awsVaultConfiguration.isDefaultCredentialsProvider();
                 useProfileCredentialsProvider = awsVaultConfiguration.isProfileCredentialsProvider();
                 profileName = awsVaultConfiguration.getProfileName();
+                useSqsNotification = awsVaultConfiguration.isUseSqsNotification();
+                queueUrl = awsVaultConfiguration.getSqsQueueUrl();
             }
         }
-        if (ObjectHelper.isNotEmpty(accessKey) && ObjectHelper.isNotEmpty(secretKey) && ObjectHelper.isNotEmpty(region)) {
-            CloudTrailClientBuilder clientBuilder = CloudTrailClient.builder();
-            AwsBasicCredentials cred = AwsBasicCredentials.create(accessKey, secretKey);
-            clientBuilder = clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
-            clientBuilder.region(Region.of(region));
-            cloudTrailClient = clientBuilder.build();
-        } else if (useDefaultCredentialsProvider && ObjectHelper.isNotEmpty(region)) {
-            CloudTrailClientBuilder clientBuilder = CloudTrailClient.builder();
-            clientBuilder.region(Region.of(region));
-            cloudTrailClient = clientBuilder.build();
-        } else if (useProfileCredentialsProvider && ObjectHelper.isNotEmpty(profileName)) {
-            CloudTrailClientBuilder clientBuilder = CloudTrailClient.builder();
-            clientBuilder.credentialsProvider(ProfileCredentialsProvider.create(profileName));
-            clientBuilder.region(Region.of(region));
-            cloudTrailClient = clientBuilder.build();
+        if (!useSqsNotification) {
+            if (ObjectHelper.isNotEmpty(accessKey) && ObjectHelper.isNotEmpty(secretKey) && ObjectHelper.isNotEmpty(region)) {
+                CloudTrailClientBuilder clientBuilder = CloudTrailClient.builder();
+                AwsBasicCredentials cred = AwsBasicCredentials.create(accessKey, secretKey);
+                clientBuilder = clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
+                clientBuilder.region(Region.of(region));
+                cloudTrailClient = clientBuilder.build();
+            } else if (useDefaultCredentialsProvider && ObjectHelper.isNotEmpty(region)) {
+                CloudTrailClientBuilder clientBuilder = CloudTrailClient.builder();
+                clientBuilder.region(Region.of(region));
+                cloudTrailClient = clientBuilder.build();
+            } else if (useProfileCredentialsProvider && ObjectHelper.isNotEmpty(profileName)) {
+                CloudTrailClientBuilder clientBuilder = CloudTrailClient.builder();
+                clientBuilder.credentialsProvider(ProfileCredentialsProvider.create(profileName));
+                clientBuilder.region(Region.of(region));
+                cloudTrailClient = clientBuilder.build();
+            } else {
+                throw new RuntimeCamelException(
+                        "Using the AWS Secrets Refresh Task requires setting AWS credentials as application properties or environment variables");
+            }
         } else {
-            throw new RuntimeCamelException(
-                    "Using the AWS Secrets Refresh Task requires setting AWS credentials as application properties or environment variables");
+            if (ObjectHelper.isNotEmpty(accessKey) && ObjectHelper.isNotEmpty(secretKey) && ObjectHelper.isNotEmpty(region)) {
+                SqsClientBuilder clientBuilder = SqsClient.builder();
+                AwsBasicCredentials cred = AwsBasicCredentials.create(accessKey, secretKey);
+                clientBuilder = clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
+                clientBuilder.region(Region.of(region));
+                sqsClient = clientBuilder.build();
+            } else if (useDefaultCredentialsProvider && ObjectHelper.isNotEmpty(region)) {
+                SqsClientBuilder clientBuilder = SqsClient.builder();
+                clientBuilder.region(Region.of(region));
+                sqsClient = clientBuilder.build();
+            } else if (useProfileCredentialsProvider && ObjectHelper.isNotEmpty(profileName)) {
+                SqsClientBuilder clientBuilder = SqsClient.builder();
+                clientBuilder.credentialsProvider(ProfileCredentialsProvider.create(profileName));
+                clientBuilder.region(Region.of(region));
+                sqsClient = clientBuilder.build();
+            } else {
+                throw new RuntimeCamelException(
+                        "Using the AWS Secrets Refresh Task requires setting AWS credentials as application properties or environment variables");
+            }
         }
     }
 
@@ -199,6 +245,15 @@ public class CloudTrailReloadTriggerTask extends ServiceSupport implements Camel
             cloudTrailClient = null;
         }
 
+        if (sqsClient != null) {
+            try {
+                sqsClient.close();
+            } catch (Exception e) {
+                // ignore
+            }
+            sqsClient = null;
+        }
+
         updates.clear();
     }
 
@@ -207,46 +262,94 @@ public class CloudTrailReloadTriggerTask extends ServiceSupport implements Camel
         lastCheckTime = Instant.now();
         boolean triggerReloading = false;
 
-        try {
-            LookupEventsRequest.Builder eventsRequestBuilder = LookupEventsRequest.builder()
-                    .maxResults(100).lookupAttributes(LookupAttribute.builder().attributeKey(LookupAttributeKey.EVENT_SOURCE)
-                            .attributeValue(SECRETSMANAGER_AMAZONAWS_COM).build());
+        if (!useSqsNotification) {
 
-            if (lastTime != null) {
-                eventsRequestBuilder.startTime(lastTime.plusMillis(1000));
-            }
+            try {
+                LookupEventsRequest.Builder eventsRequestBuilder = LookupEventsRequest.builder()
+                        .maxResults(100)
+                        .lookupAttributes(LookupAttribute.builder().attributeKey(LookupAttributeKey.EVENT_SOURCE)
+                                .attributeValue(SECRETSMANAGER_AMAZONAWS_COM).build());
 
-            LookupEventsRequest lookupEventsRequest = eventsRequestBuilder.build();
+                if (lastTime != null) {
+                    eventsRequestBuilder.startTime(lastTime.plusMillis(1000));
+                }
 
-            LookupEventsResponse response = cloudTrailClient.lookupEvents(lookupEventsRequest);
-            List<Event> events = response.events();
+                LookupEventsRequest lookupEventsRequest = eventsRequestBuilder.build();
 
-            if (!events.isEmpty()) {
-                lastTime = events.get(0).eventTime();
-            }
+                LookupEventsResponse response = cloudTrailClient.lookupEvents(lookupEventsRequest);
+                List<Event> events = response.events();
 
-            LOG.debug("Found {} events", events.size());
-            for (Event event : events) {
-                if (event.eventSource().equalsIgnoreCase(SECRETSMANAGER_AMAZONAWS_COM)) {
-                    if (event.eventName().equalsIgnoreCase(SECRETSMANAGER_UPDATE_EVENT)) {
-                        List<Resource> a = event.resources();
-                        for (Resource res : a) {
-                            String name = res.resourceName();
-                            if (matchSecret(name)) {
-                                updates.put(name, event.eventTime());
-                                if (isReloadEnabled()) {
-                                    LOG.info("Update for AWS secret: {} detected, triggering CamelContext reload", name);
-                                    triggerReloading = true;
+                if (!events.isEmpty()) {
+                    lastTime = events.get(0).eventTime();
+                }
+
+                LOG.debug("Found {} events", events.size());
+                for (Event event : events) {
+                    if (event.eventSource().equalsIgnoreCase(SECRETSMANAGER_AMAZONAWS_COM)) {
+                        if (event.eventName().equalsIgnoreCase(SECRETSMANAGER_UPDATE_EVENT)) {
+                            List<Resource> a = event.resources();
+                            for (Resource res : a) {
+                                String name = res.resourceName();
+                                if (matchSecret(name)) {
+                                    updates.put(name, event.eventTime());
+                                    if (isReloadEnabled()) {
+                                        LOG.info("Update for AWS secret: {} detected, triggering CamelContext reload", name);
+                                        triggerReloading = true;
+                                    }
+                                    break;
                                 }
-                                break;
                             }
                         }
                     }
                 }
+            } catch (Exception e) {
+                LOG.warn(
+                        "Error during AWS Secrets Refresh Task due to {}. This exception is ignored. Will try again on next run.",
+                        e.getMessage(), e);
+            }
+        } else {
+            ReceiveMessageRequest.Builder request = ReceiveMessageRequest.builder().queueUrl(queueUrl);
+
+            LOG.trace("Receiving messages with request [{}]...", request);
+
+            ReceiveMessageResponse messageResult = null;
+            ReceiveMessageRequest requestBuild = request.build();
+            try {
+                messageResult = sqsClient.receiveMessage(requestBuild);
+            } catch (QueueDoesNotExistException e) {
+                LOG.info("Queue does not exist.");
+            }
+
+            for (Message message : messageResult.messages()) {
+                ObjectMapper mapper = new ObjectMapper();
+                JsonNode event = null;
+                try {
+                    event = mapper.readTree(message.body());
+                } catch (JsonProcessingException e) {
+                    throw new RuntimeException(e);
+                }
+                if (event.get("detail").get("eventSource").asText().equalsIgnoreCase(SECRETSMANAGER_AMAZONAWS_COM)) {
+                    if (event.get("detail").get("eventName").asText().equalsIgnoreCase(SECRETSMANAGER_UPDATE_EVENT)) {
+                        String name = event.get("detail").get("requestParameters").get("secretId").asText();
+                        if (matchSecret(name)) {
+                            updates.put(name, Instant.parse(event.get("detail").get("eventTime").asText()));
+                            if (isReloadEnabled()) {
+                                LOG.info("Update for AWS secret: {} detected, triggering CamelContext reload", name);
+                                triggerReloading = true;
+                                message.receiptHandle();
+                                DeleteMessageRequest.Builder deleteRequest
+                                        = DeleteMessageRequest.builder().queueUrl(queueUrl)
+                                                .receiptHandle(message.receiptHandle());
+
+                                LOG.trace("Deleting message with receipt handle {}...", message.receiptHandle());
+
+                                sqsClient.deleteMessage(deleteRequest.build());
+                            }
+                            break;
+                        }
+                    }
+                }
             }
-        } catch (Exception e) {
-            LOG.warn("Error during AWS Secrets Refresh Task due to {}. This exception is ignored. Will try again on next run.",
-                    e.getMessage(), e);
         }
 
         if (triggerReloading) {
diff --git a/core/camel-api/src/main/java/org/apache/camel/vault/AwsVaultConfiguration.java b/core/camel-api/src/main/java/org/apache/camel/vault/AwsVaultConfiguration.java
index 72ed6b656b7..0423e106ade 100644
--- a/core/camel-api/src/main/java/org/apache/camel/vault/AwsVaultConfiguration.java
+++ b/core/camel-api/src/main/java/org/apache/camel/vault/AwsVaultConfiguration.java
@@ -44,7 +44,7 @@ public class AwsVaultConfiguration extends VaultConfiguration {
     @Metadata
     private boolean useSqsNotification;
     @Metadata
-    private String sqsQueueName;
+    private String sqsQueueUrl;
 
     public String getAccessKey() {
         return accessKey;
@@ -157,14 +157,14 @@ public class AwsVaultConfiguration extends VaultConfiguration {
         this.useSqsNotification = useSqsNotification;
     }
 
-    public String getSqsQueueName() {
-        return sqsQueueName;
+    public String getSqsQueueUrl() {
+        return sqsQueueUrl;
     }
 
     /**
-     * In case of usage of SQS notification this field will specified the Queue name to use
+     * In case of usage of SQS notification this field will specified the Queue URL to use
      */
-    public void setSqsQueueName(String sqsQueueName) {
-        this.sqsQueueName = sqsQueueName;
+    public void setSqsQueueUrl(String sqsQueueUrl) {
+        this.sqsQueueUrl = sqsQueueUrl;
     }
 }
diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
index 12636eefeb5..0ce5b71f0bd 100644
--- a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
+++ b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationConfigurer.java
@@ -47,8 +47,8 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "secretkey":
         case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "secrets": target.setSecrets(property(camelContext, java.lang.String.class, value)); return true;
-        case "sqsqueuename":
-        case "sqsQueueName": target.setSqsQueueName(property(camelContext, java.lang.String.class, value)); return true;
+        case "sqsqueueurl":
+        case "sqsQueueUrl": target.setSqsQueueUrl(property(camelContext, java.lang.String.class, value)); return true;
         case "usesqsnotification":
         case "useSqsNotification": target.setUseSqsNotification(property(camelContext, boolean.class, value)); return true;
         default: return false;
@@ -82,8 +82,8 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "secretkey":
         case "secretKey": return java.lang.String.class;
         case "secrets": return java.lang.String.class;
-        case "sqsqueuename":
-        case "sqsQueueName": return java.lang.String.class;
+        case "sqsqueueurl":
+        case "sqsQueueUrl": return java.lang.String.class;
         case "usesqsnotification":
         case "useSqsNotification": return boolean.class;
         default: return null;
@@ -118,8 +118,8 @@ public class AwsVaultConfigurationConfigurer extends org.apache.camel.support.co
         case "secretkey":
         case "secretKey": return target.getSecretKey();
         case "secrets": return target.getSecrets();
-        case "sqsqueuename":
-        case "sqsQueueName": return target.getSqsQueueName();
+        case "sqsqueueurl":
+        case "sqsQueueUrl": return target.getSqsQueueUrl();
         case "usesqsnotification":
         case "useSqsNotification": return target.isUseSqsNotification();
         default: return null;
diff --git a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
index a61c7726914..01dca63e5c4 100644
--- a/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
+++ b/core/camel-main/src/generated/java/org/apache/camel/main/AwsVaultConfigurationPropertiesConfigurer.java
@@ -47,8 +47,8 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "secretkey":
         case "secretKey": target.setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
         case "secrets": target.setSecrets(property(camelContext, java.lang.String.class, value)); return true;
-        case "sqsqueuename":
-        case "sqsQueueName": target.setSqsQueueName(property(camelContext, java.lang.String.class, value)); return true;
+        case "sqsqueueurl":
+        case "sqsQueueUrl": target.setSqsQueueUrl(property(camelContext, java.lang.String.class, value)); return true;
         case "usesqsnotification":
         case "useSqsNotification": target.setUseSqsNotification(property(camelContext, boolean.class, value)); return true;
         default: return false;
@@ -82,8 +82,8 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "secretkey":
         case "secretKey": return java.lang.String.class;
         case "secrets": return java.lang.String.class;
-        case "sqsqueuename":
-        case "sqsQueueName": return java.lang.String.class;
+        case "sqsqueueurl":
+        case "sqsQueueUrl": return java.lang.String.class;
         case "usesqsnotification":
         case "useSqsNotification": return boolean.class;
         default: return null;
@@ -118,8 +118,8 @@ public class AwsVaultConfigurationPropertiesConfigurer extends org.apache.camel.
         case "secretkey":
         case "secretKey": return target.getSecretKey();
         case "secrets": return target.getSecrets();
-        case "sqsqueuename":
-        case "sqsQueueName": return target.getSqsQueueName();
+        case "sqsqueueurl":
+        case "sqsQueueUrl": return target.getSqsQueueUrl();
         case "usesqsnotification":
         case "useSqsNotification": return target.isUseSqsNotification();
         default: return null;
diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index e313418d297..70262ec7595 100644
--- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -306,7 +306,7 @@
     { "name": "camel.vault.aws.region", "description": "The AWS region", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.secretKey", "description": "The AWS secret key", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.secrets", "description": "Specify the secret names (or pattern) to check for updates. Multiple secrets can be separated by comma.", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
-    { "name": "camel.vault.aws.sqsQueueName", "description": "In case of usage of SQS notification this field will specified the Queue name to use", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
+    { "name": "camel.vault.aws.sqsQueueUrl", "description": "In case of usage of SQS notification this field will specified the Queue URL to use", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
     { "name": "camel.vault.aws.useSqsNotification", "description": "Whether to use AWS SQS for secrets updates notification, this will require setting up Eventbridge\/Cloudtrail\/SQS communication", "sourceType": "org.apache.camel.vault.AwsVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.vault.azure.azureIdentityEnabled", "description": "Whether the Azure Identity Authentication should be used or not.", "sourceType": "org.apache.camel.vault.AzureVaultConfiguration", "type": "boolean", "javaType": "boolean", "defaultValue": "false" },
     { "name": "camel.vault.azure.blobAccessKey", "description": "The Eventhubs Blob Access Key for CheckpointStore purpose", "sourceType": "org.apache.camel.vault.AzureVaultConfiguration", "type": "string", "javaType": "java.lang.String" },
diff --git a/core/camel-main/src/main/docs/main.adoc b/core/camel-main/src/main/docs/main.adoc
index 1cbf2c55858..7a6d6ae1b19 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -339,7 +339,7 @@ The camel.vault.aws supports 11 options, which are listed below.
 | *camel.vault.aws.region* | The AWS region |  | String
 | *camel.vault.aws.secretKey* | The AWS secret key |  | String
 | *camel.vault.aws.secrets* | Specify the secret names (or pattern) to check for updates. Multiple secrets can be separated by comma. |  | String
-| *camel.vault.aws.sqsQueueName* | In case of usage of SQS notification this field will specified the Queue name to use |  | String
+| *camel.vault.aws.sqsQueueUrl* | In case of usage of SQS notification this field will specified the Queue URL to use |  | String
 | *camel.vault.aws.useSqs{zwsp}Notification* | Whether to use AWS SQS for secrets updates notification, this will require setting up Eventbridge/Cloudtrail/SQS communication | false | boolean
 |===
 
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/AwsVaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/AwsVaultConfigurationProperties.java
index bce45e8d3a9..6684163502a 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/AwsVaultConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/AwsVaultConfigurationProperties.java
@@ -131,10 +131,10 @@ public class AwsVaultConfigurationProperties extends AwsVaultConfiguration imple
     }
 
     /**
-     * In case of usage of SQS notification this field will specified the Queue name to use
+     * In case of usage of SQS notification this field will specified the Queue URL to use
      */
-    public AwsVaultConfigurationProperties withSqsQueueName(String sqsQueueName) {
-        setSqsQueueName(sqsQueueName);
+    public AwsVaultConfigurationProperties withSqsQueueName(String sqsQueueUrl) {
+        setSqsQueueUrl(sqsQueueUrl);
         return this;
     }
 
diff --git a/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java b/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
index d70347ecf1e..92319681a21 100644
--- a/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
+++ b/core/camel-main/src/test/java/org/apache/camel/main/MainVaultTest.java
@@ -82,7 +82,7 @@ public class MainVaultTest {
         main.addInitialProperty("camel.vault.aws.defaultCredentialsProvider", "false");
         main.addInitialProperty("camel.vault.aws.profileCredentialsProvider", "true");
         main.addInitialProperty("camel.vault.aws.profileName", "jack");
-        main.addInitialProperty("camel.vault.aws.sqsQueueName", "sqs-2");
+        main.addInitialProperty("camel.vault.aws.sqsQueueName", "http://sqs-2");
         main.addInitialProperty("camel.vault.aws.useSqsNotification", "true");
 
         main.start();
@@ -105,7 +105,7 @@ public class MainVaultTest {
         Assertions.assertFalse(cfg.isDefaultCredentialsProvider());
         Assertions.assertTrue(cfg.isProfileCredentialsProvider());
         Assertions.assertEquals("jack", cfg.getProfileName());
-        Assertions.assertEquals("sqs-2", cfg.getSqsQueueName());
+        Assertions.assertEquals("http://sqs-2", cfg.getSqsQueueUrl());
         Assertions.assertTrue(cfg.isUseSqsNotification());
 
         main.stop();