Menu

An MCP Gateway With Keycloak and SPIFFE: the Proof of Concept
📰

An MCP Gateway With Keycloak and SPIFFE: the Proof of Concept

DEV Community: kubernetes·Patrick·2 days ago
#6jP8Uhip
#devtokubernetes#devto#dev#grafana#gateway
Long article (1608 words) — no AI summary yet.
Reading 0:00
15s threshold

Part 1 named agentgateway as the gateway candidate and listed what a proof of concept had to show. It had to accept tokens from both Keycloak and SPIRE, use mTLS with SPIFFE certificates to reach the MCP servers, and work with the OAuth discovery of real MCP clients. This part is that proof of concept, on our non-production Talos cluster, with one MCP server behind it.

All three held up. The third took two wrong turns first.

The setup

client ──JWT──> HAProxy ingress (mcp-dev.bsdserver.nl, internal allow-list) ──> agentgateway ──mTLS (X.509-SVIDs)──> ghostunnel ──loopback──> mcp-grafana

Enter fullscreen mode

Exit fullscreen mode

Everything lives in one namespace, mcp-dev , deployed by Flux. The namespace carries the spiffe.io/enabled=true label from part 3, so every pod in it gets a SPIFFE ID derived from its service account. Each workload has its own service account, and none of them mounts a Kubernetes API token.

The test server is mcp-grafana 2.3.0.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.