[
https://issues.apache.org/jira/browse/CAMEL-26254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-26254.
---------------------------------
Resolution: Fixed
Fixed via https://github.com/apache/camel/pull/28973 (merged as 64ab57e4dc34 on
main).
_Claude Code on behalf of davsclaus_
> camel-ibm-secrets-manager - getSecret and updateSecret fail for secret types
> other than arbitrary, kv and service_credentials, and createKVSecret rejects
> JSON text
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26254
> URL: https://issues.apache.org/jira/browse/CAMEL-26254
> Project: Camel
> Issue Type: Bug
> Reporter: Claus Ibsen
> Assignee: Andrea Cosentino
> Priority: Minor
> Fix For: 4.24.0
>
>
> Found while adding the catalog body types of ibm-secrets-manager
> (CAMEL-24961, PR #28404).
> h4. 1. getSecret and updateSecret fail for the other secret types
> {{IBMSecretsManagerProducer.getSecret}} (main 2a465aa4814c, lines 129-143)
> handles {{arbitrary}}, {{kv}} and {{service_credentials}} only and throws
> "Unsupported secret type" for the other types IBM Secrets Manager has
> ({{imported_cert}}, {{username_password}}, {{private_cert}}, {{public_cert}},
> {{iam_credentials}}); {{updateSecret}} (lines 177-203) handles arbitrary and
> kv only. Checked on 4.24.0-SNAPSHOT with the real SDK against a JDK
> {{HttpServer}} fake.
> Proposed: return the {{Secret}} object for the other types (as
> service_credentials does), and say in the docs which types update supports.
> h4. 2. createKVSecret does not accept JSON text
> {{createKVSecret}} (line 100) reads the body with {{getBody(Map.class)}}, and
> there is no String to Map conversion, so a JSON object text fails "Secret
> data must be provided as a Map". Checked on 4.24.0-SNAPSHOT with the fake.
> Proposed: parse a JSON text body into a Map.
> h4. 3. A Map or POJO body is stored as its toString for arbitrary secrets
> {{createArbitrarySecret}} (line 73) and {{updateSecret}} (line 181) read the
> payload as String, so a Map or POJO body is stored as {{{key=value}}}.
> Checked on 4.24.0-SNAPSHOT with the fake.
> Proposed: store a Map or POJO as JSON, or reject it.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)