[MATRIX-1193] Add username/password option for elastic self hosted #3215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




Release Notes
New Features
confluent flink connection createandconfluent flink connection updatecommands. Users can now authenticate with Elastic using either--api-keyor--username/--passwordflags.Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
This PR adds support for username/password (Basic Auth) as an alternative authentication method for Elastic connections in Confluent Cloud Flink.
Problem: Previously, Elastic connections only supported API key authentication. Some users prefer or require username/password authentication for their Elastic deployments.
Solution:
usernameandpasswordto the allowed secrets for theelasticconnection typeelasticto the username/password type mappings (alongsiderest,mcp_server, anda2a)--api-keyOR both--usernameand--password, but not both authentication methodsAUTH_TYPE: "BASIC"when username/password is used, orAUTH_TYPE: "API_KEY"when api-key is usedApplies to: Confluent Cloud only
Blast Radius
--api-keyare unaffected; the API key authentication path remains unchanged.References
Test & Review
CLI Integration Tests Added:
create-elastic-no-secret.golden- Tests error when no secrets provided for elasticcreate-elastic-mutually-exclusive-secret.golden- Tests error when both api-key and username are providedcreate-elastic-missing-required-secret.golden- Tests error when username provided without passwordManual Verification - Elastic CREATE connection with username/password:
Manual Verification - Elastic EDIT connection with username/password: