Raz0r DB RTFM
◆ All manuals →
Read the manual — 刃

Raz0r DB — the cell-secure graph database

raz0rdb is a property-graph database written in Rust where security is a property of every cell, not a layer bolted on top. Each value carries a boolean visibility expression over clearance labels; a query only ever returns the cells the caller is cleared to see. On top of that sit an anti-exfiltration governor, a cryptographically-provable audit, and MVCC durability. This manual covers the model, connecting, querying, and operating it.

What raz0rdb is

Neo4j data model · Accumulo cell security · an AI access governor

Think Neo4j's labelled property graph and openCypher, with Accumulo-style cell visibility fused into the storage engine, plus a governor that watches for exfiltration and an audit log you can prove wasn't tampered with. It speaks Bolt (Neo4j-compatible), gRPC, and a native MCP endpoint for AI agents. Storage is MVCC over an embedded key–value store with a write-ahead log; the whole thing ships as a single container.

Everything here is enforced in the engine. The security model is not a view or a middleware filter — an under-cleared caller cannot see a hidden cell through any surface: query, EXPLAIN, aggregate, or analytics.

The security model — cell visibility

the core primitive

Every stored value (a property, a label, an edge) carries a visibility expression: a boolean formula over security labels, e.g. (TS & CRYPTO) | S. A principal holds a set of labels (their clearance); a cell is visible to them iff the expression evaluates true against that set.

  • S — visible to anyone holding label S.
  • TS & CRYPTO — needs both labels.
  • (TS & CRYPTO) | ADMIN — either the compartment, or an admin override.
  • An empty expression means public (visible to all) — the Accumulo ColumnVisibility model.
Cell security is fail-closed: a corrupt or undecodable cell is treated as deny, never as public. Values are the atomic unit — two people running the same query can get different rows, and neither learns what the other saw.

Connecting & authenticating

Bolt · gRPC · MCP — HMAC bearer auth

Pick the surface that fits your client:

Bolt
Drive it with any Neo4j driver — raz0rdb answers the Bolt handshake and openCypher.
gRPC
The typed service for application back-ends and the console.
MCP
A native Model Context Protocol endpoint so AI agents get graph tools with the security enforced inside the engine — an agent never sees a cell above its clearance.

Identity is authenticated, not asserted: present a signed HMAC bearer token; the engine derives your principal (and therefore your clearance labels) from the verified credential. The days of a self-declared principal in a request body are gone.

Querying with openCypher

MATCH · WHERE · WITH · RETURN · ORDER/SKIP/LIMIT

Read queries use the openCypher you already know — pattern match, filter, pipeline through WITH, project or aggregate in RETURN, then order/paginate. Writes use CREATE / SET / DELETE, transactional and durable. Every read is clearance-filtered as it executes, and a cost-based optimiser reorders the pattern to anchor on the most selective node.

Time-travel reads are first class: AS OF <version> pins a query to a historical MVCC snapshot.

Plans — EXPLAIN & PROFILE

EXPLAIN <query> · PROFILE <query>

Prefix a read with EXPLAIN to see the chosen plan (anchor, index-vs-scan, expansion order, estimated rows) without executing, or PROFILE to run it and annotate the actual rows and store hits.

The estimates are visibility-aware: a value-equality anchor over cells you cannot see estimates 0. EXPLAIN can never be turned into an oracle that confirms or counts hidden values — the plan shape is structural, the numbers respect your clearance.

Graph analytics — cell-secure

similarity · link prediction · neighbourhoods

raz0rdb ships a suite of graph-data-science primitives — neighbourhood overlap, common neighbours, Adamic–Adar, preferential attachment, and link prediction — all computed filter-then-compute: an edge or node you can't see contributes nothing to a score. Analytics run relative to your clearance, so two analysts get answers consistent with what each is allowed to know.

The access governor — anti-exfiltration

probe · volume · breadth · rate · absolute budget

Authorised access can still be abuse — a cleared insider bulk-reading everything. The governor scores every read against the principal's own learned baseline on four signals — probe (fraction of touched cells that were denied — recon), volume, breadth (fan-out), and a token-bucket rate — and escalates Allow → Throttle → Trip. The baseline only learns while calm, so an attack can't train itself normal. No model runs in the read path; it's online adaptive scoring.

Set an absolute volume budget (abs_volume_cap) per deployment: even a fully-cleared principal drip-reading slowly is sealed once they've drained the budget, so no single identity can quietly exfiltrate the whole store.

The provable audit

Ed25519-signed Merkle checkpoints · external witness

Every access is recorded in an append-only, hash-chained audit log — an RFC-6962-style Merkle transparency log with inclusion and consistency proofs. Crucially, checkpoints are Ed25519-signed by an external witness whose key the database does not hold, and the verifier takes the expected root as an operator-pinned input. An operator who edits the log cannot forge a matching proof: tampering is detectable, not merely discouraged.

Clearance labels & identity

the label registry

Principals are bound to a cryptographic identity; the labels they hold come from the registry, not from anything they say. Write cells with the visibility expression the data warrants; grant principals the labels their role warrants. The intersection is what they see — enforced on every cell, every read.

Durability — MVCC + WAL

snapshots · write-ahead log · crash recovery

Writes go through a write-ahead log fsync'd before acknowledgement, then into an MVCC store, so a crash recovers to a consistent point and a torn tail is discarded rather than trusted. MVCC snapshots power AS OF time-travel and give readers a stable view without blocking writers.

Running raz0rdb

Docker · configuration

raz0rdb builds and ships as a single container. Bring it up with Docker; point your Bolt/gRPC/MCP client at it. Key hardening knobs for a classified deployment:

  • abs_volume_cap — the per-principal absolute read budget (0 = unlimited).
  • Encryption — turn value encryption on for classified data at rest.
  • Bind write/audit/MCP surfaces to your management (e.g. WireGuard) interface.
Builds are Docker-based (cargo test runs in the rust:1 image). The engine is covered by 100+ tests including fuzz harnesses for the cell codec, WAL replay, and the visibility parser.

Security posture — what's enforced

the perimeter, honestly

What the engine guarantees today: cryptographic authN (no self-asserted identity); in-engine cell security across query, EXPLAIN/PROFILE, aggregates and analytics; fail-closed on corrupt cells; the anti-exfiltration governor with an absolute budget; and a witness-signed, externally-verifiable audit.

Deployment responsibilities: enable encryption for classified data at rest, set an absolute volume budget, and network-isolate the management surfaces. Treat query results that re-enter an AI model as untrusted, and pin the audit witness key out of band.