Verifiable audit chain
Every event is hash-chained to the one before it. Tampering breaks the chain, and verification is a single pass over the log.
GrantLayer is an open-source, multi-tenant system for issuing time-boxed access grants, enforcing them through a policy engine, and recording every decision in a cryptographically verifiable audit trail.
Each of these is shipped and tested today — not a roadmap. Authentication, policy, isolation, and audit are built in, not bolted on.
Every event is hash-chained to the one before it. Tampering breaks the chain, and verification is a single pass over the log.
Tenant and workspace boundaries are enforced in the data layer with fail-closed defaults — isolation by construction, not convention.
Bring your own identity provider. Validated tokens, JWKS caching, and strict issuer/audience checks come standard.
Issue fine-grained, revocable keys with explicit scopes. Enforcement is centralized so a key can never exceed what it was granted.
Authorization decisions are delegated to Open Policy Agent and fail closed — if policy can't be evaluated, access is denied.
Outbound events are signed and SSRF-protected, so downstream systems can trust both the source and the payload.
Each audit event carries the SHA-256 hash of the event before it. Records form a chain: alter one field and every hash downstream stops matching.
Grants themselves are independently Ed25519-signed over their immutable fields, so a stored grant can't be silently rewritten either. Verification is deterministic and runs in a single pass.
GrantLayer is a fully async FastAPI service with a clean repository and service-layer separation, SQLAlchemy ORM throughout (no raw SQL), and PostgreSQL and Redis for state and rate limiting. The same code runs on SQLite for local development.
Clone the repository and bring up the full stack with Docker Compose. No account, no waitlist, no managed plan — it's yours to run, on your own infrastructure.
# clone and start the full stack git clone https://github.com/discodone/grantlayer cd grantlayer docker compose up -d # the API is live on localhost curl http://localhost:8765/health # → {"status":"ok","service":"grantlayer"}
Every capability is reachable over a versioned REST API documented with OpenAPI. The Python SDK is published on PyPI — pip install grantlayer. The TypeScript SDK ships in the repository and builds from source; it is not yet published to npm.
// built from source: sdk-js/ in the repo (not yet on npm) import { GrantLayerClient } from "grantlayer-sdk"; const gl = new GrantLayerClient({ baseUrl: "http://localhost:8765", apiKey: process.env.GRANTLAYER_API_KEY!, }); // list grants — server-side scoped to the key's workspace const grants = await gl.listGrants({ limit: 20 });
GrantLayer is built and maintained by a solo developer. Much of it was implemented by autonomous AI agents working issue-by-issue, with every change held to the same gate — a full passing test suite, type checks, and lint — and reviewed across multiple independent models before merging. For current test, coverage, and version numbers, see the repository.
GrantLayer is open source under the Apache 2.0 license. Clone it, audit it, and self-host it today.