Claus Ibsen created CAMEL-27857:
-----------------------------------
Summary: camel-google-secret-manager: the service URL check is
always true, a missing secret id header gives NullPointerException
Key: CAMEL-27857
URL: https://issues.apache.org/jira/browse/CAMEL-27857
Project: Camel
Issue Type: Bug
Components: camel-google
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of camel-google-secret-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. The service URL check is always true
{{GoogleSecretManagerEndpoint.getServiceUrl()}} calls ObjectHelper.isNotEmpty
on a boolean, which is true for any Boolean, so the URL is
"secrets-manager:<project>:null" or contains the client toString().
Proposed change: return the protocol and the project only.
h4. 2. A missing CamelGoogleSecretManagerSecretId header gives
NullPointerException
Without pojoRequest, createSecret (setSecretId(null)), getSecretVersion and
deleteSecret (SecretName / SecretVersionName) fail with a NullPointerException
without a message.
Proposed change: fail with an IllegalArgumentException that names the header.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)