Secrets infrastructure for apps and AI agents

Your apps hold a key stand-in.

Surroga gives every app a handle instead of an API key. The real key stays in one place, and Surroga puts it on the request only on its way to the host you approved. A stolen handle is worthless.

Self-hosted and open source under AGPL-3.0. Runs on Docker Compose or any Kubernetes cluster.

How it works

One hop between your app and the world.

Your code keeps reading the same variable and calling the same API. Only the value in its environment changes.

Your app sends the handle

It calls the API as before, with Surroga as its HTTPS proxy. The handle looks like a key: gk_ and 32 characters.

Surroga checks and swaps

Who is calling is proven by the platform, such as a Kubernetes service account. If this app may use this key for this host, the handle becomes the real key.

The answer is scrubbed

Before a byte reaches your app, every key it holds is cut from the answer, also URL-encoded, HTML-escaped, JSON-escaped or base64.

Why Surroga

Built so that nobody can give your keys away.

No read path at all

No API, page, log or error returns a stored secret. Not to your app, not to the dashboard, not to the admin. There is no “reveal” button to steal.

A human approves every widening

Giving a key to a new app or host needs a passkey tap on a page Surroga serves on its own domain. A hacked dashboard or AI agent can only propose.

Safe for AI agents

An agent sees handles only. It can list them, request a secret or propose a grant through a CLI and an MCP server, but never read a value or approve.

A stolen handle is a tripwire

A handle used from the wrong app is refused and raises an alarm within a minute, with one tap to block a key or freeze everything.

Coverage

Speaks what your apps already speak.

HTTP APIs

Header, Basic and query keys, AWS SigV4 re-signing, OAuth client tokens.

Postgres

A wire proxy: the app logs in with a handle, the database sees the real password.

Email

An SMTP relay that sends mail without your app holding the mail password.

Signing

Sign and verify JWTs and data through an API. Private keys never leave.

Incoming traffic

Webhooks verified, cookies wrapped and tokens re-signed for software you host.

Software you didn’t write

gate-run wraps any program: fresh identity per connection, stand-ins in its settings.

21 provider recipes (Stripe, AWS S3, GitHub, OpenAI, Anthropic, Mollie and more) know where each key may go and which calls to deny.

Security

Two rules, attacked five times.

Before release, five adversarial reviews tried to break the rules as a hacked app, a hacked dashboard, a database admin, an AI agent and an outsider. Every finding came with working exploit code, and every exploit now runs on every commit.

5adversarial reviews
95proven findings, fixed at the root
0critical in the fifth review
Rule 1

No value ever comes back out.

Every API answer, page, log, audit entry, alarm and error is tested for it.

Rule 2

Widening needs a human.

A passkey on Surroga’s own approval page signs exactly what the page showed.

What it cannot do

  • Recognise a key an upstream has encrypted or wrapped in a larger base64 blob.
  • Protect traffic that goes around it. Pair it with a network policy, which the Helm chart ships.
  • Detect a full rollback of its own database. Single edited or forged rows are caught; every policy row is signed.

Install

From nothing to a protected call.

Run it on one machine with Docker Compose, or on any Kubernetes cluster with Helm. Start with test keys.

PlatformHowStatus
Linux server (any cloud or VM)Docker Compose, server mode, Let’s EncryptTested
macOS or Linux laptopDocker Compose, local mode on 127.0.0.1Tested
WindowsDocker Desktop with WSL 2, local modeUntested
Kubernetes (k3s, EKS, GKE, AKS, Talos…)Helm chart with NetworkPoliciesPreview

Early access. The source and the console image open with the first public release. Until then, access is by invitation.

You need Docker with Compose v2, git, and a browser that can create passkeys. Ports 8080 and 8443 must be free. Chrome and Firefox resolve gate.localhost and approve.localhost on their own; elsewhere add them to /etc/hosts.

  1. Get the source and generate the configuration. init.sh writes .env and the master key, and prints a login and a one-time setup token.

    git clone <repository> surroga
    cd surroga/deploy/compose
    ./init.sh local
  2. Set GATE_CONSOLE_IMAGE in .env to the console image you were given, then start everything.

    docker compose up -d --build
    docker compose ps   # postgres, core, console, caddy: running
  3. Open http://gate.localhost:8080, log in, click Open the core’s setup page, paste the setup token and register your passkey. From then on the setup token is refused. Register a second passkey on another device.

  4. Try the demo: a secret, a grant for the demo app, and a call that arrives with the real key while the app only held a handle.

    docker compose --profile demo up -d echo
    # add secret + grant in the console, copy the handle, then:
    HANDLE=gk_your_handle docker compose --profile demo run --rm demo

Pricing

Free to run yourself. Pay us to run it.

One unit: a protected app, meaning one workload that holds handles instead of keys. No per-request meter, no per-secret fee.

Self-hosted

€0

forever

  • Everything that is open source
  • Your servers, your master key
  • AGPL-3.0, or a commercial licence on request

Early access

Hosted Starter

€0

up to 3 protected apps

  • One passkey approver
  • 30 days of audit
  • We run it, per customer

Waitlist

Hosted Business

€400

per month, from

  • SSO for the console
  • Several approvers per change
  • Audit export, KMS-held master key
  • Support hours

Contact us

Why per app. Every call of a protected app passes through Surroga. Charging per request would punish that design and make your bill unpredictable.

Why not per secret. Per-secret pricing nudges teams to share one key between apps, which weakens the per-app alarms that make a stolen handle loud.

Questions

Before you try it.

Does my code have to change?

Usually not. The app reads the same environment variable and calls the same API. You set a proxy, trust Surroga’s CA, and replace the key with a handle.

What happens when Surroga is down?

Calls that need a key fail closed: nothing goes out with a wrong or missing key. Run two replicas; the core keeps no state outside its database.

Where are the keys stored?

In Postgres, each value encrypted with its own data key, wrapped by a master key you hold. Every row that decides where a value may go is signed and checked before use.

Can I get a secret back out?

No. There is no read path, for anyone. To use a key somewhere new, you grant it, and you approve that with your passkey.

How is this different from a secrets manager?

A secrets manager delivers the key to your app, where anything that can read the app can read the key. Surroga never delivers it; your app only ever holds a handle.