How Keywheel protects your credentials
Last updated October 23, 2026
Keywheel holds admin credentials that can mint keys for your accounts, so the design assumes any single component can be compromised and limits what that would expose.
Customer-hosted agent (recommended)
The Keywheel agent runs in your infrastructure. On first start it generates an X25519 keypair locally and sends Keywheel only the public key. You activate it by confirming the fingerprint printed in its logs, so Keywheel cannot substitute a key of its own. From then on your browser seals every credential to the agent’s key: Keywheel’s servers, database, backups and staff hold ciphertext that nothing on our side can open.
- The agent makes outbound HTTPS calls only. Every state change goes through a narrow API scoped to your workspace; new key versions are rejected unless they are sealed to your agent’s key.
- An optional allowlist (
KEYWHEEL_ALLOW) pins which platforms and targets the agent may write to. A compromised control plane can’t redirect a key elsewhere. - Every write the agent makes is logged to your own log pipeline, and the agent is open source (MIT), so you can read exactly what runs.
- What we still see: names, schedules, which platforms a key is written to, redacted hints and run logs with secrets scrubbed.
If something is compromised
The agent holds admin credentials that can mint keys, so it is the most valuable thing in the design. We assume each part can be broken into, and stack independent protections so no single failure hands over your keys. Every protection below is enforced inside the agent, from its own environment, so Keywheel’s servers can’t switch it off.
Keywheel’s servers or database are taken over
- They can’t read anything. Every credential and key is ciphertext sealed to your agent.
- They can’t slip in their own credential, redirect a key or weaken a limit with passkey approvals on (
KEYWHEEL_APPROVERS). You sign each provider connection, platform connection, key definition (including its limits and any key it will revoke) and each place a key is written, with a passkey. The agent verifies the WebAuthn signature against passkeys pinned in its own environment and refuses anything unsigned or changed since you signed it. Swapping your OpenAI admin key for an attacker’s (so your apps send prompts to their account) or adding a write target fails closed. - They can’t revoke your keys. The kill switch, “revoke now”, revoking keys from the inventory and distributing a pasted key each need a fresh passkey signature for exactly that action. Each signature is valid for 15 minutes and can be used once.
- They can’t fake a key version. Anyone with the agent’s public key can encrypt a value for it, so the agent signs every key version it creates with a tag only it can produce, covering the key ID, the value and its metadata. With approvals on, it only revokes, restores during a rollback or serves through the gateway the versions it tagged itself, the existing key you asked it to retire, or a key ID you just signed for.
- They can’t replay old approvals. The agent remembers, on its own disk, the newest approval it has seen for each item and refuses older ones, so a credential you replaced or a looser limit can’t be brought back. One-off approvals are single use across restarts. The agent also pins the workspace it was paired with and checks that every key, connection and write target it’s given actually belong together.
- They can’t send keys anywhere you didn’t list with
KEYWHEEL_ALLOW.
The agent’s machine, disk or backups leak
- A copied disk, image or snapshot is useless with
KEYWHEEL_KEY_WRAP. The private key is generated in memory, wrapped by your AWS KMS, Google Cloud KMS, Azure Key Vault or Vault Transit key, and only the ciphertext is written. Each start unwraps it with the machine’s own cloud identity, and every unwrap appears in your cloud audit log. - The image has no shell. It’s distroless, runs as an unprivileged user on a read-only filesystem with every Linux capability dropped, and blocks core dumps. Run it on its own, with no other workloads.
- Bursts are cut off. The circuit breaker pauses creates, revokes or writes (each separately, so a flood of rotations can’t block an urgent revoke) when activity exceeds your hourly caps, alerts you and keeps the current keys working.
An app or its environment variables leak
- With the key gateway, apps never hold the real key. They get a gateway token that only works through your agent, inside your network, for the endpoints you allowed and at the rate you set. The agent swaps in the live key on the way out. A leaked
.envis worthless elsewhere. - Without the gateway, the leaked key stops working at the next rotation, and provider-side limits (spend caps, IP allowlists, expiry) cap the damage until then.
A tampered agent release
- Release images are built by a public GitHub Actions workflow, signed with Sigstore cosign (keyless) and published with SLSA build provenance and an SBOM. Verify the signature, then pin the image by digest. The agent is MIT-licensed, so you can also build it yourself.
What this can’t protect against
- Someone with live control of the agent’s running process (root on its host while it runs) can use whatever the agent can use. KMS wrapping, the breaker and least-privilege admin credentials limit how much and for how long, and your cloud audit log shows it. Treat the agent’s host like a production database host.
- A dashboard compromised while you are approving could show you one thing and ask your passkey to sign another. Approvals only show items you created yourself, the approval page lists every item’s fingerprint, and the agent logs every approved item it starts using to your own logs. The agent also refuses anything signed for a different site, so a look-alike domain can’t collect approvals.
- Deleting an approved item isn’t signed. Someone in control of Keywheel could bring back a write target you removed, together with its old signature, if the agent never saw a newer approval for it. Pin destinations with
KEYWHEEL_ALLOWas well. - Trust starts at setup. Check the agent’s fingerprint and the passkey ids you pin against what your own devices show.
No hosted decryption
Keywheel has no key that can open your credentials or secret values, and no mode that gives it one. Your browser encrypts each one to your own agent’s public key before sending it; our servers store the ciphertext and schedule work. Until an agent is connected to a workspace, Keywheel refuses to store a secret at all. Keywheel’s background worker only does housekeeping and alerts, and its database access is scoped so it can’t load any customer’s rows.
Agent Vault
- AI agents call APIs and MCP servers through your agent, which adds the real credential at the network boundary. The AI agent only holds a session token.
- Session tokens are HMACs under a key derived from your agent’s private key and are delivered sealed to whoever asked. Keywheel never sees one and can’t forge one; it can only revoke a session.
- Each service’s host is sealed together with its credential, so nobody but you can point a credential at another host. With passkey approvals on, services and bundles also need your signature.
- The proxy only connects to public addresses, and Keywheel receives request metadata only (host, method, status). Paths and bodies stay in your agent’s logs.
- The local certificate authority the proxy uses is generated by your agent, sealed to its own key on disk, and trusted only by the processes you start through it.
Encryption
- Each credential is sealed with an ephemeral X25519 key exchange, HKDF-SHA256 and AES-256-GCM.
- Every ciphertext is bound to its own database row, so rows cannot be swapped to redirect a credential.
- Revoked key versions are deleted from storage (crypto-shredded), not just marked inactive.
- All traffic uses TLS; database connections require TLS.
Accounts
- Two-factor authentication is mandatory. Adding or deleting credentials needs a code from the last 15 minutes.
- Passwords are hashed with Argon2id. Sign-in is rate limited per IP and per account, with lockout.
- Sessions are random 256-bit tokens stored only as hashes, in HttpOnly, SameSite cookies.
Safe rotation
A new key is verified and written everywhere before the old one is revoked. If any platform rejects the update, Keywheel restores the previous values and discards the new key. Keywheel only writes the variables you mapped and never uses platform calls that replace a whole variable set.
Least privilege
Every provider page tells you how to create the narrowest credential that works — a project-scoped Railway token, an IAM policy limited to one user’s access keys, a Cloudflare token that can only manage tokens.
Auditability
Every action is recorded in a hash-chained log you can verify from the Activity page.
Reporting a vulnerability
Email security@keywheel.dev. We respond within one business day and don’t pursue good-faith researchers.