Vault-OS Background Paths
Vault-OS Background Paths
[ Return_to_Main_Terminal ]
Ref: MANIFEST_1.0.9.1_ARCHITECTURE
IronGap Technologies

Vault-OS
Architecture & Whitepaper

Status: PROPRIETARY / COMMERCIAL-GRADE / HARDENED

Clearance: TOP SECRET / COMPARTMENTALIZED

License: Hardware-Tethered (ECDSA Signed)

[ SYSTEM SEALED. OFFLINE MANIFEST. ]

AIR-GAPPED ENCLAVETPM 2.0 Hardware Bound
Local VRAM 0 Egress
01

Executive Summary

The Air-Gapped AI Vault (Vault-OS) is an ultra-secure, multi-tenant Intelligence Platform engineered for "Absolute Zero" internet environments. It is designed to serve as a hardened, black-box cognitive appliance that runs large-language-model inference and retrieval-augmented generation entirely behind an air gap, with no internet egress by design. Every model executes locally against on-host accelerators.

This revision documents v1.0.9.1. Since the workflow engine landed, the platform has gained an encrypted enclave built with the customer's own master password, a natively bundled PostgreSQL that removed the last container dependency, multi-party group collaboration with the assistant as a participant, local speech-to-text, an internal folder explorer, and a dedicated client application that is now the only way in. Each is covered in its own section below.

9
Clearance Tiers
19
Workflow Nodes
3
Inference Engines
0
Egress Paths

Tech Stack Snapshot

Control Plane
Fastify 5 (Node.js), HTTP API, hooks, decorators
Console (Frontend)
React 19, Vite, Zustand, React-Flow (DAG Editor)
Datastore
PostgreSQL + pgvector, natively bundled and run as a service — no container runtime (HNSW vector_cosine_ops indexing)
Inference Fabric
Ollama, vLLM, TensorRT-LLM (gemma4:e4b chat/vision/tools, llava vision, nomic-embed-text embeddings, Whisper speech-to-text)
Storage Enclave
BitLocker-encrypted VHDX volume under the customer's own master password, mounted to an ACL-restricted directory rather than a drive letter
Auth & Gateway
JWT session version tracking, TOTP tickets, machine-to-machine API key bcrypt gateway
Crypto Enclave
AES-256-GCM memory sealing, scrypt password hashing, RSA/EC ledger signatures
Scheduling & Ingest
Chokidar dropzone watch, SKIP LOCKED pg queues, node-cron, pg LISTEN/NOTIFY
02

Design Philosophy & Threat Posture

Vault-OS assumes a hostile environment: a stolen drive, a cloned VM image, a terminated insider with a still-valid token, or a compromised endpoint on the LAN. Every design decision answer defeats a specific adversary.

PrincipleMechanismAdversary Defeated
Air-GappedLocal-only inference; internal-only workflow nodes; no telemetry phone-home; CORS anchored to localhost only.Data exfiltration; cloud provider exposure.
Zero-TrustPer-request JWT verify + DB status + `token_version` check; RBAC filtered retrieval; ephemeral dropzone storage.Replayed tokens; terminated insiders; lateral movement.
Fail-DeadlyAbsent `JWT_SECRET`, `AES_SECRET_KEY` or `AUDIT_PRIVATE_KEY` leads to immediate `process.exit(1)`. Decorators fail closed.Misconfiguration; silent degradation.
Hardware-TetheredSHA-256 fingerprint of machine UUID + MAC + TPM endorsement key checked against `LICENSE.vault` before services start.Drive theft; image cloning; unlicensed redeployment.
03

System Architecture

Vault-OS is a three-tier appliance: a React command console, a Fastify control plane, and a Postgres + pgvector knowledge store, fronting a pluggable local inference fabric. All tiers are co-residing on a single air-gapped host or isolated internal segment.

Operator Console

React 19 + Vite + Zustand single page application. Provides Vault chat, overseer panel, workflow DAG editor, and live SSE hardware monitor.

Control Plane

Fastify 5 (Node.js) HTTP API and hooks. Enforces RBAC decorators, manages RAG pipelines, executes the workflow DAG engine, and broadcasts HAL telemetry.

Knowledge Store & Inference

PostgreSQL with pgvector for AES-encrypted chunks. Pluggable inference fabric handles Ollama, vLLM, and TensorRT-LLM local model adapters.

04

