Enterprise · for architects and security teams

What your architecture and security review will ask, answered on one page

Single sign-on and roles, an audit log your SIEM holds a copy of, several instances with backup and restore, FIPS-approved cryptography and signed releases. Every claim links to the document, test or command that backs it, and the whole set downloads as one security pack.

Download the security pack Read the overview
✓Self-hostedRuns in your network. No telemetry, no licence server, nothing sent to the project.
✓Your identity providerConsole sign-in through OIDC, with roles from your groups.
✓A signed audit trailTamper-evident, verifiable, streamed to your SIEM.
✓No single instance to loseSeveral interchangeable instances on PostgreSQL and Redis.
✓FIPS-approved cryptographyEvery algorithm approved; validated on a FIPS-mode OpenSSL.
✓Signed releasesImage and chart signed, with an SBOM and provenance, since 0.31.
01 · Identity and access

Your identity provider decides who administers it

People sign in through your SSO and get a role from your groups. Services, partners and AI agents each get exactly the queries they need, and no more.

Single sign-on

Console sign-in through OIDC

Authorization code flow with PKCE, as a confidential client: the browser never holds a token. People are bound by the provider's sub, and their role comes from their groups at every sign-in. QUERYAPIGATE_SSO_ONLY removes personal tokens so nobody routes around your MFA.

Break-glass

A way in when the provider is down

The shared admin key stays an owner for emergencies. Once a named owner exists, every use of it is logged, audited as break_glass_used and alerted. The last active owner can't be locked out by accident.

Leavers

Off in your IdP, off here

Someone removed from your groups loses their role at the next sign-in; a session already open lasts until it expires (8 hours by default). Deactivating them in QueryAPIGate ends it at once.

Four fixed administrator roles

Every management operation needs one capability, checked before the route runs; a test fails if an operation has no entry, so a new route can't ship unguarded. Roles bound what an administrator can change. For data, the database account behind each connection is still the backstop.

RoleCan changeData plane
ownerEverything, including administratorsAny SQL, every connection
adminConnections, API keys and roles, queries, cacheAny SQL, every connection
developerSaved queries and collectionsAny SQL, every connection
auditorNothing: reads configuration, the audit log and historyNone
Partners and services

Scoped keys, least privilege by default

Grants per saved query, collection or connection; read-only unless writes are granted; table allow-lists; IP allow-lists; expiry; rotation without downtime; rate limits, quotas and concurrency caps per key.

Your applications' users

Tokens from your identity provider

Signed-in users call with a JWT checked against your JWKS. A parameter can be bound from a claim, so a user's tenant_id or email comes from the token, not the request.

AI agents

Governed like any other caller

MCP clients sign in through OAuth 2.1 or use a scoped key, and see only the saved queries they are granted. A write proposed by an agent waits for a person to approve it, and both are audited.

02 · Audit and monitoring

Who changed what, in a record your SIEM already holds

Every configuration change is in a hash-chained audit log, signed with a key kept outside the store and streamed to your SIEM, so a later rewrite contradicts a copy someone else holds.

Tamper-evident

A signed hash chain

Each entry's hash covers the one before it, so changing, removing, inserting or reordering an entry breaks every hash after it. With QUERYAPIGATE_AUDIT_KEY the chain is HMAC-signed with a key outside the store. The server checks it every 5 minutes.

To your SIEM

Syslog over mutual TLS, or OTLP

Each entry is sent with its sequence number and hash. Tested on every push against rsyslog, syslog-ng and the OpenTelemetry Collector, including refused certificates and an outage. Stable since 0.32.

Run history

Every call, attributed

Who ran which query version, from which front door, with status, rows and duration. Parameter values are never recorded.

Operations

Metrics, alerts and traces

Prometheus metrics per key, a Grafana dashboard, 25 kinds of alert, request IDs in structured logs. OpenTelemetry tracing is experimental.

Access

See who can reach what

Which keys can call a query and what a key can call, from the grants as they add up. Every change to a key or a role is in the audit log.

audit · verify
$ queryapigate audit verify
# checks the chain in the store, naming the first broken entry

