Google Built a Sandbox With Nothing to Steal. Let's Build a Tiny Credential Gateway in TypeScript.
Описание и применение
В статье описывается, как создать небольшую шлюзовую службу, которая демонстрирует архитектуру «ноль секретов» для sandbox‑ов агентских приложений, где ключи хранятся вне среды выполнения и передаются только после проверки токена.
Задача
Agent sandboxes often store API keys in environment variables, exposing secrets to untrusted code.
Результат
Running npx tsx gateway.ts starts a tiny credential gateway that demonstrates zero‑secrets sandboxing; an injected agent finds no keys inside its sandbox.
Рабочий процесс
- 1. Store secrets in an external vault (Map, Secret Manager, etc.).
- 2. Generate a short‑lived session token for the agent.
- 3. Agent sends requests through the gateway with the session token.
- 4. Gateway verifies the token, retrieves the appropriate secret from the vault.
- 5. Gateway injects the secret into the request headers and forwards it to the target service.
Доказательства
A sandbox full of keys is a vault with the door open.
Google calls it a "zero‑secrets architecture."
The gateway swaps them in on the way out, "only after validating the session's mTLS identity and egress policy."
- Дата записи: 2026-10-25T17:26:23.248Z