Secure Boot & Hardware Tethering

Vault-OS does not start as a normal Node process. The entrypoint `index.js` is a **sealed bootloader** that performs hardware attestation and decrypts the environment in memory before a single line of server code runs:

// Boot chain: index.js -> src/server.js
0. RECLAIM: Lock any volume a forced kill left attached
            (refuses to continue if it cannot)
1. ATTEST:  HW fingerprint vs LICENSE.vault
2. UNSEAL:  Master password -> scrypt -> AES key
3. DECRYPT: .env.vault GCM -> process.env
4. MOUNT:   BitLocker enclave -> ACL'd directory
            (never a drive letter, at any point)
5. DB:      Start bundled PostgreSQL + pgvector
6. SERVE:   Start Fastify, then CONFIRM it answers
            its own health check before handing over

// One socket serves the whole pre-boot phase and is
// released only once the application is confirmed up.

Silicon Lock attestation

The Hardware Abstraction Layer reads Motherboard UUID, MAC address, and TPM 2.0 endorsement key hash. The composite fingerprint is compared to `LICENSE.vault`. A missing license is fatal. Sealing to new hardware requires `VAULT_PROVISION_LICENSE=true` during initial deployment.

Environment Sealing: Critical secrets are encrypted using AES-256-GCM with a key derived from the operator master password via scrypt. Payload format: `SALT:IV:AUTHTAG:CIPHERTEXT` (all hex).

One continuous surface

First-run setup, master-password unlock and the startup that follows are a single page over a single socket, held open until the application is confirmed answering on its own listener. Earlier builds closed it first, leaving several minutes — mounting the enclave, initialising PostgreSQL, starting the engine — with nothing listening anywhere. The browser tab was not slow during that window; it was dead.

Every stage reports itself: what is happening, how far through the whole startup it is, and whether it is working or waiting for you. A stage that can measure itself shows real progress; one that cannot shows that it cannot, rather than a bar sitting at zero that reads as stuck.

Interrupted installs resume

First run unpacks roughly 22GB into the encrypted volume. Losing power partway does not discard it: the volume and its completed encryption are kept, and only entries that did not finish are written again — compared by size, so a file cut off mid-write is redone rather than trusted. Completion is recorded only after the final entry lands, so an existing volume is never mistaken for a finished installation.

Shutdown is verified, not assumed: BitLocker tracks the unlocked state on the volume rather than the attachment, so detaching is not locking. Shutdown locks, detaches, then re-checks, retrying once. If the enclave is still readable it reports that plainly instead of claiming a clean exit.

05

Cryptographic Subsystem

Three independent cryptographic domains protect the vault: the sealed environment (boot), data at rest (knowledge), and the tamper-evident audit ledger. Each uses a distinct key, so compromise of one does not cascade.

Encryption at Rest

Document chunks and chat messages are encrypted with AES-256-GCM. The key is the SHA-256 digest of `AES_SECRET_KEY`. Vector embeddings remain plaintext to perform cosine math.

Tamper-Evident Audit Ledger

Privileged actions are written to `security_logs` via a hash chain. Each entry hashes `prevHash | user | action | details`. Hash is signed with `AUDIT_PRIVATE_KEY` (ECDSA) and mirrored to `logs/audit.log`.

Encrypted Backups

The backup subsystem streams `pg_dump` through AES-256-GCM under a separate `MASTER_RECOVERY_KEY` (32-byte hex key). Recovery key is stored only inside the sealed memory environment.

06

Identity, Authentication & RBAC

Authentication is stateless in transport but stateful in trust: a signed JWT carries the claim, but every protected request re-confirms that the user is active, not terminated, and matches the live database `token_version`.

Two-Factor Login with Pre-Auth Tickets

Login is a two-stage exchange. `POST /auth/verify` validates the credentials and returns a short-lived `totp_pending` token. The user must call `POST /auth/totp-verify` with the OTP to receive a full session JWT. All routing decorators reject `totp_pending` tokens.

Machine-to-Machine API Gateway

Inbound service keys are hashed using bcrypt. gateway calls traverse the identical zero-trust chain as a human session (revocation, RBAC, rate limits) and are written to the signed ledger. The gateway is inbound-only and never originates outbound traffic.

07

Knowledge Ingestion Pipeline

