-
Notifications
You must be signed in to change notification settings - Fork 1
features_governance_usage
YAML-basierte Governance-Policy-Engine mit Klassifizierung, Zugriffskontrolle und Retention-Policies.
- 📋 Übersicht
- ✨ Features
- 🚀 Schnellstart
- 📖 Detaillierte Dokumentation
- 💡 Best Practices
- 🔧 Troubleshooting
- 📚 Siehe auch
- 📝 Changelog
Die Governance Policy Engine stellt YAML-basierte Konfiguration für umfassende Governance-Anforderungen bereit:
- Klassifizierung: Daten-Klassifizierungssystem (offen, vs-nfd, geheim, streng-geheim)
- Zugriffskontrolle: Fine-grained access control (ANN, export, cache)
- Retention-Policies: Aufbewahrungsrichtlinien per Klassifizierung
- Encrypt-then-Sign: Log-Handling mit PKI-Signierung
- Observe/Enforce Modes: Graduelle Rollout-Unterstützung für Policies
- Classification-based data protection (offen, vs-nfd, geheim, streng-geheim)
- Fine-grained access control (ANN, export, cache)
- Retention policies per classification
- Encrypt-then-Sign log handling
- Observe/Enforce modes for gradual rollout
| Feature | Beschreibung | Status |
|---|---|---|
| YAML-Konfiguration | Governance-Policies in YAML-Format | ✅ Implementiert |
| Klassifizierung | 4-Ebenen Datenklassifizierung (offen-streng-geheim) | ✅ Implementiert |
| Zugriffskontrolle | Fine-grained ACL (ANN, Export, Cache) | ✅ Implementiert |
| Retention-Policies | Automatische Aufbewahrungsrichtlinien | ✅ Implementiert |
| Observe/Enforce Modes | Graduelle Policy-Rollout-Unterstützung | ✅ Implementiert |
# 1. Governance-Policies laden
cp config/governance.yaml.example config/governance.yaml
# 2. Server mit Governance-Engine starten
export THEMIS_GOVERNANCE_MODE=enforce
./themis_server --config config.json
# 3. Test: Klassifizierung setzen
curl -X POST http://localhost:8080/api/data \
-H "X-Data-Classification: geheim" \
-d '{"data": "sensitive"}'Governance policies are defined in config/governance.yaml:
vs_classification:
offen:
encryption_required: false
ann_allowed: true
export_allowed: true
cache_allowed: true
redaction_level: "none"
retention_days: 365
log_encryption: false
geheim:
encryption_required: true
ann_allowed: false # ANN disabled; exact search only
export_allowed: false
cache_allowed: false
redaction_level: "strict"
retention_days: 3650 # 10 years
log_encryption: true
enforcement:
resource_mapping:
"/admin/*": "vs-nfd"
"/admin/status": "vs-nfd" # explizit gemappt
"/vector/search": "offen"
default_mode: "enforce"Der Server lädt governance.yaml aus den folgenden Pfaden (erste gefundene Datei gewinnt):
-
config/governance.yaml(aus Repo-Root gestartet) -
../config/governance.yaml(selten, falls CWDbuild/ist) -
../../config/governance.yaml(CTest/IDE: CWD ist häufigbuild/<Config>wiebuild/Release) -
./governance.yaml(Fallback im aktuellen Verzeichnis)
Hinweis: Diese Reihenfolge stellt sicher, dass CTest-Läufe aus build/<Config> die zentrale Konfiguration unter config/ finden.
Clients can specify governance requirements via HTTP headers:
-
X-Classification: Data classification level (offen, vs-nfd, geheim, streng-geheim) -
X-Governance-Mode: Enforcement mode (enforce, observe) -
X-Encrypt-Logs: Force log encryption (true, false, auto) -
X-Redaction-Level: Redaction profile (none, standard, strict)
Server returns applied policy decisions:
-
X-Themis-Policy: Compact policy summary -
X-Themis-Integrity: Signature status (signed-ciphertext:policy-only) -
X-Themis-ANN: ANN availability (allowed, disabled) -
X-Themis-Content-Enc: Content encryption requirement (required, optional) -
X-Themis-Export: Export permission (allowed, forbidden) -
X-Themis-Cache: Cache permission (allowed, disabled) -
X-Themis-Retention-Days: Data retention period
Im Observe-Modus können zusätzlich Warnhinweise erscheinen:
-
X-Themis-Policy-Warn: z. B.ann_disabled_but_observedodercontent_encryption_required_but_observed
Request:
POST /vector/search
X-Classification: offen
Content-Type: application/json
{
"vector": [0.1, 0.2, ...],
"k": 10
}Response:
HTTP/1.1 200 OK
X-Themis-Policy: classification=offen;mode=enforce;encrypt_logs=false;redaction=none
X-Themis-ANN: allowed
X-Themis-Content-Enc: optional
X-Themis-Export: allowed
X-Themis-Cache: allowed
X-Themis-Retention-Days: 365
{
"results": [...]
}Request:
POST /vector/search
X-Classification: geheim
X-Governance-Mode: enforce
Content-Type: application/json
{
"vector": [0.1, 0.2, ...],
"k": 10
}Response:
HTTP/1.1 403 Forbidden
X-Themis-Policy: classification=geheim;mode=enforce;encrypt_logs=true;redaction=strict
X-Themis-ANN: disabled
{
"error": true,
"message": "Approximate vector search (ANN) is disabled for classification 'geheim'"
}Request:
POST /vector/search
X-Classification: geheim
X-Governance-Mode: observe
Content-Type: application/json
{
"vector": [0.1, 0.2, ...],
"k": 10
}Response:
HTTP/1.1 200 OK
X-Themis-Policy: classification=geheim;mode=observe;encrypt_logs=true;redaction=strict
X-Themis-ANN: disabled
X-Themis-Policy-Warn: ann_disabled_but_observed
X-Themis-Export: forbidden
X-Themis-Cache: disabled
X-Themis-Retention-Days: 3650
{
"results": [...]
}Request:
POST /content/import
X-Classification: streng-geheim
X-Governance-Mode: enforce
Content-Type: application/json
{
"content": {
"id": "doc123",
"mime_type": "application/pdf",
"encrypted": false
},
"blob": "base64encodeddata..."
}Response:
HTTP/1.1 422 Unprocessable Entity
X-Themis-Policy: classification=streng-geheim;mode=enforce;encrypt_logs=true;redaction=strict
{
"error": true,
"message": "Content encryption required for classification 'streng-geheim'"
}Request:
GET /admin/backupResponse:
HTTP/1.1 200 OK
X-Themis-Policy: classification=vs-nfd;mode=enforce;encrypt_logs=true;redaction=standard
X-Themis-Retention-Days: 1825
{
"status": "ok"
}- No encryption required
- ANN allowed
- Export/cache allowed
- 1 year retention
- Encryption required
- ANN allowed
- Export/cache allowed
- 5 years retention
- Encryption required
- ANN disabled (exact search only)
- Export/cache forbidden
- 10 years retention
- Encryption required
- ANN disabled
- Export/cache forbidden
- 20 years retention
Use X-Governance-Mode: observe to test policies without enforcement:
- Deploy with
default_mode: observeingovernance.yaml - Monitor
X-Themis-Policy-Warnheaders in production - Identify and fix policy violations
- Switch to
default_mode: enforce
Edit config/governance.yaml to customize:
- Classification levels and their properties
- Resource-to-classification mappings
- Default enforcement mode
- Retention periods
- SAGA signing and log encryption settings
Changes take effect after server restart (hot-reload planned for future).
The governance engine works with the encryption strategy:
-
encryption_required: true→ Data-at-rest encryption mandatory -
log_encryption: true→ SAGA/Audit logs encrypted before PKI signing (Encrypt-then-Sign) - Classification determines key hierarchy and access controls
Supported frameworks (configurable in governance.yaml):
- GDPR (EU General Data Protection Regulation)
- VSA (German Federal Classification System)
- BSI-C5 (German Cloud Security Standard)
Returns current time-series compression configuration.
Updates time-series compression settings.
All endpoints respect governance headers and return policy decisions in response headers.
Test policy enforcement with curl:
# Test ANN restriction (enforce)
curl -X POST http://localhost:8080/vector/search \
-H "X-Classification: geheim" \
-H "X-Governance-Mode: enforce" \
-H "Content-Type: application/json" \
-d '{"vector": [0.1, 0.2], "k": 10}'
# Expected: 403 Forbidden
# Test ANN restriction (observe)
curl -X POST http://localhost:8080/vector/search \
-H "X-Classification: geheim" \
-H "X-Governance-Mode: observe" \
-H "Content-Type: application/json" \
-d '{"vector": [0.1, 0.2], "k": 10}'
# Expected: 200 OK with X-Themis-Policy-Warn headerUnter Windows PowerShell lassen sich gezielt nur Governance- oder Time-Series-Tests ausführen. Beispiele (aus build/):
# Alle Governance-Tests (mehrere Suites via Regex)
ctest -C Release -R "StatsApiTest|MetricsApiTest|HttpRangeIndexTest|HttpGovernanceTest" --output-on-failure
# Nur drei spezifische Governance-Fälle
ctest -C Release -R "HttpGovernanceTest.Classification_VsNfd_RequiresEncryption|HttpGovernanceTest.ResourceMapping_AppliesClassification|HttpGovernanceTest.RetentionDays_ReturnsPolicy" --output-on-failure
# Alle Time-Series-bezogenen Suites
ctest -C Release -R "^HttpTimeSeriesTest\.|^TSStoreTest\.|^GorillaCodecTest\.|^ContinuousAggTest\." --output-on-failureTipps:
- Verwende Anker (
^) und das Escapen des Punkts (\.) für exakte Präfix-Matches. - In PowerShell sind doppelte Anführungszeichen empfohlen, damit Regex-Sonderzeichen korrekt übergeben werden.
Planned features:
- Hot-reload of
governance.yamlwithout restart - Per-user classification overrides (via JWT claims)
- Audit trail for policy violations
- Automated compliance reports
- Field-level encryption based on classification
| ? Empfohlen | ? Vermeiden |
|---|---|
| Dokumentierte Best Practices | Anti-Patterns ignorieren |
| Regelm��iges Testing | Deployment ohne Tests |
| Monitoring aktivieren | Blind Deployments |
H�ufige Probleme
Siehe Logs f�r Details.
| Version | Datum | �nderungen |
|---|---|---|
| v1.3.0 | 2025-12-22 | Template-Aktualisierung f�r v1.3.0 Standard |
Letzte Aktualisierung: 22. Dezember 2025
Autor: ThemisDB Team
Status: Produktiv
| ✅ Empfohlen | ❌ Vermeiden |
|---|---|
| Dokumentierte Best Practices | Anti-Patterns ignorieren |
| Regelmäßiges Testing | Deployment ohne Tests |
| Monitoring aktivieren | Blind Deployments |
Häufige Probleme
Siehe Logs für Details.
| Version | Datum | Änderungen |
|---|---|---|
| v1.3.0 | 2025-12-22 | Template-Aktualisierung für v1.3.0 Standard |
Letzte Aktualisierung: 22. Dezember 2025
Autor: ThemisDB Team
Status: ✅ Produktiv
ThemisDB v1.3.4 | GitHub | Documentation | Discussions | License
Last synced: January 02, 2026 | Commit: 6add659
Version: 1.3.0 | Stand: Dezember 2025
- Übersicht
- Home
- Dokumentations-Index
- Quick Reference
- Sachstandsbericht 2025
- Features
- Roadmap
- Ecosystem Overview
- Strategische Übersicht
- Geo/Relational Storage
- RocksDB Storage
- MVCC Design
- Transaktionen
- Time-Series
- Memory Tuning
- Chain of Thought Storage
- Query Engine & AQL
- AQL Syntax
- Explain & Profile
- Rekursive Pfadabfragen
- Temporale Graphen
- Zeitbereichs-Abfragen
- Semantischer Cache
- Hybrid Queries (Phase 1.5)
- AQL Hybrid Queries
- Hybrid Queries README
- Hybrid Query Benchmarks
- Subquery Quick Reference
- Subquery Implementation
- Content Pipeline
- Architektur-Details
- Ingestion
- JSON Ingestion Spec
- Enterprise Ingestion Interface
- Geo-Processor Design
- Image-Processor Design
- Hybrid Search Design
- Fulltext API
- Hybrid Fusion API
- Stemming
- Performance Tuning
- Migration Guide
- Future Work
- Pagination Benchmarks
- Enterprise README
- Scalability Features
- HTTP Client Pool
- Build Guide
- Implementation Status
- Final Report
- Integration Analysis
- Enterprise Strategy
- Verschlüsselungsstrategie
- Verschlüsselungsdeployment
- Spaltenverschlüsselung
- Encryption Next Steps
- Multi-Party Encryption
- Key Rotation Strategy
- Security Encryption Gap Analysis
- Audit Logging
- Audit & Retention
- Compliance Audit
- Compliance
- Extended Compliance Features
- Governance-Strategie
- Compliance-Integration
- Governance Usage
- Security/Compliance Review
- Threat Model
- Security Hardening Guide
- Security Audit Checklist
- Security Audit Report
- Security Implementation
- Development README
- Code Quality Pipeline
- Developers Guide
- Cost Models
- Todo Liste
- Tool Todo
- Core Feature Todo
- Priorities
- Implementation Status
- Roadmap
- Future Work
- Next Steps Analysis
- AQL LET Implementation
- Development Audit
- Sprint Summary (2025-11-17)
- WAL Archiving
- Search Gap Analysis
- Source Documentation Plan
- Changefeed README
- Changefeed CMake Patch
- Changefeed OpenAPI
- Changefeed OpenAPI Auth
- Changefeed SSE Examples
- Changefeed Test Harness
- Changefeed Tests
- Dokumentations-Inventar
- Documentation Summary
- Documentation TODO
- Documentation Gap Analysis
- Documentation Consolidation
- Documentation Final Status
- Documentation Phase 3
- Documentation Cleanup Validation
- API
- Authentication
- Cache
- CDC
- Content
- Geo
- Governance
- Index
- LLM
- Query
- Security
- Server
- Storage
- Time Series
- Transaction
- Utils
Vollständige Dokumentation: https://makr-code.github.io/ThemisDB/