Skip to content

Commit 5619dec

Browse files
authored
Merge pull request #3129 from confluentinc/ADD_SSE_ENDPOINT_IN_MCP_SERVER
[MATRIX-1006] added sse endpoint as optional key for MCP_SERVER
2 parents 4a4d72e + ce20c2a commit 5619dec

11 files changed

+14
-3
lines changed

cmd/lint/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ var vocabWords = []string{
306306
"siv",
307307
"springboot",
308308
"sql",
309+
"sse",
309310
"ssl",
310311
"sso",
311312
"subresource",

internal/flink/command_connection.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func AddConnectionSecretFlags(cmd *cobra.Command) {
9595
cmd.Flags().String("client-id", "", fmt.Sprintf("Specify OAuth2 client ID for the type: %s.", utils.ArrayToCommaDelimitedString(flink.ConnectionSecretTypeMapping["client-id"], "or")))
9696
cmd.Flags().String("client-secret", "", fmt.Sprintf("Specify OAuth2 client secret for the type: %s.", utils.ArrayToCommaDelimitedString(flink.ConnectionSecretTypeMapping["client-secret"], "or")))
9797
cmd.Flags().String("scope", "", fmt.Sprintf("Specify OAuth2 scope for the type: %s.", utils.ArrayToCommaDelimitedString(flink.ConnectionSecretTypeMapping["scope"], "or")))
98+
cmd.Flags().String("sse-endpoint", "", fmt.Sprintf("Specify SSE endpoint for the type: %s.", utils.ArrayToCommaDelimitedString(flink.ConnectionSecretTypeMapping["sse-endpoint"], "or")))
9899
cmd.MarkFlagsRequiredTogether("username", "password")
99100
cmd.MarkFlagsRequiredTogether("aws-access-key", "aws-secret-key")
100101
cmd.MarkFlagsRequiredTogether("token-endpoint", "client-id", "client-secret", "scope")

pkg/flink/utils.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var (
1616
"couchbase": {"username", "password"},
1717
"confluent_jdbc": {"username", "password"},
1818
"rest": {"username", "password", "token", "token-endpoint", "client-id", "client-secret", "scope"},
19-
"mcp_server": {"api-key", "token", "token-endpoint", "client-id", "client-secret", "scope"},
19+
"mcp_server": {"api-key", "token", "token-endpoint", "client-id", "client-secret", "scope", "sse-endpoint"},
2020
}
2121

2222
ConnectionSecretTypeMapping = map[string][]string{
@@ -32,6 +32,7 @@ var (
3232
"client-id": {"rest", "mcp_server"},
3333
"client-secret": {"rest", "mcp_server"},
3434
"scope": {"rest", "mcp_server"},
35+
"sse-endpoint": {"mcp_server"},
3536
}
3637

3738
ConnectionRequiredSecretMapping = map[string][]string{
@@ -69,5 +70,6 @@ var (
6970
"client-id": "OAUTH2_CLIENT_ID",
7071
"client-secret": "OAUTH2_CLIENT_SECRET",
7172
"scope": "OAUTH2_SCOPE",
73+
"sse-endpoint": "SSE_ENDPOINT",
7274
}
7375
)

test/fixtures/output/flink/connection/create-help.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Flags:
2525
--client-id string Specify OAuth2 client ID for the type: "rest" or "mcp_server".
2626
--client-secret string Specify OAuth2 client secret for the type: "rest" or "mcp_server".
2727
--scope string Specify OAuth2 scope for the type: "rest" or "mcp_server".
28+
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
2829
--environment string Environment ID.
2930
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")
3031

test/fixtures/output/flink/connection/create/create-mcp_server-missing-required-secret.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Flags:
2424
--client-id string Specify OAuth2 client ID for the type: "rest" or "mcp_server".
2525
--client-secret string Specify OAuth2 client secret for the type: "rest" or "mcp_server".
2626
--scope string Specify OAuth2 scope for the type: "rest" or "mcp_server".
27+
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
2728
--environment string Environment ID.
2829
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")
2930

test/fixtures/output/flink/connection/create/create-mcp_server-mutually-exclusive-secret.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Flags:
2424
--client-id string Specify OAuth2 client ID for the type: "rest" or "mcp_server".
2525
--client-secret string Specify OAuth2 client secret for the type: "rest" or "mcp_server".
2626
--scope string Specify OAuth2 scope for the type: "rest" or "mcp_server".
27+
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
2728
--environment string Environment ID.
2829
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")
2930

test/fixtures/output/flink/connection/create/create-missing-required-secret.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Flags:
2424
--client-id string Specify OAuth2 client ID for the type: "rest" or "mcp_server".
2525
--client-secret string Specify OAuth2 client secret for the type: "rest" or "mcp_server".
2626
--scope string Specify OAuth2 scope for the type: "rest" or "mcp_server".
27+
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
2728
--environment string Environment ID.
2829
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")
2930

test/fixtures/output/flink/connection/create/create-rest-missing-required-secret.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Flags:
2424
--client-id string Specify OAuth2 client ID for the type: "rest" or "mcp_server".
2525
--client-secret string Specify OAuth2 client secret for the type: "rest" or "mcp_server".
2626
--scope string Specify OAuth2 scope for the type: "rest" or "mcp_server".
27+
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
2728
--environment string Environment ID.
2829
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")
2930

test/fixtures/output/flink/connection/create/create-rest-mutually-exclusive-secret.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Flags:
2424
--client-id string Specify OAuth2 client ID for the type: "rest" or "mcp_server".
2525
--client-secret string Specify OAuth2 client secret for the type: "rest" or "mcp_server".
2626
--scope string Specify OAuth2 scope for the type: "rest" or "mcp_server".
27+
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
2728
--environment string Environment ID.
2829
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")
2930

test/fixtures/output/flink/connection/update-help.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Flags:
2323
--client-id string Specify OAuth2 client ID for the type: "rest" or "mcp_server".
2424
--client-secret string Specify OAuth2 client secret for the type: "rest" or "mcp_server".
2525
--scope string Specify OAuth2 scope for the type: "rest" or "mcp_server".
26+
--sse-endpoint string Specify SSE endpoint for the type: "mcp_server".
2627
--environment string Environment ID.
2728
-o, --output string Specify the output format as "human", "json", or "yaml". (default "human")
2829

0 commit comments

Comments
 (0)