Documents enter the vault through an autonomous, fault-tolerant pipeline that parses, enriches, vectorizes, and encrypts content—then **securely destroys** the original dropzone file. Nothing transient lingers on disk.

1. Watch & Hash

`chokidar` watcher monitors `vault_dropzone/`. New files are instantly SHA-256 hashed and enqueued in `ingestion_jobs` for idempotency check.

2. SKIP LOCKED Queue

Workers claim jobs using `FOR UPDATE SKIP LOCKED`, allowing up to 4 concurrent parser threads with zero double-processing races.

3. Semantic Ingestion

Text is parsed and split with semantic chunking (~1000 chars, 200 overlap). Images are routed to the local `llava` vision model to generate text descriptions.

4. Encrypt & Shred

Chunks are vectorized (nomic-embed-text) and encrypted (AES-256-GCM) into Postgres. The original dropzone file is instantly `unlink`ed.

08

Retrieval & Inference Fabric

Answers are grounded in the vault's own documents through a hybrid retrieval pipeline, then generated by a pluggable local inference engine under strict, role-bound hardware VRAM governance.

searchSimilar() Hybrid RAG

Fuses two signals: a fast lexical pass (ILIKE over the entity table) finds named entities, and a vector pass ranks chunks by cosine distance (`embedding <=> query`). Direct entity hits receive a **+0.3 relevance boost**, followed by decryption and SHA-256 redundancy checks.

Every query is scoped to the caller's clearance. Non-privileged roles only retrieve chunks where `department` matches (or is `All`) and the file's `clearance_tier` is at or below the user's tier. Documents owned by terminated users are filtered out ("ghost-query" suppression).

09

Autonomous Workflow & Agent Engine

Cleared operators visually compose directed acyclic graphs (DAGs) of agents, tools, and conditions that execute entirely inside the air-gap — scheduled, event-driven, or gated on human approval.

// CLEARANCE BOUNDARY

The entire engine sits behind `requireNeuralClearance`. Only `admin` and `Chairman` roles may author, execute, or inspect workflows. Violation triggers: "IronGap Protocol Violation. Only sysadmins can access the autonomous agent network."

The DAG Execution Model

On execution, the engine performs a **Kahn topological sort** on the workflow's nodes and edges; cycles are rejected. Nodes run in dependency order against a shared, JSON-interpolated `executionState`. Runs are wrapped in a 300s timeout and logged to `agent_executions`.

Node TypeFunctionSecurity Control
trigger_*Manual, cron, webhook, file-drop, or pg-event entrypointsRequires Neural clearance to author
llm_agent / agent_reactReAct reasoning loop with tools (pgvector_search, internal_ner, final_answer)15-iteration loop cap (VRAM guard)
pgvector_searchDepartment-scoped vector retrievalOwner department filter enforced
postgres_queryRead-only SQL querySELECT-only; denies users/api_keys/config tables
js_sandboxInline JS transformation2s timeout; Node VM sandbox
file_system_writeWrite artifact to dropzonePath-traversal jailed to vault_dropzone/
run_isolated_taskExecute a bounded, isolated sub-taskNo shell; argv mapping; no network namespace
switch_router / data_transformMulti-way branching; in-graph data reshapingPure functions over prior node output
approval_gate / time_window_gateHuman sign-off; time-of-day execution boundsBlocks the branch until satisfied
vram_purge / notifyFree model VRAM / internal outbox alertNo external dispatch permitted
10

Eventing, Triggers & Telemetry

Vault-OS is event-driven internally while remaining silent externally. A transactional outbox, database event bus, and live hardware-telemetry stream coordinate the platform without a single outbound connection.

Transactional Outbox

Domain events are written to `webhook_outbox` inside the same database transaction. The dispatcher claims rows with `SKIP LOCKED`, logs them to the signed internal ledger, and purges them. No remote callback is triggered; the outbox stays strictly within the perimeter.

Live Telemetry & HAL

The Hardware Abstraction Layer broadcasts real-time telemetry every 2 seconds via Server-Sent-Events (SSE). Cheap fast-path telemetry pulls CPU/RAM state; a throttled slow-path polls GPU metrics via async `nvidia-smi` on an 8-second cycle. Telemetry is visible solely to cleared operators.

11

Data Lifecycle, Burn & Self-Update

Retention Sweeps

A nightly cron job (`0 0 * * *`) automatically deletes chat sessions older than 30 days, cascading deletions to corresponding message history tables.

