Agent-Hellboy / Agent-Hellboy/mcp-runtime
feat(secrets): add provider-neutral secret broker for MCP tool credentials
- Lingua principale
- Go
- Stelle
- 6
- Fork
- 1
- Merge medio
- 11h 33m
- PR unite (30g)
- 13
Descrizione
## Summary
Add a provider-neutral secret broker so MCP tools can use external credentials without hardcoding them in manifests, environment variables, or user-visible configuration.
This follows the Google Secret Manager plus agent identity pattern, but should support Kubernetes Secrets, Google Secret Manager, Vault, AWS Secrets Manager, Azure Key Vault, and future providers.
## Why
MCP servers often need API keys, OAuth client secrets, database credentials, and service tokens. Tenant users should not receive cluster credentials or raw platform secrets. The platform should broker secret access, enforce identity and namespace policy, support rotation, and audit every use.
## Proposed design
- Add a `SecretRef` or credential binding model for MCP servers/tools.
- Support providers through a small interface: Kubernetes Secret, GCP Secret Manager, Vault, AWS Secrets Manager, Azure Key Vault.
- Bind secret access to team, namespace, server, tool, human identity, and verified agent identity.
- Inject credentials at runtime through gateway or short-lived workload projection where possible.
- Support redacted display, rotation metadata, and access audit events.
## Acceptance criteria
- API can create/list/get/delete credential bindings scoped to a team namespace.
- Non-admin users can only bind secrets they own or are authorized to use.
- Runtime access checks include namespace, server, tool, human identity, agent identity, and session.
- Gateway or workload path can resolve a secret without exposing the raw value to the user.
- Audit events are emitted for secret binding create/update/delete and runtime secret access.
- Secret values are never returned by list/get APIs, logs, or UI.
- Rotation can update the backing provider without redeploying the MCP server where the provider supports it.
- Tests cover Kubernetes Secret provider, denied cross-namespace access, missing provider, redacted API response, and audit emission.
- Docs include examples for Kubernetes Secrets and Google Secret Manager.
## References
- https://docs.cloud.google.com/agent-builder/agent-engine/agent-identity
- https://docs.cloud.google.com/secret-manager/docs/access-secret-version
- https://docs.cloud.google.com/secret-manager/docs/access-control
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.