Admin sessions
Signed, HTTP-only, same-site session cookies authenticate the management surface. The management API revalidates the user and organization role before protected operations.
Security
Gatekyper handles high-value credentials and sits in the request path for paid APIs. Its security model starts with explicit trust boundaries, least privilege, safe failure, and auditable control—not security theater.
Trust boundaries
The browser, management API, request gateway, MCP server, worker, database, cache, and upstream providers have distinct responsibilities and credentials.
Signed, HTTP-only, same-site session cookies authenticate the management surface. The management API revalidates the user and organization role before protected operations.
Gate Tokens authenticate gateway calls only. They do not grant dashboard administration and are useless when presented directly to an upstream provider.
MCP clients map to known actors and permission levels. Agents can read their own state and request access without receiving provider credentials.
Upstream secrets are accepted by the Provider Vault and unlocked by the gateway only after a request passes identity, route, and policy checks.
Provider Vault
The Provider Vault is designed so a normal read path returns identification metadata, not the reusable secret.
Gate Tokens
A Gate Token has a public lookup identifier and a high-entropy secret. Only the lookup identifier and a peppered HMAC of the secret are retained.
Each secret is generated from cryptographically secure random bytes and belongs to a named token kind and owner.
The gateway looks up the public identifier, recomputes the keyed HMAC, and compares the result in constant time.
Expiration, scope, budget, rate, environment, and revocation controls limit what a leaked Gate Token can do.
Runtime enforcement
Unknown, missing, expired, revoked, or out-of-policy requests stop before the upstream provider call.
A token without a valid attached policy cannot proxy traffic. Unknown provider routes and arbitrary target URLs are not forwarded.
Token, policy, hard-budget, credential-decryption, and kill-switch errors deny the operation when the boundary cannot be evaluated.
Production access must be granted deliberately. Development or temporary identities do not inherit it by implication.
A hard-stop budget reserves a conservative estimate before forwarding, preventing concurrent requests from all passing one stale check.
Observed usage settles the reservation. When provider cost arrives late or usage is incomplete, the result remains an estimate rather than a false exact number.
Blocked requests write denial events and do not masquerade as provider usage. Requests that reach a provider write usage events.
Privacy
Gatekyper needs enough information to enforce and explain access. It does not need to retain application content to do that.
Request identifier, token and actor identifiers, provider, capability, model, endpoint, policy decision, status, latency, and estimated usage or cost.
Authorization headers, provider keys, Gate Token plaintext, cookies, prompts, responses, file contents, and raw application payloads.
Threat model summary
The model focuses on realistic failure paths around secrets, machine identities, policy, and the network boundary.
Authenticated encryption, redacted display, no read-back, runtime-only decryption, and sensitive-header stripping.
Hash-only storage, expiration, tight scopes, budgets, rates, usage visibility, and independent revocation.
Conservative budget reservation, per-request estimates, rate controls, expiry, denials, and kill switches.
Request-only MCP defaults, bounded auto-approval templates, human review, and audit events.
Allowlisted adapters and known routes; no arbitrary URL proxy in the current product.
Append-only application APIs and no dashboard update/delete surface; stronger external integrity controls remain future work.
Operator responsibility
Self-hosting keeps the control plane within infrastructure you operate, but it does not remove operational responsibility.
Protect application secrets, database and cache access, backups, transport security, the reverse proxy, and the machine running the services. Keep the master encryption key separate from database backups.
Restrict exposed interfaces, review audit and denial activity, use narrow provider credentials as defense in depth, and test rotation and recovery procedures before an incident.
Gatekyper does not claim a certification, external audit, perfect spend precision, or immunity from compromise. Review the source and deploy it according to your own risk requirements.
Private disclosure
Email security@gatekyper.dev with the affected version, impact, reproduction details, and a safe way to follow up. Do not publish an exploitable issue before a fix can be coordinated.
Real keys in. Scoped tokens out.
Read the architecture and gateway documentation, inspect the source, and begin with a local deployment and a tightly scoped test identity.