Claus Ibsen created CAMEL-27497:
-----------------------------------

             Summary: camel-elasticsearch / camel-opensearch - apiKey fails 
when user is set without a password
                 Key: CAMEL-27497
                 URL: https://issues.apache.org/jira/browse/CAMEL-27497
             Project: Camel
          Issue Type: Bug
          Components: camel-elasticsearch, camel-opensearch
            Reporter: Claus Ibsen
             Fix For: 4.24.0


_Claude Code on behalf of davsclaus_

The components reject apiKey together with user (CAMEL-27479, CAMEL-27480), 
even when no password is set. A user without a password never logs in: basic 
auth needs both. So the check fails a valid configuration.

This shows up in Kamelets: an optional property that is not set, such as 
{{?user}}, resolves from the OS env var of the same name (USER). 
elasticsearch-index-sink and opensearch-index-sink with only apiKey set fail at 
startup with "Both apiKey and user are configured on the elasticsearch 
component".

Fix: reject apiKey only when user AND password are both set, and treat empty 
values as not set (user, password and apiKey).



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

Reply via email to