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

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

Description and use

The article explains how to build a tiny credential gateway that demonstrates a zero‑secrets sandbox architecture for agent applications, keeping keys outside the runtime and injecting them only after token validation.

Problem

Agent sandboxes often store API keys in environment variables, exposing secrets to untrusted code.

Outcome

Running npx tsx gateway.ts starts a tiny credential gateway that demonstrates zero‑secrets sandboxing; an injected agent finds no keys inside its sandbox.

Workflow

  • 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.

Evidence

A sandbox full of keys is a vault with the door open.

Source

Google calls it a "zero‑secrets architecture."

Source

The gateway swaps them in on the way out, "only after validating the session's mTLS identity and egress policy."

Source

  • Record date: 2026-10-25T17:26:23.248Z