The Burn Protocol

`DELETE /admin/burn` performs a NIST-compliant multi-pass shred of the dropzone, archive, and model weights folders, and drops all database tables.

Zero-Downtime Patching

Patches are staged on disk by the operator. `POST /system/update` starts a secondary instance on port 3001 and proxies connections, achieving hot-swap cut-over.

12

Operator Console (Frontend)

The console is a React 19 + Vite single-page application utilizing Zustand stores, designed as a dark, high-fidelity command deck for vault operators.

Vault Chat & Sessions

RAG-grounded conversation with source citations, optional incognito threads, generator-critic pipeline controls, and auto-titled session history.

Workflow DAG Editor

React-Flow canvas with typed handles, dynamic node properties, Dagre auto-layout positioning, and real-time execution log streaming across 33 node types.

Secure Group Collaboration

Encrypted multi-party conversations with group-local roles, per-member restrictions and slow mode, reactions, pinned messages, polls, scheduled sends, server-enforced auto-delete, and the assistant as a participant that answers only when explicitly summoned — and asks how much of the room it may read before it does.

Vault Explorer & Ingestion

Department-scoped folder tree over the encrypted corpus with per-node clearance, dropzone ingestion with entity extraction, and offline speech-to-text for dictation that never leaves the appliance.

13

API Surface Reference

Served under `/api/v1`. The clearance column indicates the security decorator gating the route.

MethodEndpointClearance Gating
POST/auth/verify · /auth/totp-verify · /auth/reset-initialPublic (Login Exchange)
POST/auth/change-password · /auth/resolveauthenticate
PUT/admin/users/:idrequireAdmin
POST/gateway/ingestverifyApiKey (M2M Key)
GET/files · /files/dropzone · /files/:id/downloadauthenticate (RBAC Filtered)
DELETE/files/:idrequireAdmin
POST/search · /askauthenticate
GET/hardware · /models · /security-logs · /system/diagnosticsrequireAdmin
POST/system/updaterequireAdmin
POST/system/update/confirmrequireChairman
DELETE/admin/burnrequireBoardOrVIP
GET/POST/workflows · /workflows/:id · /workflows/:id/executerequireNeuralClearance
POST/workflows/webhook/:idverifyApiKey (+ Neural clearance check)
14

Security Posture & Hardening Roadmap

Controls in Force

  • Hardware license is fail-deadly; no auto-minting.
  • PostgreSQL runs as an ACL-locked native service, never a container.
  • CORS origin regex fully anchored against look-alike hosts.
  • Execution nodes map arguments as argv, never through a shell.
  • Workflow file writes are path-traversal jailed to the dropzone.

Tracked Constraints

  • js_sandbox: Uses Node `vm` module (not a hard security boundary). Slated for `isolated-vm` replacement.
  • Burn Authority: Reachable at VIP. Candidate for Chairman-only gating with confirmation token.
  • Self-Update: Spawns child server. Slated to require cryptographically signed update bundles.
A

Appendix A — Schema & Env

Core Data Model

  • users: Identities, roles, status, token_version, TOTP data
  • files / documents: Encrypted chunks + metadata + embeddings
  • entities: Extracted named entities (PERSON/ORG/DATE)
  • sessions / chat_messages: Conversations + metrics
  • workflows / nodes / edges: DAG configuration schemas
  • agent_executions: Immutable per-run execution logs
  • security_logs: Cryptographically signed audit chain

Required secrets

  • JWT_SECRET: Session signing (FAIL-DEADLY)
  • AES_SECRET_KEY: At-rest chunk encryption (FAIL-DEADLY)
  • AUDIT_PRIVATE_KEY: ECDSA signature key (FAIL-DEADLY)
  • MASTER_RECOVERY_KEY: Encrypted backup key
  • LICENSE.vault: Cryptographic node signature file

Vault-OS is a proprietary enterprise appliance developed and maintained by IronGap Technologies. Available for private PoC deployments, enterprise integrations, and government-grade security consultancy.

For licensing inquiries or system acquisition, contact the secure operations mailbox.

Operations & Licensing
IronGap Technologies
Secure Channel
info@iron-gap.com
Founder/CEO & Chief Architect
M. Taha Halakooei
IronGap Technologies
Hardened Intelligence Enclave // © 2026 // TOP SECRET
TR-1.0.9.1
Agent_DAG
End_of_Transmission