From 363485d0258ad871ab4f7f672cc50a2cf788fbd1 Mon Sep 17 00:00:00 2001 From: Chaim Date: Wed, 5 Aug 2026 08:15:32 +0000 Subject: [PATCH] =?UTF-8?q?refactor(mcp):=20MCP=5FHTTP=5FTOKEN=20=E2=86=92?= =?UTF-8?q?=20MCP=5FHTTP=5FSHARED=5FSECRET=20=E2=80=94=20=D7=96=D7=94?= =?UTF-8?q?=D7=94=20=D7=9C=D7=A9=D7=9D=20=D7=91-Infisical?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit הסוד נוצר ב-All Infrastructure / env main / /apps/legal-ai בשם MCP_HTTP_SHARED_SECRET, מתויג credentials, לפי הדפוס של שני טוקני-הגשר שכבר שם: COURT_FETCH_SHARED_SECRET ו-LEGAL_CHAT_SHARED_SECRET. שם זהה בקוד וב-Infisical = אין מיפוי שצריך לזכור. Co-Authored-By: Claude Opus 5 --- mcp-server/src/legal_mcp/services/http_auth.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mcp-server/src/legal_mcp/services/http_auth.py b/mcp-server/src/legal_mcp/services/http_auth.py index d843f46..d530a3e 100644 --- a/mcp-server/src/legal_mcp/services/http_auth.py +++ b/mcp-server/src/legal_mcp/services/http_auth.py @@ -38,9 +38,14 @@ from mcp.server.auth.provider import AccessToken, TokenVerifier logger = logging.getLogger("legal_mcp.http_auth") -#: Environment variable carrying the shared bearer token. Populated from -#: Infisical by the service unit — see docs/spec/X10-deploy-env-secrets.md. -TOKEN_ENV = "MCP_HTTP_TOKEN" +#: Environment variable carrying the shared bearer token. +#: +#: Name matches the Infisical key exactly — All Infrastructure / env `main` / +#: `/apps/legal-ai` / ``MCP_HTTP_SHARED_SECRET``, tagged ``credentials``. Keeping +#: the two identical means nobody has to hold a mapping in their head, and it +#: follows the two bridge tokens already in that folder +#: (``COURT_FETCH_SHARED_SECRET``, ``LEGAL_CHAT_SHARED_SECRET``). +TOKEN_ENV = "MCP_HTTP_SHARED_SECRET" #: Minimum acceptable token length. Short tokens are brute-forceable; refusing #: them at startup is cheaper than discovering it from an access log.