oscerd commented on code in PR #4794:
URL: https://github.com/apache/camel-k/pull/4794#discussion_r1347069231


##########
addons/vault/aws/aws_secrets_manager.go:
##########
@@ -106,8 +112,20 @@ func (t *awsSecretsManagerTrait) Apply(environment 
*trait.Environment) error {
        }
 
        if environment.IntegrationInRunningPhases() {
-               environment.ApplicationProperties["camel.vault.aws.accessKey"] 
= t.AccessKey
-               environment.ApplicationProperties["camel.vault.aws.secretKey"] 
= t.SecretKey
+               hits := rex.FindAllStringSubmatch(t.AccessKey, -1)
+               if len(hits) >= 1 {
+                       var res, _ = v1.DecodeValueSource(t.AccessKey, 
"aws-access-key", "The access Key provided is not valid")
+                       
environment.ApplicationProperties["camel.vault.aws.accessKey"] = 
res.SecretKeyRef.Key

Review Comment:
   It should be done now.



##########
addons/vault/aws/aws_secrets_manager_test.go:
##########
@@ -75,6 +75,28 @@ func TestAwsSecretsManagerTraitNoDefaultCreds(t *testing.T) {
        assert.Equal(t, "false", 
e.ApplicationProperties["camel.vault.aws.defaultCredentialsProvider"])
 }
 
+func TestAwsSecretsManagerTraitWithSecrets(t *testing.T) {

Review Comment:
   It should be done now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to