G1 Docket — by G1163RT Security Labs
Cryptographic Data Attestation Framework & Zero-DB-Call AI Gateway Prevalidator (v1.0.2) — G1163RT Security Labs.
AI gateways govern requests. Nothing attests the data those requests touch. G1 Docket closes that gap with five integrated subsystems and one open cryptographic contract:
- The Attestation Engine (
engine/) — Discovers data where it lives (files, spreadsheets, databases via Apache Tika, OpenMetadata, and the 3-Stage Microsoft Purview & Multi-Cloud DLP Connector), classifies it with Microsoft Presidio and embedded sensitivity labels (recording sensitive entity types and counts, never raw values), provides real-time ETL intake webhooks (/v1/events/etl) for dbt Cloud and Apache Airflow, and issues a DSSE-signed in-toto v1 attestation record per object. - The Authoritative Registry (
registry/) — The authoritative catalog of signed records on PostgreSQL/SQLAlchemy, enforcing tier-based expiry (Restricted: 30d,Confidential: 90d,Internal: 180d,Public: 365d), human-review queues forRestrictedand low-confidence findings, immediate tier elevation, dual-approval tier lowering, and re-classification on content hash drift. - The Signed Snapshot Publisher (
snapshot/) & Consumer Conformance Suite (conformance/) — Publishes short-TTL, DSSE-signed snapshots with monotonic sequence numbers and active +expired/revokedtombstones so downstream consumers enforce policy in memory with zero Registry calls in the request path. - The Zero-DB Prevalidator Gateway (
prevalidator/) — A sub-millisecond reverse proxy placed in front of any AI gateway speaking standard OpenAI (/v1/chat/completions), Anthropic (/v1/messages), or Google Gemini (/v1beta/models/...:generateContent&:streamGenerateContent) formats (including SSE streaming). Evaluates<pod:object>blocks, cryptographically signed multi-agent delegation chains (<pod:delegate>), and Enterprise OIDC caller tokens via JWKS against the in-memory snapshot to forward, strip, or refuse requests with uniform responses and< 0.5 msp95 overhead. - The Governance Subsystem & WORM Ledger (
governance/) — Downstream enterprise compliance and triage stack featuring an immutable cryptographic WORM audit ledger, a 7-target enterprise SIEM forwarder engine with persistent SQLite buffering, a Four-Eyes Dual-Key Human-in-the-Loop (HITL) triage interface minting Ed25519 DSSE emergency admission tickets, and a Section 508 / WCAG 2.1 AA accessible console. - The Developer Client SDK & Forensic Watermarking (
docket/) — Standalone Python client SDK (G1-Docket-SDK) providingDocketClient/AsyncDocketClient, CLI utilities (docket status,docket lookup,docket wrap,docket watermark-embed,docket watermark-inspect,docket check-mode), RFC-009 Merkle Chunk Trees with Octopus batch compression, and zero-trust adapters for leading AI frameworks (LangChain, LlamaIndex, CrewAI, AutoGen, LangGraph).
Visual Demonstration & Console Walkthrough
1. Data Attestation & Zero-DB AI Gateway Prevalidator (:18082)
Point the Attestation Engine at any cloud bucket, database, or local folder to automatically classify files, mint in-toto v1 DSSE envelopes, and enforce zero-DB-call sub-millisecond AI prevalidation.
2. Audit Runway & Go-Live Readiness Monitor (Observe Mode)
Real-time observation of periodic estate traffic without blocking requests. Tracks empirical exit criteria (traffic coverage, denial stability, and triage disposition) to determine when an organization is ready to flip from OBSERVE to ENFORCE mode.
3. Four-Eyes Dual-Key Quarantine & Triage Queue (:18084)
Intercepts unattested data, forged DSSE envelopes, and DLP policy denials at the inference boundary. Two distinct authorized operators (Key 1 Requester & Key 2 Approver) must review diffs and co-sign emergency admission tickets.
4. Cryptographic WORM Audit Ledger & Chain Integrity Verification (:18084)
Write-Once Read-Many Merkle chain with SQLite WAL write triggers, SHA-256 hash chaining, and real-time chain walk verification from genesis to tip.
5. Enterprise SIEM Forwarders Hub (:18084)
Real-time downstream security telemetry stream across 7 pre-configured SIEM destinations (Splunk HEC, Elasticsearch, Syslog CEF, OpenTelemetry, Datadog, Microsoft Sentinel, and AWS CloudWatch) with persistent SQLite buffering and retry backoff.
Repository Layout
schemas/— JSON Schemas (attestation-predicate.schema.json,snapshot-predicate.schema.json,dsse-envelope.schema.json) andCHANGELOG.mdengine/— Discovery and classification pipelines (OpenMetadata connector, Apache Tika extractor, Microsoft Presidio classifier, OpenLineage intake)registry/— Registry service, lifecycle state machine, human-review queue, hardened FastAPI server, local DSSE/Sigstore signing toolkit, andpodCLIsnapshot/— Signed Snapshot Publisher service and APIprevalidator/— OpenAI, Anthropic, and Google Gemini Prevalidator proxy (Enforce & Observe modes)governance/— Cryptographic WORM audit ledger, multi-target SIEM forwarders, and HITL Dual-Key triage GUI & serverconformance/— Reference consumer simulator and Consumer Conformance Test Suitedocket/— Typed synchronous & asynchronous Python Remote Client SDK (DocketClient,AsyncDocketClient), CLI aliases (docket/pod doctor), cryptographic prompt watermarking & forensic steganography (docket.watermark), prompt-audit callback handlers (DocketLangChainCallbackHandler), ingestion components (DocketTransformComponent), turnkey vector database adapters (DocketVectorIndexer&DocketVectorRetrieverfor Pinecone, Qdrant, Chroma, Milvus, Weaviate, PGVector, OpenSearch), and RAG framework adapters (wrap_rag_documents,DocketDocumentTransformer,DocketLlamaIndexPostprocessor,@attested_tool,DocketCrewAITool,@docket_langgraph_node,DocketAutoGenHook, and dynamic ABAC policy hooks)examples/— Interactive Quickstart Notebook (quickstart_interactive.ipynb), Phase 0 worked example, Golden Synthetic Sample Estate generator, LiteLLM gateway config, reproducible end-to-end demo (run_demo.py), Docker stack verification (verify_docker_stack.py), live Enterprise Governance & Dual-Key simulation (simulate_enterprise_governance.py), RAG agent retrieval pipeline walkthrough (rag_agent_walkthrough.py), Vector Database & Semantic Chunk Zero-Trust Admission Demo (vector_rag_agent_demo.py), Multi-Agent Orchestration Benchmark (multi_agent_orchestration_demo.py), CrewAI Multi-Agent Team demo (crewai_agent_demo.py), LangGraph State Workflow demo (langgraph_agent_demo.py), Microsoft AutoGen Multi-Agent demo (autogen_agent_demo.py), Snowflake Zero-Trust Admission demo (snowflake_rag_agent_demo.py), Databricks Unity Catalog AI Agent walkthrough (databricks_agent_demo.py), Apache Iceberg Lakehouse walkthrough (iceberg_agent_demo.py), Google BigQuery walkthrough (bigquery_agent_demo.py), Dynamic In-Flight Field Masking walkthrough (dynamic_masking_agent_demo.py), and Federated Multi-Cloud Warehouse Agent walkthrough (multicloud_warehouse_agent.py)benchmarks/— High-Concurrency Latency & Throughput Benchmark (benchmark_gateway_concurrency.py) measuring sub-millisecond p50/p99 admission latencies under multi-threaded concurrency, and Cryptographic Merkle Chunk Trees & Octopus Benchmark (benchmark_chunk_trees.py) evaluating tree construction throughput, sub-50 µs verification, and multi-chunk retrieval compressiondocs/— Core Architectural Principles, Authentication & Access Control (RBAC), Data Sizing & Throughput Benchmarks, Federal DevSecOps & Compliance Report, GovReady-Q NIST SP 800-53 Compliance Report, System Security Plan (SSP), How Long Should the Audit Run?, Doesn't Microsoft Purview Do the Same Thing?, Fortune 500 Enterprise Reference Architecture, Hyperscale Architecture (100M+ Objects), RFC-009: Merkle Chunk Trees (MCT), Observability & Telemetry Guide, Governance Subsystem, Operator CLI Reference, Python SDK Guide, Record Format Spec, Consumer Contract Spec, and Security Reviewdocs/whitepapers/— Downloadable PDF Whitepapers: Core Architecture, Data Sizing Benchmarks, Audit Period Determination, and Docket vs. Purview
deploy/— Production Helm Chart and Kubernetes Manifests & Edge Sidecar Patterns for production deployment across AWS EKS, Google GKE, Azure AKS, and on-premise clusters with built-in Horizontal Pod Autoscaling (HPA) and Prometheus/metricsscrapingk8s/— Production-grade Kubernetes manifests (Namespace, Deployment, HPA, ConfigMap, Secrets, and Zero-Trust NetworkPolicy)terraform/— AWS Infrastructure-as-Code foundation module provisioning dedicated KMS Customer Managed Keys (CMK), S3 Object Lock in non-erasableCOMPLIANCEmode (7-year retention), and IAM IRSA service accountsreports/— Federal DevSecOps Compliance Audit Report, High-Concurrency Latency Benchmark Report, RFC-009 MCT & Octopus Proof Benchmark Report, GovReady-Q NIST SP 800-53 Compliance Assessment Report, SOC 2 & ISO 27001 Cryptographic Compliance Audit, Consolidated 22-Phase Verification Scorecard, and Dual-Plane Security Benchmark Report (Docket vs. Combine) (600-probe empirical benchmark evaluating cryptographic data provenance vs. NLP cognitive safety)scripts/— Consolidated 22-phase verification suite (run_all_verifications.py), Interactive Operator & Auditor Control Menu (interactive_menu.py), Environment Mode & Production Readiness Checker (check_mode.py), Enterprise SIEM & SOC exporter (export_siem_events.py), SOC 2 evidence packager (export_soc2_evidence.py), standalone air-gapped auditor verifier (docket_verify_standalone.py), forensic token extractor (forensic_extractor.py), Prevalidator proxy launcher (run_prevalidator.py), interactive demo walkthrough (demo_walkthrough.py), and compliance report generator (generate_compliance_report.py).github/— GitHub Actions CI/CD workflows (ci.yml), Issue Templates (Bug Report, Feature Request), and Pull Request Template- Community Standards & Policies — Contributing Guidelines, Code of Conduct, Security Policy, and Apache-2.0 License
Attestation Record Schema (32 Fields)
Every data asset evaluated and attested by G1 Docket produces a DSSE-signed in-toto v1 attestation record. The payload adheres to a comprehensive 32-field governance schema across 6 functional dimensions:
1. Object Identity & Storage (5 Fields)
| Field | Description |
|---|---|
locator |
Canonical URI of the object (file://..., s3://..., postgresql://...). |
file_name |
Display filename (e.g., 07_purview_labeled_board_strategy.docx). |
file_path |
Full local host or cloud storage relative path. |
mime_type |
Detected file content format (e.g., application/vnd.openxmlformats...). |
file_size_bytes |
Physical file size in bytes. |
2. Cryptographic Integrity & Provenance (5 Fields)
| Field | Description |
|---|---|
content_sha256 |
Cryptographic SHA-256 digest of the raw content payload. |
attestation_id |
Unique UUID of the signed in-toto v1 attestation record. |
issued_at |
UTC ISO-8601 timestamp of record issuance. |
expires_at |
Expiry timestamp based on tier policy (30d, 90d, 180d, or 365d). |
signature_key_id |
Key ID of the active Ed25519/ECDSA operator key that signed the DSSE envelope. |
3. Classification & AI Gateway Policy (6 Fields)
| Field | Description |
|---|---|
tier |
Classification tier (Public, Internal, Confidential, Restricted). |
ai_eligibility |
Prevalidator policy action (allow, strip, deny). |
minimum_clearance |
Lowest caller clearance key required to access the data. |
egress_class |
Network egress boundary allowed (local_only, private_cloud, public_api). |
classification_confidence |
Probabilistic confidence score from Presidio / ML classification (0.0–1.0). |
classification_method |
Classification mechanism (purview_label, presidio_dlp, regex_heuristic, manual_human_review). |
4. DLP, Purview & Sensitivity Findings (6 Fields)
| Field | Description |
|---|---|
sensitive_entity_types |
Array of detected sensitive data types (PII, PHI, PCI, API_KEY, etc.). |
sensitive_entity_counts |
Map of entity frequencies (records sensitive types and counts only—never raw values). |
total_sensitive_matches |
Aggregate count of sensitive findings in the object. |
purview_sensitivity_label_name |
Microsoft Purview / MIP label extracted from document XML metadata. |
purview_sensitivity_label_id |
Unique GUID of the Microsoft Information Protection label. |
purview_watermark_present |
Boolean indicating whether an enterprise protection watermark or visual marking exists. |
5. Ownership, Stewardship & Lineage (5 Fields)
| Field | Description |
|---|---|
owner_id |
Accountable business owner or email (security@company.org). |
owner_department |
Department or cost center responsible for the data asset. |
data_custodian |
Technical administrator / system owning storage. |
upstream_lineage_sources |
Origin sources or ingestion pipeline IDs (OpenLineage / OpenMetadata). |
downstream_consumers |
Known AI models, applications, or pipelines consuming the asset. |
6. Lifecycle State Machine & Review (5 Fields)
| Field | Description |
|---|---|
status |
Lifecycle state (active, pending_review, expired, revoked). |
last_scanned_at |
Timestamp of the most recent crawl/re-evaluation. |
last_verified_at |
Timestamp when cryptographic hash matching was last confirmed. |
review_queue_id |
Foreign key to the human-review governance queue if flagged for low confidence or Restricted findings. |
governance_approvals |
Dual-approval audit log recording approver IDs and rationales (required for declassifications). |
Quickstart (Local Evaluation & Demo)
0. Install Dependencies
pip install -r requirements.txt
Standalone Developer Client SDK (G1-Docket-SDK)
# Install directly from the GitHub Release wheel (.whl)
pip install https://github.com/cgilbert61/G1-Docket/releases/download/v1.0.2/g1_docket_sdk-1.0.2-py3-none-any.whl
# Or install directly from GitHub source
pip install "git+https://github.com/cgilbert61/G1-Docket.git"
# Verify client CLI
docket --help
# Test connection and fetch gateway snapshot status
docket status --url http://localhost:18082
# Query signed attestation record by canonical locator
docket lookup "file://estate/fileshare/product_overview_public.md"
# Wrap local file into a canonical <pod:object> tag with SHA-256 digest
docket wrap "file://finance/revenue.xlsx" --file ./revenue.xlsx
# Embed forensic zero-width Unicode steganographic watermark into text or file
docket watermark-embed "Confidential executive briefing" \
--owner secops@enterprise.org \
--agent-id agent-007 \
--tier Confidential \
--output ./briefing_watermarked.txt
# Inspect and extract forensic provenance from watermarked content
docket watermark-inspect ./briefing_watermarked.txt
# Assess system readiness and fail-closed security configuration
docket check-mode
# Use in your Python AI agent
python -c "import docket; print('G1-Docket-SDK version:', docket.__version__)"
1. Run the Reproducible End-to-End Demo (Phases 0–3)
python -m examples.run_demo
This executes:
- Phase 0: Attests a single synthetic clinical file end-to-end, verifies the DSSE signature, and confirms that tampered files and tampered envelopes fail verification.
- Phase 1: Generates the synthetic estate (documents,
.xlsxspreadsheets, and database tables), crawls both paths, holds low-confidence findings in the review queue, and exercisesraise_tier, dual-approvedlower_tier, andrenew. - Phase 2: Publishes a DSSE-signed snapshot (
pod_snapshot.dsse.json). - Phase 3: Runs the Prevalidator proxy against OpenAI
/v1/chat/completionsand Anthropic/v1/messages, verifying allowed requests, inline Confidential block stripping ([POD:STRIPPED]), and uniform 403 refusal onRestrictedandUnattestedobjects.
2. Run the Full Test & Conformance Suite
pytest -v
3. Run the Federal DevSecOps & Compliance Pipeline
Execute the full local-first compliance pipeline matching NIST SP 800-53, DISA STIG, EO 14028, and Section 508 / WCAG 2.1 AA:
make compliance-check
Or run individual verification gates:
make sast # SonarQube & Semgrep SAST / CWE scanning
make secrets # Gitleaks repository secret detection
make iac # Checkov IaC security scanning (Terraform, K8s, Dockerfile)
make sbom # Syft CycloneDX SBOM generation (sbom.cdx.json)
make container-scan # Trivy container hardening & CVE vulnerability scan
make dast # OWASP ZAP baseline dynamic application security scan
make a11y # Section 508 & WCAG 2.1 AA automated axe-core check
make load-test # k6 SLA performance & load testing
make govready # GovReady-Q NIST SP 800-53 automated assessment
4. Exercise the pod CLI
# Generate or rotate local operator keys
python -m registry.cli keygen
# Attest a file, directory share, or database
python -m registry.cli attest ./examples/out_demo/estate/fileshare --owner security@example.org
# Look up a record by canonical locator
python -m registry.cli lookup "file://estate/fileshare/product_overview_public.md"
# Publish a signed snapshot for the Prevalidator
python -m registry.cli publish-snapshot --output ./pod_snapshot.dsse.json
5. Interactive Operator & Auditor Control Menu
Launch the interactive terminal console to run any of the enterprise verification demos, benchmarks, or cluster diagnostics with a single keystroke:
python scripts/interactive_menu.py
One-Click Automated Docker Installers
Self-contained automated installers are provided for Windows and Linux/macOS. They verify prerequisites (Docker, WSL mounts if on secondary drives), prepare .env, build all images, launch the stack, and poll health endpoints until ready:
- Windows:
install.bat
- Linux / macOS:
chmod +x install.sh ./install.sh
Docker Compose Profiles
Three Compose profiles are provided in docker-compose.yml:
# 1. Core profile: Engine, Registry, Snapshot Publisher, Postgres
docker compose --profile core up -d --build
# 2. Demo profile: Everything in core + Prevalidator + Local AI Gateway + automated synthetic estate bootstrap
docker compose --profile demo up -d --build
python -m examples.verify_docker_stack
# 3. Prevalidator profile: The proxy alone, deployed beside an existing AI gateway
docker compose --profile prevalidator up -d --build
Troubleshooting & Automated Health Loop
If secondary drives (such as D:) unmount after a Windows reboot, or if you need to poll for stack readiness:
Automated WSL Remount & Health Polling Loop (PowerShell)
# 1. Remount Drive D in Docker Desktop WSL if needed
wsl -d docker-desktop -u root -e sh -c "mkdir -p /mnt/host/d /mnt/d; mountpoint -q /mnt/host/d || mount -t drvfs D: /mnt/host/d -o metadata; mountpoint -q /mnt/d || mount --bind /mnt/host/d /mnt/d"
# 2. Poll health endpoints until active
$endpoints = @(
"http://localhost:18080/docs",
"http://localhost:18081/docs",
"http://localhost:18082/healthz",
"http://localhost:18083/healthz",
"http://localhost:14000/healthz"
)
Write-Host "Waiting for G1 Docket services to stabilize..." -ForegroundColor Cyan
for ($i = 1; $i -le 40; $i++) {
$pending = 0
foreach ($url in $endpoints) {
try {
$resp = Invoke-WebRequest -Uri $url -TimeoutSec 2 -UseBasicParsing
if ($resp.StatusCode -ne 200) { $pending++ }
} catch {
$pending++
}
}
if ($pending -eq 0) {
Write-Host "`n[+] All G1 Docket services are healthy and active!" -ForegroundColor Green
break
}
Write-Host -NoNewline "."
Start-Sleep -Seconds 2
}
Service Architecture & Swagger API Directory
G1 Docket deploys a modular, microservice-based attestation, prevalidation, and compliance stack:
| Port | Service Component | Interactive Swagger / UI | Key Role & Scope |
|---|---|---|---|
18080 |
Registry Service | http://localhost:18080/docs |
Authoritative PostgreSQL catalog of DSSE-signed in-toto attestation records and review queues. |
18081 |
Snapshot Publisher | http://localhost:18081/docs |
Issues short-TTL, monotonic DSSE snapshot contracts for zero-DB gate evaluation. |
18082 |
Prevalidator Proxy | http://localhost:18082/ |
OpenAI/Anthropic gateway proxy, continuous estate scanner, and unified operator dashboard. |
18083 |
Attestation Engine Service | http://localhost:18083/docs |
Enterprise crawler, Purview/Presidio classifier, and cloud/warehouse connector API. |
18084 |
HITL Governance & SIEM Hub | http://localhost:18084/ & /docs |
Cryptographic WORM audit ledger, dual-key quarantine triage GUI, and multi-target SIEM dispatcher. |
14000 |
LiteLLM Mock Gateway | http://localhost:14000/healthz |
Upstream OpenAI/Anthropic model router and mock gateway for testing. |
Operator Authentication & Default Credentials
G1 Docket features a Unified Session Authentication Engine with bidirectional Single Sign-On (SSO) across the Prevalidator Gateway (:18082) and the Governance Console (:18084). Authenticating on either port automatically unlocks both consoles.
Unauthenticated browser traffic is strictly redirected to /login when DOCKET_REQUIRE_AUTH=true (or in production). Inference and AI agent SDK requests (/v1/chat/completions, /healthz, /metrics) are machine-to-machine exempt and continue authenticating via standard API keys.
Built-in Institutional Accounts
| Operator ID | Default Password | Role | Description & Scope |
|---|---|---|---|
admin |
DocketAdmin2026!Secure |
admin |
Full system administrator. Configures mode, DLP, LLM providers, and estate crawlers. |
operator1 |
TriageOperator2026! |
triage_operator |
Triage specialist (Key 1). Runs directory/file attestations and submits quarantine exemption requests. |
approver1 |
SecurityLead2026! |
security_approver |
Security officer (Key 2). Approves high-risk tier changes and co-signs emergency admission tickets. |
auditor1 |
AuditInspector2026! |
auditor |
Read-only compliance auditor. Inspects scorecards, snapshots, and WORM ledgers. Mutating actions blocked (403). |
mfa_operator |
MfaOperator2026! |
security_approver |
2FA Enforced Officer (Key 2). Requires RFC 6238 6-digit TOTP (seed: JBSWY3DPEHPK3PXP). |
Making the System Your Own
- Change Passwords: Override any password by setting
DOCKET_ADMIN_PASSWORD,DOCKET_OPERATOR_PASSWORD,DOCKET_APPROVER_PASSWORD, etc. in your.envfile. - Custom Corporate Accounts: Supply your company's directory accounts via the
DOCKET_AUTH_USERS_JSONenvironment variable. - Enterprise SSO / OIDC Federation (Method C): Connect enterprise IdPs (Microsoft Entra ID / Azure AD, Okta, Google Workspace, Ping Identity) natively via
DOCKET_OIDC_ISSUERandDOCKET_OIDC_AUDIENCE(or reverse-proxy headersX-Forwarded-Email,X-Forwarded-Roles). Both the Governance Door and the Prevalidator Caller Door verify IdP cryptographic signatures via JWKS (jwt.PyJWKClientcached discovery) supporting RS256/ES256 with fail-closed production guards. - Full Guide: See docs/authentication-and-access-control.md for complete step-by-step instructions.
Attestation Engine Service (:18083/docs)
The Attestation Engine Service (OpenAPI 3.1, v1.0.2) provides programmatic APIs to discover, inspect, and attest assets across local disks, network shares, and enterprise cloud data lakes:
default
├── GET /healthz Service health and readiness probe
├── GET /v1/browse-dir Browse host drives and directories for estate targeting
├── POST /v1/attest-selected Trigger cryptographic attestation across selected drive or path
├── GET /v1/pc-folders List auto-discovered workstation directories & document stores
├── GET /v1/datastores Query registered enterprise data stores (S3, Azure, GCS, Snowflake, BigQuery, Databricks)
├── POST /v1/datastores Register new enterprise cloud data lake or warehouse connection
└── GET /v1/datastores/objects Enumerate discovered objects and partitions within enterprise datastores
GET /v1/browse-dir: Takes?path=query parameter to navigate the host filesystem, reporting directory entries, file counts, and accessibility.POST /v1/attest-selected: Initiates discovery, DLP classification (Presidio + Purview metadata extraction), and cryptographic DSSE envelope issuance over all scannable files in the path.GET /v1/datastores&POST /v1/datastores: Configures enterprise cloud data stores with zero-secret credentials (AWS IAM roles, Azure Managed Identity, GCP Workload Identity / ADC, Snowflake key-pair, Databricks OAuth M2M) and runs partition-level attestation.
HITL Governance Subsystem & WORM Ledger (:18084 & :18084/docs)
The Governance Subsystem (OpenAPI 3.1, v4.0.0) operates the downstream compliance, immutable audit ledger, quarantine triage, and real-time SIEM streaming pipeline:
default
├── GET / Unified HITL Triage, WORM Chain Audit & SIEM Operations Dashboard
├── GET /api/quarantine List all quarantined objects (un-papered files, forged envelopes, Presidio blocks)
├── GET /api/quarantine/{id} Inspect quarantined object metadata, payload snippet, and audit status
├── POST /api/quarantine/{id}/stage-override Key 1: Requester stages override with operational rationale
├── POST /api/quarantine/{id}/approve-override Key 2: Distinct Approver signs release with Ed25519 DSSE emergency ticket
├── POST /api/quarantine/{id}/reject Formal reviewer rejection and permanent block of quarantined item
├── GET /api/worm/verify Full Merkle/hash-chain integrity audit from genesis block ("0"*64) to tip
├── GET /api/worm/events Query paginated tamper-evident WORM audit records
├── GET /api/siem/status Real-time health, buffer queue length, and delivered count across all 7 forwarders
├── POST /api/siem/{dest_id}/test Synthetic probe injection with automatic fallback to persistent SQLite buffer
├── GET /api/siem/mock-receivers Status of embedded local mock receiver cluster (ports 18088, 19200, 15514, etc.)
├── POST /api/siem/mock-receivers/toggle Toggle local mock receivers on/off
├── GET /api/siem/{dest_id}/config Fetch destination parameters (URL, API keys, headers, indices, Syslog TLS)
├── POST /api/siem/{dest_id}/config Live update destination parameters and persist to governance/config.yaml
├── POST /api/intercept Boundary intercept webhook for Prevalidator and Combine cognitive denials
└── GET /events/stream Server-Sent Events (SSE) live security telemetry stream
Core Capabilities:
- Cryptographic WORM Audit Ledger (
worm_ledger.py):- Implements dual-store append-only audit persistence: SQLite with triggers that raise an immediate error on any
UPDATEorDELETEattempt, coupled with a canonical JSON Lines log. - Hash-chained with SHA-256 Merkle links from genesis block (
previous_hash = "0" * 64) to tip. verify_ledger_integrity()recalculates the entire chain, pinpointing line numbers and byte-level mutations if tampering occurs.
- Implements dual-store append-only audit persistence: SQLite with triggers that raise an immediate error on any
- Four-Eyes Dual-Key Triage Workflow (
dual_key.py):- Intercepted un-papered data objects, forged DSSE envelope blocks, or Presidio/Combine PII denials are isolated in quarantine.
- Override requires two distinct authorized identities: Requester (Key 1) stages a business justification; Approver (Key 2) validates the diff and signs an Ed25519 DSSE emergency admission ticket.
- Upon release, the clean payload is automatically replayed through
:18082, aHITL_DUAL_KEY_RELEASErecord is locked into the WORM ledger, and audit notifications stream to downstream SIEMs.
- Multi-Target Enterprise SIEM Integration Engine (
siem_forwarder.py):- Streams security telemetry to 7 pre-configured destinations:
- Splunk HEC:
/services/collector/event - Elasticsearch / OpenSearch:
ecs-1.12compliant index mapping - Syslog CEF Streamer: RFC 5424 Common Event Format over TCP/TLS
- OpenTelemetry / SOAR Webhook: CloudEvents structured HTTP POST
- Datadog Logs API:
/api/v2/logs - Microsoft Sentinel / Azure Log Analytics: Data Collector API
- AWS CloudWatch Logs: PutLogEvents structured JSON format
- Splunk HEC:
- Zero sensitive data leakage: payloads are scrubbed to hashes, rule IDs, and ticket identifiers.
- Offline resilience: failed socket transmissions automatically persist to a local SQLite buffer queue and retry upon network reconnection.
- Integrated GUI editor: update live endpoints, API keys, and Syslog TLS parameters on the fly with automatic persistence to
governance/config.yaml.
- Streams security telemetry to 7 pre-configured destinations:
- Institutional Operator Authentication & RBAC (
auth.py):- Institutional login portal (
/loginon port:18084) enforcing PBKDF2 password derivation (100,000 iterations with CSPRNG salt) and tamper-resistant HMAC-SHA256 session tokens (docket_session). - Role-Based Access Control (
admin,operator,auditor,user) with@require_roledecorators guarding administrative and quarantine triage endpoints. - Automated brute-force lockout (5 consecutive failures -> 15-minute IP/account rate-limit lock) and sliding inactivity expiration.
- Native RFC 6238 TOTP hardware/authenticator app two-factor authentication.
- Cryptographic WORM audit chaining: every authentication event (
OPERATOR_AUTH_SUCCESS,OPERATOR_AUTH_FAILURE,OPERATOR_MFA_SUCCESS,OPERATOR_MFA_FAILURE,OPERATOR_LOCKOUT,OPERATOR_LOGOUT) is automatically appended to the immutable Merkle chain.
- Institutional login portal (
- Environment Pre-Flight & Production Readiness Enforcement (
docket.cli):python -m docket.cli --check-modeassesses operational readiness before deployment.- In
DEMOmode, enables zero-config local prototyping with in-memory fallbacks and sample keyrings. - In
PRODUCTIONmode, strictly fails closed if an authoritative gateway (POD_UPSTREAM_GATEWAY_URL), dedicated PostgreSQL database URL, or hardened credentials are missing.
Enterprise AI Agent & RAG Framework Ecosystem
G1 Docket provides turnkey zero-trust admission control adapters for all leading AI agent and RAG frameworks via docket.integrations:
| Framework / Source | Adapter Class / Decorator | Primary Role & Guarantee |
|---|---|---|
| Model Context Protocol (MCP) | DocketMCPServer & DocketMCPInterceptor |
Standard MCP 2024-11-05 JSON-RPC 2.0 server & zero-trust tool interceptor for Claude Desktop, Cursor, Antigravity |
| LlamaIndex | DocketLlamaIndexPostprocessor |
Intercepts NodeWithScore batches, binds SHA-256 hashes, and rejects poisoned nodes or clearance mismatches |
| Vector DBs (Pinecone, Qdrant, LanceDB, Milvus, Chroma, Weaviate, PGVector, OpenSearch) | DocketVectorRetriever / DocketVectorIndexer |
Formats similarity search chunks into verified <pod:object> envelopes with RFC-009 Merkle proofs & Octopus batch compression |
| LangChain | DocketLangChainCallbackHandler |
Pre-dispatch callback auditor catching untagged context, data smuggling, or character threshold breaches |
| CrewAI | DocketCrewAITool / wrapper |
Attests agent tool execution results before inter-agent communication or final delegation |
| LangGraph | @docket_langgraph_node |
Wraps state transitions and messages between graph nodes with cryptographic provenance |
| AutoGen | DocketAutoGenHook |
Inter-agent message hook validating and tagging conversational exchanges between conversable agents |
| Snowflake Data Warehouse | @attested_tool("snowflake://...") |
Binds SQL queries and Snowpark results to verifiable table-level and column-level attestation contracts |
| Google BigQuery | @attested_tool("bigquery://...") |
Validates data residency and departmental isolation on BigQuery enterprise datasets |
| Multi-Agent Swarms & Delegation Chains | <pod:delegate> / process_delegates |
Cryptographically signed provenance, clearance narrowing, and tamper-resistant multi-hop agent delegation |
Cryptographically Signed Multi-Agent Delegation Chains (<pod:delegate>)
In multi-agent architectures (e.g. LangGraph, CrewAI, AutoGen), context travels across multiple autonomous hops before reaching a final LLM call. G1 Docket provides cryptographically signed delegation envelopes (<pod:delegate>) to protect multi-agent workflows against data poisoning, context smuggling, and clearance escalation:
<pod:delegate hop="1" signer="agent-researcher-01" parent_tier="Confidential" signature="Base64Ed25519...">
<pod:object locator="file://research/earnings_q3.pdf" sha256="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855">
Summarized Q3 earnings report data...
</pod:object>
</pod:delegate>
- Per-Agent Ed25519 Signatures: Each delegation hop verifies the signature of the intermediate agent over the canonical inner payload, ensuring provenance cannot be forged.
- Monotonic Clearance Narrowing: Intermediate agents may only narrow clearance (e.g., from
RestrictedtoConfidential), never widen it (CLEARANCE_ESCALATION_BLOCKED). - Context Tamper Prevention: Any alteration to inner tags or attributes breaks the delegation chain (
DELEGATION_CHAIN_BROKEN/DELEGATION_SIGNATURE_INVALID). - Sub-Millisecond Verification: Multi-hop verification executes entirely in memory with
< 0.5 msadded p95 hot-path latency.
Local-First Federal DevSecOps & NIST SP 800-53 Compliance
G1 Docket embeds a comprehensive, local-first federal compliance testing pipeline matching NIST SP 800-53 Rev. 5, DISA STIG, EO 14028 (SBOM), and Section 508 / WCAG 2.1 AA standards:
- Static Analysis (SAST): SonarQube (
sonar-project.properties) and Semgrep rulesets (p/owasp-top-ten,p/security-audit) detect CWE vulnerabilities and security regressions. - Secrets & Infrastructure-as-Code (IaC): Gitleaks detects committed credentials across git history; Checkov scans Terraform, Helm charts, and Dockerfiles against CIS benchmarks.
- Supply Chain & Container Hardening (SCA): Syft generates an Executive Order 14028 CycloneDX SBOM (
reports/sbom.cdx.json); Trivy scans container images for CVEs and non-root execution. - Dynamic Application Security Testing (DAST): OWASP ZAP baseline scan targets local running endpoints.
- Section 508 & WCAG 2.1 AA Accessibility: Automated axe-core / Playwright test harness (
scripts/test_accessibility.py) asserts zero accessibility violations across all HITL operator consoles. - SLA & Concurrency Load Testing: Automated k6 performance runner asserts
< 5.0 msp99 latency SLA under high concurrent load. - GovReady-Q Automated Assessment: Generates machine-readable NIST SP 800-53 assessments (
reports/govready_assessment_summary.json) and OSCAL component definitions (reports/govready_oscal_component.json).
Run all compliance gates locally in one command:
make compliance-check
License & Third-Party Open Source Software
G1 Docket is licensed under the Apache License 2.0 — see LICENSE.
Open Source Dependencies & Licenses
This project relies on and incorporates open-source libraries and standards. We gratefully acknowledge the upstream maintainers:
| Package / Project | Version | Upstream License | Project URL / Source | Primary Role in G1 Docket |
|---|---|---|---|---|
| FastAPI | >=0.109.0 |
MIT | tiangolo/fastapi | Async REST API framework for Registry, Engine, Prevalidator, and Governance servers |
| Starlette | ~=1.10.0 |
BSD 3-Clause | encode/starlette | ASGI web core, routing, Server-Sent Events (SSE), and request processing |
| Uvicorn | >=0.27.0 |
BSD 3-Clause | encode/uvicorn | High-performance lightning-fast ASGI server |
| Pydantic | >=2.5.0 |
MIT | pydantic/pydantic | Strict data validation, schema enforcement, and JSON serialization |
| Pydantic Core | >=2.14.0 |
MIT | pydantic/pydantic-core | High-speed Rust core for data parsing |
| Cryptography | >=41.0.0 |
Apache-2.0 / BSD | pyca/cryptography | Ed25519 signing, verification, SHA-256 digests, and X.509 certificates |
| PyJWT | >=2.8.0 |
MIT | jpadilla/pyjwt | JSON Web Token (JWT) encode/decode for role-based service authentication |
| SQLAlchemy | >=2.0.25 |
MIT | sqlalchemy/sqlalchemy | Database abstraction, WAL transactions, and SQLite/PostgreSQL persistence |
| HTTPX | >=0.26.0 |
BSD 3-Clause | encode/httpx | Asynchronous HTTP client for SIEM forwarder and AI Gateway reverse proxy |
| HTTPCore | ~=1.0.9 |
BSD 3-Clause | encode/httpcore | Low-level HTTP transport and connection pooling |
| JSONSchema | >=4.20.0 |
MIT | python-jsonschema/jsonschema | Draft 2020-12 schema verification for in-toto attestation records |
| OpenPyXL | >=3.1.2 |
MIT | openpyxl | Spreadsheet parsing, cell extraction, and Excel workbook classification |
| Jinja2 | >=3.1.0 |
BSD 3-Clause | pallets/jinja | Institutional HTML template rendering for HITL Governance dashboard |
| PyYAML | >=6.0.0 |
MIT | yaml/pyyaml | SIEM configuration serialization and persistent setting storage |
| AnyIO | >=4.0.0 |
MIT | agronholm/anyio | Structured asynchronous concurrency primitives |
| Pytest | >=8.0.0 |
MIT | pytest-dev/pytest | Automated unit, regression, and conformance testing framework |
| Click | >=8.0.0 |
BSD 3-Clause | pallets/click | Command-line interface driver for the pod CLI |
| OpenTelemetry API | >=1.20.0 |
Apache-2.0 | open-telemetry/opentelemetry-python | Distributed tracing, security audit events, and trace propagation |
| Microsoft Presidio | >=2.2.35 |
MIT | microsoft/presidio | Sensitive entity recognition (PII/PHI/PCI/API keys) in document content |
| Apache Tika | >=2.6.0 |
Apache-2.0 | apache/tika | Multi-format content detection and document text extraction |
| in-toto Specification | v1.0 |
Apache-2.0 | in-toto/attestation | Standardized metadata format for cryptographic software & data supply chain attestation |
| DSSE Specification | v1.0 |
Apache-2.0 | secure-systems-lab/dsse | Dead Simple Signing Envelope for multi-key detached signatures |
| LiteLLM | >=1.0.0 |
MIT | BerriAI/litellm | Upstream AI gateway and OpenAI/Anthropic protocol translation |
| SQLite | v3 |
Public Domain | sqlite.org | Embedded transactional storage for WORM ledger, quarantine queue, and SIEM buffer |
Production Observability & Prometheus Metrics
G1 Docket exposes standard Prometheus text exposition format (text/plain; version=0.0.4; charset=utf-8) for monitoring, alerting, and SLA tracking:
| Subsystem | Port | Endpoint | Metrics Exported |
|---|---|---|---|
| Prevalidator Gateway | :18082 |
GET /metrics |
g1_docket_mode, g1_docket_evaluations_total, g1_docket_evaluations_by_decision_total{decision="allow|deny|strip|mask"}, g1_docket_policy_denials_by_reason_total, g1_docket_evaluation_duration_seconds{quantile="0.5|0.95|0.99"}, g1_docket_active_snapshot_sequence, g1_docket_active_snapshot_entries |
| HITL Governance & SIEM | :18084 |
GET /metrics |
g1_docket_governance_worm_events_total, g1_docket_governance_quarantine_items{status="QUARANTINED|RELEASED|REJECTED"}, g1_docket_governance_siem_destinations{enabled="true|false"} |
Prometheus Alerting Rules & Helm Integration
Pre-configured Prometheus alert definitions are bundled for Helm and vanilla Kubernetes deployments under deploy/k8s/prometheus-alerts.yaml and deploy/helm/g1-docket/templates/prometheusrule.yaml:
G1DocketSubMillisecondSLABreached: Critical alert when p95 admission latency breaches the $5\text{ ms}$ SLA budget.G1DocketHashDriftSpike: Critical alert when $> 5$ hash drift / tamper events occur within 5 minutes.G1DocketWORMVerificationFailure: Critical alert when Merkle hash-chain verification detects broken ledger integrity.G1DocketQuarantineBacklog: Warning alert when $> 50$ quarantined items await Four-Eyes dual-key triage.
See the complete Observability & Monitoring Guide for Prometheus scrape configurations, Grafana dashboard JSON models, and ServiceMonitor manifests.
Community & Security Standards
G1 Docket follows enterprise open-source and institutional security standards:
- Contributing Guidelines: Development environment setup, architectural invariants, latency budgets, and PR submission guidelines.
- Code of Conduct: Contributor Covenant v2.1 community engagement pledge and enforcement standards.
- Security Policy: Vulnerability disclosure program, supported versions, coordinated triage process, and reporting via
security@g1163rt.ai. - Issue Templates: Structured issue templates for Bug Reports and Feature Proposals.
- Pull Request Template: Standardized checklist verifying zero-database hot-paths, sub-millisecond evaluation latency, and cryptographic compliance.
Metadata
Release files for G1-Docket-SDK 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| g1_docket_sdk-1.0.2.tar.gz | 166.3 kB | With provenance | Details for g1_docket_sdk-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| g1_docket_sdk-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for g1_docket_sdk-1.0.2-py3-none-any.whl |
Total release size: 227.2 kB
Release files / g1_docket_sdk-1.0.2.tar.gz
| Download URL | g1_docket_sdk-1.0.2.tar.gz |
|---|---|
| Size | 166.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8c0a071dbbf3db61e35e7dab1e4dd3ee42ce420f1c2a28e598b800bcc4078f7
|
|
BLAKE2b-256 checksum How to use checksums |
309c7db88e982c77a8341b5d3f2d75554b4223936e5129c712ce036e979844b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / g1_docket_sdk-1.0.2-py3-none-any.whl
| Download URL | g1_docket_sdk-1.0.2-py3-none-any.whl |
|---|---|
| Size | 60.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c39fc049edaf8ca045636b388faadd6548b3cd803d7f19e27907c2399e48b6d
|
|
BLAKE2b-256 checksum How to use checksums |
cbd15f479a1ef0690f08d577485bd46a0b248e65b3ea6df75162d792d5f851f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for G1-Docket-SDK 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for g1_docket_sdk-1.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.