Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/flink/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var (
"couchbase": {"username", "password"},
"confluent_jdbc": {"username", "password"},
"rest": {"username", "password", "token", "token-endpoint", "client-id", "client-secret", "scope"},
"mcp_server": {"api-key", "token", "token-endpoint", "client-id", "client-secret", "scope", "sse-endpoint", "transport-type"},
"mcp_server": {"username", "password", "api-key", "token", "token-endpoint", "client-id", "client-secret", "scope", "sse-endpoint", "transport-type"},
}

ConnectionSecretTypeMapping = map[string][]string{
Expand All @@ -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"},
"password": {"mongodb", "couchbase", "confluent_jdbc", "a2a", "rest"},
"username": {"mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"},
"password": {"mongodb", "couchbase", "confluent_jdbc", "a2a", "rest", "mcp_server"},
"token": {"a2a", "rest", "mcp_server"},
"token-endpoint": {"a2a", "rest", "mcp_server"},
"client-id": {"a2a", "rest", "mcp_server"},
Expand Down Expand Up @@ -58,7 +58,7 @@ var (
ConnectionOneOfRequiredSecretsMapping = map[string][][]string{
"a2a": {{"api-key"}, {"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}},
"rest": {{"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}},
"mcp_server": {{"api-key"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}},
"mcp_server": {{"api-key"}, {"username", "password"}, {"token"}, {"token-endpoint", "client-id", "client-secret", "scope"}},
}

ConnectionSecretAllowedValues = map[string][]string{
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/output/flink/connection/create-help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Error: no secrets provided for type mcp_server, one of the required secrets "[api-key]", "[token]", or "[token-endpoint client-id client-secret scope]" must be provided
Error: no secrets provided for type mcp_server, one of the required secrets "[api-key]", "[username password]", "[token]", or "[token-endpoint client-id client-secret scope]" must be provided
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/output/flink/connection/update-help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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", or "rest".
--password string Specify password for the type: "mongodb", "couchbase", "confluent_jdbc", "a2a", or "rest".
--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".
--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".
Expand Down
1 change: 1 addition & 0 deletions test/flink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (s *CLITestSuite) TestFlinkConnectionCreateSuccess() {
{args: "flink connection create my-connection --cloud aws --region eu-west-1 --type mcp_server --endpoint https://api.example.com --api-key api_key --transport-type STREAMABLE_HTTP", fixture: "flink/connection/create/create-mcp_server.golden"},
{args: "flink connection create my-connection --cloud aws --region eu-west-1 --type mcp_server --endpoint https://api.example.com --token-endpoint https://api.example.com/auth --client-id clientId --client-secret secret --scope test_scope", fixture: "flink/connection/create/create-mcp_server.golden"},
{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 SSE", fixture: "flink/connection/create/create-mcp_server.golden"},
{args: "flink connection create my-connection --cloud aws --region eu-west-1 --type mcp_server --endpoint https://api.example.com --username name --password pass --transport-type SSE", fixture: "flink/connection/create/create-mcp_server.golden"},
}

for _, test := range tests {
Expand Down