$ queryapigate audit verify --file siem-export.log
# checks the copy your SIEM received, on its own:
# exact repeats from at-least-once delivery dropped,
# a repeat that differs reported as conflicting_copies

What the chain can't show on its own: the newest entries deleted, or a rewrite by someone holding both the store and the key. That is why the copy in your SIEM matters. The audit trail in the threat model →

03 · Changes through review Stable

Every change through review, if that's your rule

Connections, saved queries, roles and keys as one YAML file in git. A pull request shows the diff against prod; merging applies it, all or nothing.

Locked

QUERYAPIGATE_CONFIG_LOCKED refuses changes made in the Console or the API to anything the file manages.

Drift

Without the lock, a change by hand shows in the next diff, and the next apply undoes it.

No secret in git

A password is a reference (an environment variable, a file, Vault or AWS), never a value, and a file with one in it is refused. Keys are SHA-256 hashes of random secrets, rotated by pull request.

Guide 55 →
04 · Availability and recovery

Grow from one container to several without a migration

On a PostgreSQL store with Redis, everything an instance owns is shared, so instances are interchangeable and any of them can serve any request.

One instanceSeveral instances
StoreSQLite on a volume, or PostgreSQLPostgreSQL
RedisOptional: a cache that survives restartsRequired: rate limits, quotas and the response cache, shared
Live eventsGET /events on the instancequeryapigate events, routed by the proxy
When an instance failsRestart on failureThe load balancer skips it; the others serve every request
On KubernetesOne pod; upgrades replace it, a few seconds downRolling, one pod at a time, maxUnavailable: 0, a PodDisruptionBudget
Tested, not promised

Three real servers on every CI run

A multi-instance test runs three servers on one store on every change. The reference deployment was run end to end: a key's 4-per-minute limit allowed exactly four calls across all three instances, and with one instance stopped, twelve calls in a row still succeeded.

Kubernetes

A signed Helm chart

Stable since 0.30. Non-root, read-only root filesystem, every capability dropped, no service account token, an optional NetworkPolicy and autoscaling. It refuses, before changing anything, a setup that can't work, such as several pods on SQLite.

Upgrades

Every store upgrades itself

Each release upgrades the store on its first start. Several instances on one store are replaced one at a time with no downtime, checked in CI against the previous release. Patch releases never break a covered surface; minor releases say so under Breaking.

Backup and restore

Everything QueryAPIGate owns, from connections and saved queries to keys, roles, history and the audit log, lives in its store. Back it up while it serves; restore one now and then, because a backup nobody has restored is not a backup.

Kept out of a backup on purpose: QUERYAPIGATE_SECRET_KEY, which encrypts connection passwords, the admin key, and any environment variable a connection refers to. Keep them in your secrets manager. Scoped keys are in the store as hashes, so they keep working after a restore.

backup
# SQLite: a consistent copy while the server keeps running
$ queryapigate backup /data/backup.db --force

# PostgreSQL: one snapshot, safe while serving
$ pg_dump --format=custom --schema=public --no-owner --no-privileges \
    --file="queryapigate-$(date +%F).dump" "$QUERYAPIGATE_DATABASE_URL"
05 · Cryptography and supply chain

Approved algorithms, and releases you can verify before they run

Every algorithm is FIPS-approved, and a test fails if the code gains one that isn't. Every release since 0.31 is signed, with an SBOM and provenance you can check by digest.

FIPS 140-3

Validation is a property of the cryptographic module, not of the application. QueryAPIGate uses only FIPS-approved algorithms (FIPS 140-3, SP 800-131A); run it on a validated OpenSSL in FIPS mode, such as Red Hat Enterprise Linux 9 with fips=1 or Ubuntu Pro FIPS, with Python's cryptography from the distribution, and the cryptography it uses is validated.

ProtectsAlgorithm
Connection passwords at restFernet: AES-128-CBC and HMAC-SHA256
API keys, admin tokens, Console sessionsStored as SHA-256 hashes
The audit log's chainHMAC-SHA256
Console sign-inPKCE with SHA-256 (S256)
Keys, tokens and ids it createsThe operating system's random source
Signed-in users' tokensRS256 with your JWKS, or HS256

Signed releases, SBOM and provenance

