Skip to main content
ChameleonDB implements a defense-in-depth security model with five layers protecting schema integrity and access control.

Security Architecture

The 5 Security Layers

1. File Permissions (OS-level)

Purpose: Prevent unauthorized file system access at the OS level.

2. Hash Integrity (Vault)

Every schema version is cryptographically hashed using SHA256:
How it works:
  1. Schema saved to versions/v001.json
  2. SHA256 hash computed and saved to hashes/v001.hash
  3. On every load, hash is verified
  4. If mismatch → integrity violation detected
Purpose: Tamper detection for all schema files.
Learn more about vault integrity in Vault Integrity.

3. Integrity Modes (Access Control)

Four operational modes control schema modifications: Mode enforcement:
  • Application code checks mode before operations
  • Mode upgrades require password authentication
  • All mode changes logged in audit trail
Learn more about modes in Mode Enforcement.

4. Vault-Enforced Loading

Application code cannot bypass the vault:
Purpose: Prevent schema bypass attacks.

5. Audit Trail

Complete event logging: integrity.log (append-only):
Purpose: Forensics and compliance.

Threat Model

What ChameleonDB Protects Against

Schema tampering - Hashes detect file modifications
Unauthorized schema changes - Mode enforcement blocks operations
Schema bypass attacks - Vault is the only trusted source
Privilege escalation - Mode upgrades require password
Audit trail tampering - Append-only logs

What ChameleonDB Does NOT Protect Against

Root/admin access - OS-level root can modify anything. Use OS access controls (sudoers, SELinux).
Database compromise - ChameleonDB doesn’t secure the database itself. Use database security (SSL, auth, encryption at rest).
Memory attacks - Passwords are in memory during operation. Use memory protection (ASLR, DEP).
Social engineering - Users giving away passwords. Implement security training and MFA for production.

Security Checklist

Before deploying to production:

Next Steps

Vault Integrity

Learn about SHA256 hashing and tamper detection

Mode Enforcement

Understand ring-based access control

Best Practices

Security recommendations for production