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

Claus Ibsen updated CAMEL-27855:
--------------------------------
    Description: 
Found while improving the option descriptions of camel-aws-secrets-manager for 
CAMEL-23832 (commit 
https://github.com/apache/camel/commit/f9e89282ea330ac399422c39806c46d8db9c4777,
 pull request https://github.com/apache/camel/pull/31144).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. A non-boolean force deletion header gives NullPointerException
{{SecretsManagerProducer.deleteSecret}} does if (secretForceDeletion) on a 
Boolean header; a value such as "yes" converts to null.
Proposed change: use Boolean.TRUE.equals(...), or fail with a clear message.

h4. 2. Comma-separated headers are not trimmed
batchGetSecret and replicateSecretToRegions split with split(",") without 
trimming, so "a, b" sends " b" and " eu-west-1" is sent as a region.
Proposed change: trim each part and skip empty ones.

h4. 3. updateSecret always needs a body
updateSecret calls getMandatoryBody, so you cannot change only the description 
without pojoRequest, and a body is always stored as a new secret version.
Proposed change: set the secret value only when there is a body.

h4. 4. listSecrets returns only the first page
There is no nextToken header and no paginator.
Proposed change: add a next-token header or use the paginator.


_Claude Code on behalf of davsclaus_

  was:
Found while improving the option descriptions of camel-aws-secrets-manager for 
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31144).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. A non-boolean force deletion header gives NullPointerException
{{SecretsManagerProducer.deleteSecret}} does if (secretForceDeletion) on a 
Boolean header; a value such as "yes" converts to null.
Proposed change: use Boolean.TRUE.equals(...), or fail with a clear message.

h4. 2. Comma-separated headers are not trimmed
batchGetSecret and replicateSecretToRegions split with split(",") without 
trimming, so "a, b" sends " b" and " eu-west-1" is sent as a region.
Proposed change: trim each part and skip empty ones.

h4. 3. updateSecret always needs a body
updateSecret calls getMandatoryBody, so you cannot change only the description 
without pojoRequest, and a body is always stored as a new secret version.
Proposed change: set the secret value only when there is a body.

h4. 4. listSecrets returns only the first page
There is no nextToken header and no paginator.
Proposed change: add a next-token header or use the paginator.


_Claude Code on behalf of davsclaus_


> camel-aws-secrets-manager: a non-boolean force deletion header gives 
> NullPointerException, list headers are not trimmed, updateSecret always needs 
> a body
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27855
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27855
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-aws-secrets-manager 
> for CAMEL-23832 (commit 
> https://github.com/apache/camel/commit/f9e89282ea330ac399422c39806c46d8db9c4777,
>  pull request https://github.com/apache/camel/pull/31144).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. A non-boolean force deletion header gives NullPointerException
> {{SecretsManagerProducer.deleteSecret}} does if (secretForceDeletion) on a 
> Boolean header; a value such as "yes" converts to null.
> Proposed change: use Boolean.TRUE.equals(...), or fail with a clear message.
> h4. 2. Comma-separated headers are not trimmed
> batchGetSecret and replicateSecretToRegions split with split(",") without 
> trimming, so "a, b" sends " b" and " eu-west-1" is sent as a region.
> Proposed change: trim each part and skip empty ones.
> h4. 3. updateSecret always needs a body
> updateSecret calls getMandatoryBody, so you cannot change only the 
> description without pojoRequest, and a body is always stored as a new secret 
> version.
> Proposed change: set the secret value only when there is a body.
> h4. 4. listSecrets returns only the first page
> There is no nextToken header and no paginator.
> Proposed change: add a next-token header or use the paginator.
> _Claude Code on behalf of davsclaus_



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

Reply via email to