From fd2d8f3db3ef12aefd2b66fd55b631820075a6b4 Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Thu, 30 Oct 2025 11:21:09 +0100 Subject: [PATCH 1/8] [MATRIX-1193] Add username/password option for elastic self hosted --- pkg/flink/utils.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/flink/utils.go b/pkg/flink/utils.go index 304f2b6ff2..4f02afbe1e 100644 --- a/pkg/flink/utils.go +++ b/pkg/flink/utils.go @@ -12,7 +12,7 @@ var ( "googleai": {"api-key"}, "vertexai": {"service-key"}, "mongodb": {"username", "password"}, - "elastic": {"api-key"}, + "elastic": {"api-key", "username", "password"}, "pinecone": {"api-key"}, "couchbase": {"username", "password"}, "confluent_jdbc": {"username", "password"}, @@ -26,8 +26,8 @@ var ( "aws-secret-key": {"bedrock", "sagemaker"}, "aws-session-token": {"bedrock", "sagemaker"}, "service-key": {"vertexai"}, - "username": {"mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"}, - "password": {"mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"}, + "username": {"mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"}, + "password": {"mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"}, "token": {"a2a", "rest", "mcp_server"}, "token-endpoint": {"a2a", "rest", "mcp_server"}, "client-id": {"a2a", "rest", "mcp_server"}, @@ -46,7 +46,7 @@ var ( "googleai": {"api-key"}, "vertexai": {"service-key"}, "mongodb": {"username", "password"}, - "elastic": {"api-key"}, + "elastic": {}, "pinecone": {"api-key"}, "couchbase": {"username", "password"}, "confluent_jdbc": {"username", "password"}, @@ -57,6 +57,7 @@ var ( ConnectionOneOfRequiredSecretsMapping = map[string][][]string{ "a2a": {{"api-key"}, {"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}}, + "elastic": {{"api-key"}, {"username", "password"}}, "rest": {{"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}}, "mcp_server": {{"api-key"}, {"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}}, } From 7125ad5194776b4122489da05810533806bc2470 Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Fri, 31 Oct 2025 16:20:26 +0100 Subject: [PATCH 2/8] [MATRIX-1193] Add username/password to tests --- test/fixtures/output/flink/connection/create-help.golden | 4 ++-- test/fixtures/output/flink/connection/update-help.golden | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/fixtures/output/flink/connection/create-help.golden b/test/fixtures/output/flink/connection/create-help.golden index ed7580bcea..50ec64ef14 100644 --- a/test/fixtures/output/flink/connection/create-help.golden +++ b/test/fixtures/output/flink/connection/create-help.golden @@ -18,8 +18,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". diff --git a/test/fixtures/output/flink/connection/update-help.golden b/test/fixtures/output/flink/connection/update-help.golden index 2d204baaa0..6938c9564e 100644 --- a/test/fixtures/output/flink/connection/update-help.golden +++ b/test/fixtures/output/flink/connection/update-help.golden @@ -16,8 +16,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". From 3ca1e1f91c5ce9d5ab318def817019f1b5a0f27e Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Fri, 31 Oct 2025 19:06:06 +0100 Subject: [PATCH 3/8] [MATRIX-1193] Add whitespaces to match test --- .../create/create-mcp_server-missing-required-secret.golden | 4 ++-- .../create/create-mcp_server-mutually-exclusive-secret.golden | 4 ++-- .../connection/create/create-missing-required-secret.golden | 4 ++-- .../create/create-rest-missing-required-secret.golden | 4 ++-- .../create/create-rest-mutually-exclusive-secret.golden | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/fixtures/output/flink/connection/create/create-mcp_server-missing-required-secret.golden b/test/fixtures/output/flink/connection/create/create-mcp_server-missing-required-secret.golden index c4d6256598..1ece7c6d11 100644 --- a/test/fixtures/output/flink/connection/create/create-mcp_server-missing-required-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-mcp_server-missing-required-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". diff --git a/test/fixtures/output/flink/connection/create/create-mcp_server-mutually-exclusive-secret.golden b/test/fixtures/output/flink/connection/create/create-mcp_server-mutually-exclusive-secret.golden index 84cb9a7aef..74d3db9b14 100644 --- a/test/fixtures/output/flink/connection/create/create-mcp_server-mutually-exclusive-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-mcp_server-mutually-exclusive-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". diff --git a/test/fixtures/output/flink/connection/create/create-missing-required-secret.golden b/test/fixtures/output/flink/connection/create/create-missing-required-secret.golden index 4b6d3e14bd..27a07350c8 100644 --- a/test/fixtures/output/flink/connection/create/create-missing-required-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-missing-required-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". diff --git a/test/fixtures/output/flink/connection/create/create-rest-missing-required-secret.golden b/test/fixtures/output/flink/connection/create/create-rest-missing-required-secret.golden index c4d6256598..1ece7c6d11 100644 --- a/test/fixtures/output/flink/connection/create/create-rest-missing-required-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-rest-missing-required-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". diff --git a/test/fixtures/output/flink/connection/create/create-rest-mutually-exclusive-secret.golden b/test/fixtures/output/flink/connection/create/create-rest-mutually-exclusive-secret.golden index f34f6165c4..ee403a52f8 100644 --- a/test/fixtures/output/flink/connection/create/create-rest-mutually-exclusive-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-rest-mutually-exclusive-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". From 955d6573173333dd94c5eba0704fcc75f9d24dfa Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Mon, 3 Nov 2025 17:20:27 +0100 Subject: [PATCH 4/8] Add elastic tests --- .../create-a2a-missing-required-secret.golden | 4 +-- ...reate-a2a-mutually-exclusive-secret.golden | 4 +-- ...ate-elastic-missing-required-secret.golden | 36 +++++++++++++++++++ ...e-elastic-mutually-exclusive-secret.golden | 36 +++++++++++++++++++ .../create/create-elastic-no-secret.golden | 2 ++ 5 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden create mode 100644 test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden create mode 100644 test/fixtures/output/flink/connection/create/create-elastic-no-secret.golden diff --git a/test/fixtures/output/flink/connection/create/create-a2a-missing-required-secret.golden b/test/fixtures/output/flink/connection/create/create-a2a-missing-required-secret.golden index c4d6256598..1ece7c6d11 100644 --- a/test/fixtures/output/flink/connection/create/create-a2a-missing-required-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-a2a-missing-required-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". diff --git a/test/fixtures/output/flink/connection/create/create-a2a-mutually-exclusive-secret.golden b/test/fixtures/output/flink/connection/create/create-a2a-mutually-exclusive-secret.golden index 84cb9a7aef..74d3db9b14 100644 --- a/test/fixtures/output/flink/connection/create/create-a2a-mutually-exclusive-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-a2a-mutually-exclusive-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". - --password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". diff --git a/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden new file mode 100644 index 0000000000..2a1afd1851 --- /dev/null +++ b/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden @@ -0,0 +1,36 @@ +Error: if any flags in the group [username password] are set they must all be set; missing [password] +Usage: + confluent flink connection create [flags] + +Examples: +Create Flink connection "my-connection" in AWS us-west-2 for OpenAPI with endpoint and API key. + + $ confluent flink connection create my-connection --cloud aws --region us-west-2 --type openai --endpoint https://api.openai.com/v1/chat/completions --api-key 0000000000000000 + +Flags: + --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". + --region string REQUIRED: Cloud region for Flink (use "confluent flink region list" to see all). + --type string REQUIRED: Specify the connection type as "openai", "azureml", "azureopenai", "a2a", "bedrock", "sagemaker", "googleai", "vertexai", "mongodb", "elastic", "pinecone", "couchbase", "confluent_jdbc", "rest", or "mcp_server". + --endpoint string REQUIRED: Specify endpoint for the connection. + --api-key string Specify API key for the type: "openai", "azureml", "azureopenai", "googleai", "elastic", "pinecone", "a2a", or "mcp_server". + --aws-access-key string Specify access key for the type: "bedrock" or "sagemaker". + --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". + --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". + --service-key string Specify service key for the type: "vertexai". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", or "rest". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", or "rest". + --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". + --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". + --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". + --client-secret string Specify OAuth2 client secret for the type: "a2a", "rest", or "mcp_server". + --scope string Specify OAuth2 scope for the type: "a2a", "rest", or "mcp_server". + --sse-endpoint string Specify SSE endpoint for the type: "mcp_server". + --transport-type string Specify transport type for the type: "mcp_server". Default: SSE. + --environment string Environment ID. + -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") + +Global Flags: + -h, --help Show help for this command. + --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. + -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). + diff --git a/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden new file mode 100644 index 0000000000..25164f2e5a --- /dev/null +++ b/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden @@ -0,0 +1,36 @@ +Error: if any flags in the group [username api-key] are set none of the others can be; [api-key username] were all set +Usage: + confluent flink connection create [flags] + +Examples: +Create Flink connection "my-connection" in AWS us-west-2 for OpenAPI with endpoint and API key. + + $ confluent flink connection create my-connection --cloud aws --region us-west-2 --type openai --endpoint https://api.openai.com/v1/chat/completions --api-key 0000000000000000 + +Flags: + --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". + --region string REQUIRED: Cloud region for Flink (use "confluent flink region list" to see all). + --type string REQUIRED: Specify the connection type as "openai", "azureml", "azureopenai", "a2a", "bedrock", "sagemaker", "googleai", "vertexai", "mongodb", "elastic", "pinecone", "couchbase", "confluent_jdbc", "rest", or "mcp_server". + --endpoint string REQUIRED: Specify endpoint for the connection. + --api-key string Specify API key for the type: "openai", "azureml", "azureopenai", "googleai", "elastic", "pinecone", "a2a", or "mcp_server". + --aws-access-key string Specify access key for the type: "bedrock" or "sagemaker". + --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". + --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". + --service-key string Specify service key for the type: "vertexai". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", or "rest". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", or "rest". + --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". + --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". + --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". + --client-secret string Specify OAuth2 client secret for the type: "a2a", "rest", or "mcp_server". + --scope string Specify OAuth2 scope for the type: "a2a", "rest", or "mcp_server". + --sse-endpoint string Specify SSE endpoint for the type: "mcp_server". + --transport-type string Specify transport type for the type: "mcp_server". Default: SSE. + --environment string Environment ID. + -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") + +Global Flags: + -h, --help Show help for this command. + --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. + -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). + diff --git a/test/fixtures/output/flink/connection/create/create-elastic-no-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-no-secret.golden new file mode 100644 index 0000000000..7c1e23578d --- /dev/null +++ b/test/fixtures/output/flink/connection/create/create-elastic-no-secret.golden @@ -0,0 +1,2 @@ +Error: no secrets provided for type elastic, one of the required secrets "[api-key]" or "[username password]" must be provided + From 7a015fd2e5b11fae43265efd1117e8ce90322145 Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Mon, 3 Nov 2025 17:22:16 +0100 Subject: [PATCH 5/8] Add flink_test --- test/flink_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/flink_test.go b/test/flink_test.go index 1601d87215..8b160168d8 100644 --- a/test/flink_test.go +++ b/test/flink_test.go @@ -156,6 +156,9 @@ func (s *CLITestSuite) TestFlinkConnectionCreateFailure() { {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type a2a --endpoint https://api.example.com", fixture: "flink/connection/create/create-a2a-no-secret.golden", exitCode: 1}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type a2a --endpoint https://api.example.com --api-key 0000000000000000 --token token", fixture: "flink/connection/create/create-a2a-mutually-exclusive-secret.golden", exitCode: 1}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type a2a --endpoint https://api.example.com --token-endpoint https://api.example.com/oauth2", fixture: "flink/connection/create/create-a2a-missing-required-secret.golden", exitCode: 1}, + {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type elastic --endpoint https://api.example.com", fixture: "flink/connection/create/create-elastic-no-secret.golden", exitCode: 1}, + {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type elastic --endpoint https://api.example.com --api-key 0000000000000000 --username user", fixture: "flink/connection/create/create-elastic-mutually-exclusive-secret.golden", exitCode: 1}, + {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type elastic --endpoint https://api.example.com --username user", fixture: "flink/connection/create/create-elastic-missing-required-secret.golden", exitCode: 1}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type mcp_server --endpoint https://api.example.com --token token --sse-endpoint /sse --transport-type HTTP", fixture: "flink/connection/create/create-wrong-mcp-transport-type.golden", exitCode: 1}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type mcp_server --endpoint https://api.example.com --api-key api_key --sse-endpoint sse --transport-type STREAMABLE_HTTP", fixture: "flink/connection/create/create-streamable-http-mcp-connection-with-sse-endpoint.golden", exitCode: 1}, } @@ -181,6 +184,7 @@ func (s *CLITestSuite) TestFlinkConnectionCreateSuccess() { {args: "flink connection create my-connection --cloud gcp --region eu-west-1 --type vertexai --endpoint https://api.openai.com/v1/chat/completions --service-key 0000000000000000", fixture: "flink/connection/create/create-vertexai.golden"}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type mongodb --endpoint https://api.openai.com/v1/chat/completions --username name --password pass", fixture: "flink/connection/create/create-mongodb.golden"}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type elastic --endpoint https://api.openai.com/v1/chat/completions --api-key 0000000000000000", fixture: "flink/connection/create/create-elastic.golden"}, + {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type elastic --endpoint https://api.openai.com/v1/chat/completions --username name --password pass", fixture: "flink/connection/create/create-elastic.golden"}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type pinecone --endpoint https://api.openai.com/v1/chat/completions --api-key 0000000000000000", fixture: "flink/connection/create/create-pinecone.golden"}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type couchbase --endpoint https://api.openai.com/v1/chat/completions --username name --password pass", fixture: "flink/connection/create/create-couchbase.golden"}, {args: "flink connection create my-connection --cloud aws --region eu-west-1 --type confluent_jdbc --endpoint jdbc:mysql://custom.com:3306/customerdb --username name --password pass", fixture: "flink/connection/create/create-confluent_jdbc.golden"}, From 6189a17af4525ac110aa95edc87dbb21a299edfe Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Mon, 3 Nov 2025 19:35:28 +0100 Subject: [PATCH 6/8] Fix elastic tests --- .../create/create-elastic-mutually-exclusive-secret.golden | 2 +- .../flink/connection/create/create-elastic-no-secret.golden | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden index 25164f2e5a..2a1afd1851 100644 --- a/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden @@ -1,4 +1,4 @@ -Error: if any flags in the group [username api-key] are set none of the others can be; [api-key username] were all set +Error: if any flags in the group [username password] are set they must all be set; missing [password] Usage: confluent flink connection create [flags] diff --git a/test/fixtures/output/flink/connection/create/create-elastic-no-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-no-secret.golden index 7c1e23578d..0098b65bdc 100644 --- a/test/fixtures/output/flink/connection/create/create-elastic-no-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-elastic-no-secret.golden @@ -1,2 +1 @@ Error: no secrets provided for type elastic, one of the required secrets "[api-key]" or "[username password]" must be provided - From 508fccdaafa9eb0a4aeeddd419625189d2310fd5 Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Fri, 19 Dec 2025 19:39:03 +0100 Subject: [PATCH 7/8] feat(flink): Edit Elastic connection --- .../create/create-elastic-missing-required-secret.golden | 5 ++--- .../create/create-elastic-mutually-exclusive-secret.golden | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden index 2a1afd1851..a5e8045b9e 100644 --- a/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", or "rest". - --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", or "rest". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". @@ -33,4 +33,3 @@ Global Flags: -h, --help Show help for this command. --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). - diff --git a/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden index 2a1afd1851..a59f6cd7a8 100644 --- a/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden @@ -17,8 +17,8 @@ Flags: --aws-secret-key string Specify secret key for the type: "bedrock" or "sagemaker". --aws-session-token string Specify session token for the type: "bedrock" or "sagemaker". --service-key string Specify service key for the type: "vertexai". - --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", or "rest". - --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", or "rest". + --username string Specify username for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". + --password string Specify password for the type: "mongodb", "elastic", "couchbase", "confluent_jdbc", "a2a", "rest", or "mcp_server". --token string Specify bearer token for the type: "a2a", "rest", or "mcp_server". --token-endpoint string Specify OAuth2 token endpoint for the type: "a2a", "rest", or "mcp_server". --client-id string Specify OAuth2 client ID for the type: "a2a", "rest", or "mcp_server". @@ -32,5 +32,4 @@ Flags: Global Flags: -h, --help Show help for this command. --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. - -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). - + -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). \ No newline at end of file From 03db4db776ae107a05dbee4516f22b8a2d1384c6 Mon Sep 17 00:00:00 2001 From: Aitor Algorta Date: Wed, 7 Jan 2026 16:58:09 +0100 Subject: [PATCH 8/8] feat(flink): Fix elastic golden files trailing newlines --- .../create/create-elastic-missing-required-secret.golden | 1 + .../create/create-elastic-mutually-exclusive-secret.golden | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden index a5e8045b9e..4929603de2 100644 --- a/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-elastic-missing-required-secret.golden @@ -33,3 +33,4 @@ Global Flags: -h, --help Show help for this command. --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). + diff --git a/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden b/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden index a59f6cd7a8..4929603de2 100644 --- a/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden +++ b/test/fixtures/output/flink/connection/create/create-elastic-mutually-exclusive-secret.golden @@ -32,4 +32,5 @@ Flags: Global Flags: -h, --help Show help for this command. --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. - -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). \ No newline at end of file + -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). +