feat(mcp): cap read volume per caller identity
A scope authorises a read and says nothing about volume. An agent reads a thousand records in seconds where a person clicks ten, and until now nothing noticed: the token is valid, the tool is permitted, the ACL passes. That gap stopped being theoretical the day an autonomous run started reading the whole catalog on a schedule. identifier: credential keys the counter on the sub claim — the end user, whoever is asking on their behalf — so an agent looping under one person's identity spends that person's budget and cannot spend everyone's. Verified on catalog: pm-user and ro-user hold separate counters. Per-route namespace, so a busy domain cannot exhaust another's. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,8 @@ spec:
|
||||
BACKEND_HOST: classic-models-api.classic-models.svc.cluster.local
|
||||
OIDC_ISSUER: https://keycloak.sttlab.local/realms/classic-models
|
||||
API_AUDIENCE: '["customers-api"]'
|
||||
# Read volume for an MCP caller, per identity per minute.
|
||||
MCP_READS_PER_MINUTE: "60"
|
||||
# Unused today — same dead variable already present in catalog-api's
|
||||
# flux-kustomization.yaml (no file under kong/rest/ or kong/mcp/
|
||||
# actually reads API_SCOPES_REQUIRED). Kept for parity; fix in both
|
||||
|
||||
Reference in New Issue
Block a user