The image and the Helm chart are signed keyless with cosign by the release workflow, by digest. Each platform carries an SPDX 2.3 SBOM and SLSA provenance naming the repository, workflow, commit and run. Every GitHub Action is pinned by commit and the base images by digest.

cosign · verify
$ cosign verify ghcr.io/anantharajuc/queryapigate:{{ entVer }} \
    --certificate-identity https://github.com/AnanthaRajuC/QueryAPIGate/.github/workflows/docker.yml@refs/tags/v{{ entVer }} \
    --certificate-oidc-issuer https://token.actions.githubusercontent.com

$ docker buildx imagetools inspect ghcr.io/anantharajuc/queryapigate:{{ entVer }} --format '{{json .SBOM}}'

Admit only signed releases to a cluster with Sigstore's policy-controller or Kyverno; both policies are in the guide, tested against signed, unsigned and wrongly signed images.

The project's own security practices are scored by OpenSSF Scorecard, an independent automated check from the Open Source Security Foundation. It runs on every change to the main branch and once a week, and the badge below always shows the latest score.

OpenSSF Scorecard score for QueryAPIGate
06 · Security pack

Everything a vendor-risk review asks for, in one download

Seven documents for QueryAPIGate 0.34.2, as one PDF to attach to your review or as Markdown to diff against the next release. Each can also be read here.

Download the security pack (PDF) Markdown files (.zip)
DOC 01Architecture overviewComponents, the trust boundary, the eight steps every request passes, state and data flows, deployment shapes.Read →
DOC 02Security questionnaire answers80 questions in the shape of SIG Lite and CAIQ, each answered from the documentation with its source, and marked where the answer is yours.Read →
DOC 03Threat modelWhat each control defends against, how it works, where it stops, and what is out of scope.Read →
DOC 04Where data goesWhat is kept and for how long, personal data, every outbound path, erasure, and every algorithm.Read →
DOC 05Security policyReporting a vulnerability, supported versions, verifying a release, the hardening checklist.Read →
DOC 06Production deploymentThe image, secrets, backups and restores, observability, several instances, Kubernetes, upgrades.Read →
DOC 07SBOM and release verificationThe 0.34.2 image and chart digests, the signing identity, and how to read the SBOM and provenance.Read →

Where data goes

Every table QueryAPIGate keeps, what personal data it holds, for how long and who reads it, on one page. A test fails if a table is missing from it.

Erasure

queryapigate history forget erases a person's runs, events and usage counts, recorded in the audit log by a hash of who, not their name.

The pack is built from the documentation in the repository at 0.34.2. The SBOM itself is read from the image you run, by digest, rather than copied into the pack.

07 · Shared responsibility

What it does, what stays yours, and what we don't claim

Software you run inherits your controls. This is the split a reviewer will ask about, stated plainly.

QueryAPIGate providesYou provide
Runs inside your network, sends nothing to the projectThe network it runs in, and what may reach it
Authentication, grants, roles, masking, limits, the audit logTLS termination at your reverse proxy or ingress
SSO through your identity providerMFA and group membership in the identity provider
Read-only by default; a SQL guard on every statementLeast-privileged database accounts behind each connection
Online backups and automatic store upgradesBackup schedules, off-site copies and restore drills
Secrets from files and Vault; encryption of stored passwordsYour secrets manager, and the keys kept out of backups
Security fixes against the latest releasePinning a version, watching Security entries, upgrading

No SOC 2 or ISO 27001 report

Those certify an organisation running a service. QueryAPIGate runs inside yours, under your controls; what it provides is the evidence your own assessment needs.

Experimental features are labelled

Today: H2, generic JDBC and MongoDB connections, OpenTelemetry tracing, and secrets and credentials from AWS. They sit outside the compatibility promise until they graduate.

Reporting a vulnerability

Please don't open a public issue. Use GitHub's private advisory form or email arcswdev@gmail.com. Fixes are published as Security entries in the changelog, with how to check whether you were affected.

Take the pack to your review

Architecture, threat model, data protection, questionnaire answers and release verification for 0.34.2, in one PDF. Then check the answers on your own server with guide 57.

Download the PDF Trust center