Component: Keymaster (Security Gatekeeper)
Status: ✅ In Active Implementation (Revision 14+)
Last Updated: April 23, 2026
Author: jstevh
Keymaster is the central security layer of the Metadata System. All files enter and leave exclusively through Keymaster. No direct filesystem access is allowed outside the Sandbox.
External World Keymaster (Security Core) Sandbox
───────────────────── ──────────────────────────── ─────────────────────
User drops file → Keymaster (Gatekeeper)
(e.g. PDF) → FileValidator + DocumentType
(magic bytes check) → Sandbox Root
→ Metadata-driven folder /sandbox/document-types/...
→ MObject registration (organized by type + date + uuid)
→ PushGuard (planned)
Only known DocumentType
↓ (optional)
Remote Node
text## Key Security Components
validateAndIngest(File)DocumentTypeaddFileToSandboxInteractively()DocumentType/sandbox/document-types/YYYY-MM-DD-uuid/pdf/)documentType, mimeType, sandboxPath, etc.)| Feature | Status | How It Is Implemented | Benefit |
|---|---|---|---|
| Sandbox-Only | ✅ Done | All files forced into isolated Sandbox | Strong containment |
| Strong Type Validation | ✅ Done | Magic bytes via FileValidator + DocumentType |
Prevents disguised malware |
| Metadata Folder Structure | ✅ Done | Auto-generated paths with date + uuid | Better organization & auditability |
| Known Document Types | ✅ Done | DocumentType enum (PDF first) |
Foundation for whitelist |
| Push Whitelist | ☐ Planned | PushGuard class (next) |
Defense-in-depth |
Keymaster.java updated with secure validateAndIngest()FileValidator.java with magic byte checksDocumentType enum added (PDF, DOCX, TXT, UNKNOWN)PushGuard for known-type whitelist before pushing to nodesRelated Pages:
[[Home]]
[[Sandbox Design]] (planned next)
*This page is part of the Metadata System design documentation. Updated after Revision 14+ wi