-
Notifications
You must be signed in to change notification settings - Fork 1
Security Hardening Checklist
Version: 1.4.0
Last Updated: April 2026
Status: Production Ready
Security Score: 92/100
This checklist ensures ThemisDB is configured with production-grade security before deployment. Follow each section to harden your ThemisDB installation against common attack vectors and meet compliance requirements.
Target Environments:
- β Enterprise Production
- β GPU-Accelerated Deployments
- β Cloud Environments (AWS, Azure, GCP)
- β On-Premises Data Centers
- β Healthcare (HIPAA)
- β Financial Services
- β Government (BSI C5, SOC 2)
Status: β
IMPLEMENTED
Priority: P0 - CRITICAL
Compliance: GDPR Art. 32, SOC 2 CC6.1, HIPAA Β§ 164.310
Verification:
# Check if secure clear is enabled
grep -r "VRAMSecureClear" src/
grep "secureClearCUDA\|secureClearHIP" src/llm/
# Test VRAM clearing
./build/tests/test_vram_secure_clear --gtest_filter="*SecureClear*"Configuration:
# config/security.yaml
gpu_security:
vram_secure_clear:
enabled: true
num_passes: 3 # Multi-pass overwrite
verify_clear: false # Set true for compliance audits
audit_log: true # Log all VRAM operationsWhat It Protects Against:
- β Cold-boot attacks
- β Memory dump attacks
- β Inter-process memory leakage
- β Encryption key exposure in VRAM
- β Model weight extraction
- β Embedding theft
Checklist:
- VRAM secure clear enabled in production config
- Tested with GPU workloads (LoRA training, inference)
- Audit logging enabled for VRAM operations
- Verified secure clear in GPU memory manager
- Confirmed no performance degradation (<5% overhead)
Status: β
IMPLEMENTED
Priority: P1 - HIGH
Compliance: SOC 2 CC6.1, NIST SP 800-63B Level 2
Verification:
# Test MFA implementation
./build/tests/test_mfa_authenticator --gtest_filter="*MFA*"
# Check MFA enrollment
curl -X POST http://localhost:8080/api/v1/auth/mfa/enroll \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"Configuration:
# config/auth.yaml
mfa:
enabled: true
totp:
time_step_seconds: 30
code_length: 6
time_window: 1 # Β±30 seconds tolerance
issuer: "ThemisDB"
recovery_codes:
count: 8
length: 8
enforcement:
admin_required: true # MFA mandatory for admins
operator_required: true
user_optional: true # Optional for regular usersSetup Procedures:
-
Enable MFA for admin accounts:
themisctl auth mfa enroll --user admin
-
Generate QR code for mobile authenticator:
themisctl auth mfa qr-code --user admin > qr.png -
Generate recovery codes:
themisctl auth mfa recovery-codes --user admin
-
Test MFA login:
curl -X POST http://localhost:8080/api/v1/auth/login \ -d '{"username":"admin","password":"***","mfa_code":"123456"}'
Checklist:
- MFA enabled for all admin accounts
- MFA enabled for operator accounts
- Recovery codes generated and securely stored
- Mobile authenticator apps configured (Google Authenticator, Authy)
- MFA bypass disabled in production
- Audit logging enabled for MFA events
- User training completed on MFA procedures
Status: β
CONFIGURED
Priority: P1 - HIGH
Configuration:
# config/tls.yaml
tls:
enabled: true
version: "1.3"
fallback: "1.2" # TLS 1.2 for legacy clients
cipher_suites:
- TLS_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
- TLS_AES_128_GCM_SHA256
certificate: /etc/themis/certs/server.crt
private_key: /etc/themis/certs/server.key
client_ca: /etc/themis/certs/ca.crt # For mTLSChecklist:
- Valid TLS certificate installed (not self-signed in prod)
- TLS 1.3 enabled
- Weak cipher suites disabled
- HSTS header enabled
- Certificate expiry monitoring configured
- Automated certificate renewal (Let's Encrypt/ACME)
- mTLS configured for service-to-service communication
Status: β
IMPLEMENTED
Priority: P1 - HIGH
Compliance: GDPR Art. 30, SOC 2 CC7.2, HIPAA Β§ 164.312
Configuration:
# config/audit.yaml
audit_logging:
enabled: true
encrypt_then_sign: true
log_path: /var/log/themis/audit.jsonl
key_id: saga_log
# Hash chain for tamper detection
enable_hash_chain: true
chain_state_file: /var/lib/themis/audit_chain.json
# SIEM integration
enable_siem: true
siem_type: syslog # or "splunk"
siem_host: siem.company.com
siem_port: 514
splunk_token: ${SPLUNK_HEC_TOKEN}
# Event filtering
log_levels:
- HIGH
- MEDIUM
# Retention
retention_days: 365 # 1 year minimum for compliance
archive_after_days: 90
archive_path: /archive/themis/audit/New Event Types (v1.4.0):
MFA Events:
- MFA_ENROLLED
- MFA_ENABLED
- MFA_DISABLED
- MFA_TOTP_SUCCESS
- MFA_TOTP_FAILED
- MFA_RECOVERY_CODE_USED
- MFA_RECOVERY_CODES_REGENERATED
GPU/VRAM Security:
- VRAM_ALLOCATED
- VRAM_DEALLOCATED
- VRAM_SECURE_CLEAR
- GPU_MEMORY_EXHAUSTION
Binary Integrity:
- BINARY_SIGNATURE_VERIFIED
- BINARY_SIGNATURE_FAILED
- MANIFEST_UPDATED
Checklist:
- Audit logging enabled
- Encrypt-then-sign configured
- Hash chain enabled for tamper detection
- SIEM integration configured
- Log retention policy configured (365+ days)
- Automated log archival configured
- Audit log integrity verified on startup
- Alert rules configured for suspicious events
- Regular audit log reviews scheduled
Status: β
IMPLEMENTED
Priority: P1 - HIGH
GitHub Actions Workflow:
.github/workflows/owasp-zap.yml
Scan Types:
- Baseline Scan (PR/Push): Fast passive scanning
- Full Scan (Weekly): Deep active scanning with spider
- API Scan (PR/Push): OpenAPI specification testing
Configuration:
# .github/zap/rules.tsv
40012 FAIL Cross Site Scripting (Reflected)
40018 FAIL SQL Injection
90020 FAIL Remote OS Command Injection
90023 FAIL XML External Entity Attack
90034 FAIL JWT None AlgorithmChecklist:
- OWASP ZAP workflow enabled
- Baseline scan runs on PRs
- Weekly full scan scheduled
- API scan configured with OpenAPI spec
- Scan results reviewed and triaged
- High/critical findings addressed before release
- False positives documented
Status: β
IMPLEMENTED
Priority: P2 - MEDIUM
Compliance: NIST SP 800-218 (SSDF), SOC 2 CC7.1
Binary Manifest Signing Framework
ThemisDB now implements RSA-4096 manifest signing to verify the integrity of release binaries and detect tampering.
Features:
- β RSA-4096 digital signatures for non-repudiation
- β SHA-256 file hashing for integrity verification
- β Manifest generation from build artifacts
- β Startup verification with automatic checks
- β Audit logging for all verification events
Configuration:
# config/binary_verification.yaml
binary_verification:
enabled: true
manifest_path: /etc/themis/release_manifest.json
binaries_root: /opt/themis/bin
# Signing configuration
signing:
algorithm: RSA-4096-SHA256
key_id: release_key
# Verification on startup
verify_on_startup: true
fail_on_invalid: true # Exit if verification fails
# Update verification
verify_updates: true
allow_unsigned_dev: false # Reject unsigned binaries in productionGenerating Release Manifest:
# Generate manifest for release binaries
themisctl manifest generate \
--root /opt/themis/bin \
--version 1.4.0 \
--build-id $(git rev-parse HEAD) \
--output release_manifest.json \
--include "*.exe" "*.so" "*.dll"
# Sign manifest with RSA-4096 key
themisctl manifest sign \
--input release_manifest.json \
--key-id release_key \
--output signed_manifest.json
# Verify manifest signature
themisctl manifest verify \
--manifest signed_manifest.json \
--binaries /opt/themis/binProgrammatic Usage:
#include "security/manifest_signer.h"
// Generate manifest
auto signing_service = createKeyProviderSigningService(key_provider);
ManifestSigner::Config config{.key_id = "release_key"};
ManifestSigner signer(signing_service, config);
BinaryManifest manifest = signer.generateManifest(
"/opt/themis/bin",
"1.4.0",
"abc123",
{"*.exe", "*.so", "*.dll"}
);
// Sign manifest
SignedManifest signed = signer.signManifest(manifest);
signed.saveToFile("/etc/themis/signed_manifest.json");
// Verify on startup
StartupVerifier::Config verifier_config{
.manifest_path = "/etc/themis/signed_manifest.json",
.binaries_root = "/opt/themis/bin",
.fail_on_invalid = true
};
StartupVerifier verifier(signing_service, verifier_config);
bool valid = verifier.verify(); // Exits if invalidManifest Structure:
{
"manifest": {
"metadata": {
"version": "1.4.0",
"build_id": "abc123def456",
"timestamp": 1705579200,
"release_type": "release",
"platform": "linux-x64"
},
"files": [
{
"path": "bin/themisdb",
"sha256_hash": "a1b2c3d4...",
"size_bytes": 52428800,
"version": "1.4.0"
}
]
},
"signature": "base64_encoded_rsa4096_signature",
"signature_algorithm": "RSA-4096-SHA256",
"signer_id": "release_key"
}Security Benefits:
- β Prevents binary tampering
- β Detects supply chain attacks
- β Verifies update authenticity
- β Ensures release integrity
Checklist:
- Binary integrity verification implemented
- RSA-4096 signing keys generated
- Public key distributed securely
- Release manifest signed
- Startup verification enabled
- Update verification enabled
- Invalid signature handling tested
- Audit logging configured
- CI/CD pipeline integration (sign on release)
- Documentation updated
# config/rate_limit.yaml
rate_limiting:
enabled: true
algorithm: token_bucket
per_ip:
requests: 100
window_seconds: 60
per_user:
requests: 1000
window_seconds: 60
per_endpoint:
/api/v1/auth/login:
requests: 5
window_seconds: 300 # 5 attempts per 5 minutes
/api/v1/admin/*:
requests: 50
window_seconds: 60Checklist:
- Rate limiting enabled globally
- Authentication endpoints rate limited (brute force protection)
- Admin endpoints rate limited
- Rate limit headers exposed (X-RateLimit-*)
- Rate limit exceeded responses logged
Checklist:
- AQL injection prevention validated
- Path traversal protection tested
- XSS prevention in all user inputs
- JSON schema validation enabled
- Request body size limits enforced (10MB default)
- Content-Type validation strict
- Unicode normalization applied
Tests:
# Run security tests
./build/tests/security/test_input_validation_security
./build/tests/security/test_jwt_securityChecklist:
- Firewall configured (allow only necessary ports)
- Internal services not exposed publicly
- VPC/network segmentation configured
- Egress filtering configured
- DDoS protection enabled (CloudFlare, AWS Shield)
- Intrusion detection system (IDS) configured
Checklist:
- Field-level encryption enabled for sensitive data
- Encryption at rest enabled (AES-256-GCM)
- Key rotation policy configured (90 days)
- HSM integration for key management (production)
- Database backups encrypted
- Access control (RBAC) configured
- Least privilege principle enforced
- Right to erasure implemented (PII deletion)
- Data minimization (only necessary data collected)
- Audit trail for PII access
- Encryption at rest and in transit
- Data breach notification procedures
- DPO contact information documented
CC6 - Logical Access:
- Multi-factor authentication
- Role-based access control
- Password policies enforced
- Session management
CC7 - System Operations:
- Audit logging with integrity verification
- Security monitoring and alerting
- Incident response procedures
- Change management process
- PHI encryption (field-level encryption)
- Access controls and audit trails
- Automatic logoff (session timeout)
- Encryption at rest and in transit
- Backup and disaster recovery
- Business associate agreements
Automated Tests:
# Run all security tests
cmake --build build --target test_security
# VRAM security
./build/tests/test_vram_secure_clear
# MFA validation
./build/tests/test_mfa_authenticator
# JWT security
./build/tests/security/test_jwt_security
# Input validation
./build/tests/security/test_input_validation_security
# Audit logging
./build/tests/test_audit_loggerManual Testing:
# Penetration testing
./scripts/security/pentest.sh
# Vulnerability scanning
trivy image themisdb/themisdb:latest
# Secret scanning
gitleaks detect --source .- All P0 (CRITICAL) controls implemented
- All P1 (HIGH) controls implemented
- Security tests passing
- Penetration testing completed
- Vulnerability scan completed (no high/critical findings)
- Security configuration reviewed
- Secrets rotated (no dev/test secrets in production)
- Backup and recovery tested
- Monitoring and alerting configured
- Incident response plan documented
- Security team trained
- Security monitoring active
- Audit log verification scheduled
- Security scan scheduled (weekly)
- Penetration test scheduled (quarterly)
- Security patch process established
- User security training completed
- Compliance audit scheduled (annual)
High-Severity Events:
- Unauthorized access attempts (5+ failed logins)
- JWT none algorithm detected
- SQL/AQL injection attempts
- VRAM secure clear failures
- MFA bypass attempts
- Binary signature verification failures
Response Procedures:
- Alert security team (email, Slack, PagerDuty)
- Isolate affected systems
- Collect forensic evidence (logs, memory dumps)
- Analyze attack vector
- Apply remediation
- Verify fix
- Post-incident review
- Update security controls
- Security Hardening Guide
- Penetration Testing Guide
- MFA Setup Guide
- VRAM Security Guide
- Audit Logging Guide
Security Review:
- Security team approval
- Compliance team approval
- CTO/CISO approval
Deployment Authorization:
Reviewer: _____________________
Date: _____________________
Signature: _____________________
Security Score: 92/100 βββββ
Deployment Status: β PRODUCTION READY
ThemisDB 1.9.0-beta Β· Home Β· Module-Index Β· GitHub Β· Issues
ThemisDB 1.9.0-beta Β· Home Β· Wiki-Index Β· Module-Index Β· FAQ Β· Quick-Reference Β· GitHub Β· Issues Β· Discussions Β· License
- Batch Operations
- Best Practices
- CRUD Tutorial
- Custom Document Ingestion
- Getting Started Tutorial
- Interactive Examples
- Schema Design
- Video Tutorials
- AQL Reference
- AQL Examples
- AQL Overview
- AQL Feature Roadmap
- AQL Geospatial Guide
- AQL LLM Migration Guide
- AQL API
- AQL Grammar (EBNF)
- AQL Root Overview
- AQL Examples (root)
- API Reference
- API Module README
- OpenAPI Overview
- Client SDK Overview
- SDK Overview
- Operations
- Operations Overview
- Operations Runbook
- Operations Handbook
- ThemisCtl Admin Guide
- Pipeline E2E SOPs
- Deploy Overview
- Docker Overview
- Docker Hub README
- Helm Overview
- Packaging Overview
- Operator Overview
- Security Policy
- Production Hardening Checklist
- Security Hardening Guide
- Encryption Key Management
- Access Control Framework
- Zero Trust Policy
- API Authentication & Authorization
- HSM Production Setup
- PKCS11 Integration
- DSGVO / SOC2 Checklist
- Access Model Runbooks
- Access Model Dashboard
- Maturity Automation Runbook
- Access Review Automation
- Access Model Dashboard
- Access Model Runbooks
- Rights Revocation
- Dr Checklists
- Dr Testing
- Incident Response Playbook
- Incident Response Testing
- GPU Oom Recovery
- Grammar Debugging
- Metrics Scrape Troubleshooting
- Model Swap Procedure
- Quota Tuning
- Subagent Deployment
- Logging Configuration
- Content Model
- Crypto & Keys
- Feature Flags Reference
- Modular Architecture Roadmap
- Modularization Guide
- Module Architecture Index
- PostgreSQL Wire Protocol
- Query Scheduling
- Raft Consensus Design
- Resource Pooling
- Source Directory Guide
- Unified Access Model
- E1 001 Layered Retrieval Design
- E1 002 Ann Abstraction Strategy
- E1 003 Tensor Summary Types
- E1 004 Lora Package Distinction
- E1 005 Model Switch Compatibility
- E1 006 Federated Tensor Summaries
- E2 001 Evaluation Framework Design
- E2 002 Hardware Profile Strategy
- E2 003 Query Planner Routing Model
- E2 004 Approximation Governance Rules
- E2 005 Cross Layer Fallback Confidence Policy
- E3 001 Distributed Tensor Design
- E3 002 Manifest Coordination Strategy
- E3 003 Recovery And Erasure Choice
- E3 004 Tensor Fabric Infrastructure
- Contributing
- Contributing (root)
- Code of Conduct
- Support
- Maintainers
- CTest Guide
- Build Quick Reference
- Developer Wiki Index
- Build / Test / CI
- Module Index
- Branching Strategy
- Disabled Stub Policy
- Docs PR Policy
- GA Promotion Sign Off
- Github Milestones Setup
- Maturity Claim Verification Checklist
- Maturity Evidence Registry
- Merge Gate Bot Config
- Merge Gate Status Live
- Phase 1 Closure Report
- Phase Closure Policy
- Phase Dependency Graph
- Phase3 Enforcement Runbook
- Plugin Submodule Rollback
- PR Version Targeting
- PR Version Targeting Backfill
- Production Ready 2026 Delivery Plan
- Query Module Status
- Readme
- Release Promotion Gate Policy
- Release Validation Checklist
- Security Module 5671 Evidence Summary
- Sharding P6 Residual Risk Acceptance
- Sourcecode Compliance Governance
- Updates Development Status Sign Off
- Wave C Implementation Complete
- Blob Storage
- Cuda
- Ethics Ai
- Exporters
- Huggingface
- Image Analysis
- Importers
- RPC
- Scraper
- Themisdb Ai Watermark Detector
- User Storage Encrypted
- Chimera Architecture
- Chimera Future
- Chimera Readme
- Chimera Roadmap
- Covina Fastapi Ingestion Architecture
- Covina Fastapi Ingestion Future
- Covina Fastapi Ingestion Roadmap
- Vcc Base Architecture
- Vcc Base Future
- Vcc Base Roadmap
- Vcc Clara Ingestion Architecture
- Vcc Clara Ingestion Future
- Vcc Clara Ingestion Roadmap
- Vcc Veritas Architecture
- Vcc Veritas Future
- Vcc Veritas Roadmap
- 01 Hello World
- 02 Todo App
- 03 Contact Manager
- 04 Inventory System
- 05 Time Series Monitor
- 06 Graph Social Network
- 07 Vector Search Documents
- 08 Dms Erp System
- 09 Iot Sensor Network
- 10 Drone Image Analysis
- 11 Blog Wiki
- 12 Expense Tracker
- 13 Recipe Manager
- 14 Ecommerce Catalog
- 15 Event Management
- 16 Kanban Board
- 17 Crm
- 18 Realtime Chat
- 19 Recommendation Engine
- 20 Smart Home
- 21 Coding Platform
- 22 AQL Diagram Tool
- 23 Traveling Salesman
- 24 Moral Philosophy Debates
- API Versioning
- Distributed Sharding
- Feedback Plugins
- Geo
- Gnn
- Image Analysis
- Legal Lora Training
- LLM
- Lora Sync
- Migration
- Nlp
- Performance
- Railway
- Replication
- Rope Visualization
- Sample Product Config
- Security
- Client SDK Overview
- Quickstart
- Sdk Enhancements
- Sdk Implementation Summary
- Test Suite Readme
- Go
- Java
- Javascript
- Php
- Python
- Ruby
- Rust
- Typescript
- 01 Grundlegende Operationen
- 02 AQL Queries
- 03 Graph Daten
- 04 Multimodell Anwendung
- 01 Quickstart Guide
- 02 AQL Referenz Kurzuebersicht
- 03 Datenmodellierung Guide
- 04 Uebungsaufgaben
- 05 Best Practices Guide
- Training Documents
- Training Overview
- 01 Einfuehrung Und Uebersicht
- 02 Datenmodelle Und Architektur
- 03 AQL Abfragesprache
- 04 Installation Und Setup
- 05 Anwendungsbeispiele
- Training Presentations
- Dependencies Readme
- Processmonitor Readme
- Themis.admintools.shared Readme
- Themis.aqlquerybuilder Readme
- Themis.aqlquerybuilder Roadmap
- Themis.auditlogviewer Readme
- Themis.auditlogviewer Roadmap
- Themis.classificationdashboard Readme
- Themis.classificationdashboard Roadmap
- Themis.compliancereports Readme
- Themis.compliancereports Roadmap
- Themis.gisviewer.controlpanel Readme
- Themis.gisviewer.controlpanel Roadmap
- Themis.impactanalysisviewer Readme
- Themis.impactanalysisviewer Roadmap
- Themis.ingestiontool Readme
- Themis.ingestiontool Roadmap
- Themis.keyrotationdashboard Readme
- Themis.keyrotationdashboard Roadmap
- Themis.piimanager Readme
- Themis.piimanager Roadmap
- Themis.retentionmanager Readme
- Themis.retentionmanager Roadmap
- Themis.sagaverifier Readme
- Themis.sagaverifier Roadmap
- Themis.usbadmintool Readme
- Themis.usbadmintool Roadmap
- CI Readme
- CI Roadmap
- Compiler Diagnostics Readme
- Compiler Diagnostics Roadmap
- Completion Readme
- Copilot Ollama Router Readme
- Copilot Ollama Router Roadmap
- Gnn Readme
- Gnn Roadmap
- Rope Visualizer Readme
- Rope Visualizer Roadmap
- Tco Calculator Readme
- Tco Calculator Roadmap
- Tests Readme
- Tests Roadmap
- Themis Config Wx Readme
- Themis Docs Builder Readme
- Wikipedia Ingestion Readme