Claus Ibsen created CAMEL-26255:
-----------------------------------
Summary: camel-hashicorp-vault - with cloud=true and no namespace,
getSecret fails with Path must not be empty and listSecrets returns an empty
list
Key: CAMEL-26255
URL: https://issues.apache.org/jira/browse/CAMEL-26255
Project: Camel
Issue Type: Bug
Components: camel-hashicorp-vault
Reporter: Claus Ibsen
Fix For: 4.24.0
Found while adding the catalog body types of hashicorp-vault (CAMEL-24961, PR
#28404).
h4. 1. cloud=true without a namespace
{{HashicorpVaultProducer.getSecret}} (main 2a465aa4814c, lines 72-79) and
{{listSecrets}} (lines 101-110) only build the path when {{namespace}} is set
in cloud mode. Without it getSecret reads the path "" and fails "Path must not
be empty", and listSecrets returns an empty list without an error. Checked on
4.24.0-SNAPSHOT with a Vault dev server (test-infra).
Proposed: use the non-namespaced path when no namespace is set, or fail at
endpoint start when cloud=true needs one.
h4. 2. A stream body fails, and no body writes an empty version
{{createSecret}} (line 62) passes the body as it is to {{keyValue.put}}: an
{{InputStream}} body fails in Jackson serialization, and a null body writes a
new, empty version of the secret. Checked on 4.24.0-SNAPSHOT with the dev
server.
Proposed: convert stream/bytes/JSON text to a Map, and reject a null body.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)