Product · Gateway
qodiqa Gateway
A self-hosted gateway that checks signed consent before any AI provider is called, and returns evidence anyone can verify.
- 7 stages
Every request passes the same gate.
- Applications and agents send a signed request to the gateway.
- Seven stages decide in order: ingress, request validation, identity and proof, consent and policy, execution, output and evidence, delivery and verification.
- Only after execution does the provider router call an AI provider. A blocked request never reaches it.
- The decision is recorded in the audit chain, the transparency log and a signed receipt, and an independent verifier checks it offline.
What is in the box.
Consent and policy, on GitHub
Per-tenant rules for consent, rate, budgets and data-loss prevention, reviewed before they go live.
Providers and streaming, on GitHub
Adapters for OpenAI, Anthropic, Gemini, Mistral, Llama and local models, one failover hop, and streamed answers.
Evidence, on GitHub
A hash-chained audit log, an RFC 6962 transparency log, signed receipts and downloadable proofs.
Identity and tenancy, on GitHub
Operator roles, optional OIDC, SAML and LDAP, and per-tenant isolation with row-level security as an extra layer.
Agents, tools and MCP, on GitHub
One artifact per action, delegation that only narrows, human approval, and a gateway for registered MCP servers.
Keys and secrets, on GitHub
Ed25519 keys encrypted at rest, rotation and revocation, and adapters for KMS, Vault and HSM.
Observability, on GitHub
Prometheus metrics, alert rules, Grafana dashboards and SIEM export.
API and SDKs, on GitHub
A generated OpenAPI contract, and SDKs for JavaScript, Python, Go and Java.
What is signed, and by which key.
- A signed artifact lives at most 60 seconds, works once and is bound to the method, path and body.
- An execution check and an INTENT entry come before the provider call.
- The audit chain, a Merkle leaf and a signed checkpoint record the decision, under three separate Ed25519 trust domains.
- A receipt names one entry and one leaf, and an offline verifier checks it.
Build it, run it, decide on it.
Start the sandbox in three commands, check the facts, then see how it deploys and what it means for your team.
Quickstart
git clone https://github.com/qodiqa/qodiqa-gateway.git && cd qodiqa-gateway
docker compose -f docker-compose.quickstart.yml upExpectedThe gateway listens on http://127.0.0.1:3000; /health answers {"status":"ok", ...}.
docker compose -f docker-compose.quickstart.yml logs | grep "Authorization: Bearer"ExpectedOne log line with Authorization: Bearer <key>. Keep the key for the next step.
SK=<the key from the log>
ARTIFACT=$(curl -s -X POST localhost:3000/sign -H "Authorization: Bearer $SK" -H 'content-type: application/json' \
-d '{"request":{"method":"POST","path":"/ai/chat","body":{"prompt":"hello"}},"payload":{"userId":"me"},"ttl":60000}' \
| jq -c '.artifact // .' | base64 | tr -d '\n')
curl -s -X POST localhost:3000/ai/chat -H 'content-type: application/json' -H "x-qodiqa-artifact: $ARTIFACT" -d '{"prompt":"hello"}'
# {"decision":"EXECUTE","response":"[sandbox] hello", ...}Expected{"decision":
The sandbox uses a built-in stand-in for the AI model, so no provider account is needed. It is for evaluation, not for deployment. Full quickstartUse the prompt sandbox-block-me please in both places to see a BLOCK.
Specification
| Protocol and algorithms | |
|---|---|
| Signatures | Ed25519 only, with no algorithm negotiation |
| Hashing | SHA-256 with domain tags of the form QODIQA::NAME::V1 |
| Transparency log | RFC 6962 Merkle tree over SHA-256, with signed roots |
| HMAC-SHA256 | Execution binding, DLP redaction tokens, backup seal and webhook signatures |
| API surface | |
| HTTP API | OpenAPI contract generated from the code (docs/api/openapi.json) |
| Public keys | /.well-known/qodiqa/keys and /.well-known/qodiqa/transparency-keys |
| Health, metrics | /health, /ready, and /metrics in Prometheus text format |
| Runtime and storage | |
|---|---|
| Node.js | 22 or later |
| PostgreSQL | Versions 15 to 18; required in production |
| Redis | 6.0 or later; replay nonces, anomaly windows, rate limits |
| SDKs (installed from the repository, not published to registries) | |
| JavaScript | @qodiqa/sdk 1.0.0, Node.js 18 or later |
| Python | qodiqa 1.0.0, Python 3.9 or later |
| Go, Java | Go 1.21 module; qodiqa-sdk 1.0.0 for Java 17. Protocol V1 only |
| Deployment files in the repository | |
| Included | Dockerfile, quickstart and production compose files, Helm chart, Terraform module, Kustomize manifests, systemd units for backup |
Deploy and operate
/health while the process is up; /ready answers 200 or 503.
Metrics/metrics in Prometheus text format, with alert rules and Grafana dashboards.
ConfigurationEnvironment variables. It refuses to start when a required secret is missing.
Backup and recoveryRunbooks, and systemd units for scheduled backup and restore checks.
Manifests are included for containers and Kubernetes. The repository states they were exercised on local development clusters and that a production profile needs your own validation.
For decision-makers
The problem
AI requests go to model providers with no proof that the right party agreed to them, and no record that someone else can check afterwards.
What you get
A gate in front of the providers that refuses unauthorised requests before anything is called, and evidence for every decision that an outside party can verify.
How it fits
It runs on your own infrastructure between your applications and your providers. Your providers, keys and identity systems stay yours.
