-
Notifications
You must be signed in to change notification settings - Fork 197
feat(auth): Add auth-headers cluster provider for dynamic multi-tenant Kubernetes access #509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… access Signed-off-by: Muhammad Faizan <[email protected]>
Signed-off-by: Muhammad Faizan <[email protected]>
|
@manusa any update on the review? |
|
Hi @mfaizanse I haven't had the chance to check this one yet. Sorry. One of the main concerns we had while evaluating #387 is what are the implications of switching clusters in a single chat completion session:
It'd be great if you could elaborate on specific use cases or scenarios where this provider would be useful. |
Hi @manusa, Thanks for the response! We have a multi-tenant k8s agent which receives requests from frontend along with k8s auth headers. The user authentication (OAuth etc.) is handled in frontend. We want to connect the agent with the MCP server, but in this case we cannot use kubeconfig based provider. The conversation session is maintained in the agent application and the MCP would be used as stateless.
I see this PR was merged to allow custom managers, but for header based provider, we also need the propagation middleware. P.S. I will resolve the merge conflict after the review so I rebased to the latest main once. |
|
Hey @mfaizanse, awesome work on this feature. I was looking into implementing something similar and found your PR. I am part of a platform team maintaining a fleet of clusters. We want to offer our users MCP access to their clusters. Some have access to only one cluster, some to multiple. Access management is done with OIDC. This feature would allow users to access the clusters they have with exactly the rights they have. Let me know, if there is something I can help out with. Philipp Schöppner <[email protected]>, Mercedes-Benz Tech Innovation GmbH (Provider Information) |
|
Hi @manusa, |

This PR introduces a new
auth-headerscluster provider strategy that enables multi-tenant Kubernetes MCP server deployments where cluster connection details and authentication credentials are provided via HTTP headers on a per-request basis.Summary
The auth-headers provider allows clients to connect to different Kubernetes clusters dynamically without server-side configuration or stored credentials. All cluster connection details (server URL, CA certificate, authentication) are provided in request headers, enabling true zero-trust and multi-tenant architectures.
Documentation
Complete documentation added in
docs/AUTH_HEADERS_PROVIDER.md.Custom Headers
Clients must provide these headers with each request:
Required:
kubernetes-server- Kubernetes API server URLkubernetes-certificate-authority-data- Base64-encoded CA certificateAuthentication (one required):
kubernetes-authorization- Bearer token, ORkubernetes-client-certificate-data+kubernetes-client-key-data- Client cert/key pairOptional:
kubernetes-insecure-skip-tls-verify- Set totrueto skip TLS verificationBackward Compatibility
✅ Fully backward compatible - existing providers unchanged
✅ No breaking changes to existing APIs
✅ New provider is opt-in via configuration
Example usage (Python):
Related Issues