[ 
https://issues.apache.org/jira/browse/CAMEL-26253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino reassigned CAMEL-26253:
----------------------------------------

    Assignee: Andrea Cosentino

> camel-google-secret-manager - createSecret without a body creates the secret 
> and then fails, and pojoRequest=true createSecret only adds a version
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26253
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26253
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-google
>            Reporter: Claus Ibsen
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Found while adding the catalog body types of google-secret-manager 
> (CAMEL-24961, PR #28404).
> h4. 1. createSecret without a body leaves an empty secret behind
> {{GoogleSecretManagerProducer.createSecret}} (main 2a465aa4814c, lines 84-88) 
> first creates the secret, then calls 
> {{ByteString.copyFromUtf8(getBody(String.class))}}, which fails with a 
> NullPointerException when there is no body; the secret stays without a 
> version. Checked on 4.24.0-SNAPSHOT with a Mockito mock of the 
> {{SecretManagerServiceClient}}.
> Proposed: check the payload before creating the secret.
> h4. 2. pojoRequest=true createSecret never creates the secret
> With {{pojoRequest}} (lines 72-74) the body must be an 
> {{AddSecretVersionRequest}} and only {{addSecretVersion}} is called, so 
> createSecret with pojoRequest only works for a secret that exists already. 
> Checked on 4.24.0-SNAPSHOT with the mock client.
> Proposed: accept a {{CreateSecretRequest}} for createSecret with pojoRequest 
> (and keep {{AddSecretVersionRequest}} working), or document it.
> h4. 3. Doc: the operations heading names the wrong component
> {{google-secret-manager-component.adoc}} (line 579) says "Google Functions 
> component provides the following operation on the producer side".
> Proposed: say Google Secret Manager.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to