Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Google Built a Sandbox With Nothing to Steal. Let's Build a Tiny Credential Gateway in TypeScript.

说明与用途

文章说明如何构建一个小型凭证网关,演示代理应用的零秘密沙箱架构,将密钥保存在运行时之外,仅在验证令牌后注入。

问题

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