| category | 🛡️ Security/Compliance |
|---|---|
| version | v1.3.0 |
| status | ✅ |
| date | 22.12.2025 |
GDPR, HIPAA, SOC2 Compliance für Enterprise-Anforderungen.
- 📋 Übersicht
- ✨ Features
- 🚀 Schnellstart
- 📖 Detaillierte Dokumentation
- 💡 Best Practices
- 🔧 Troubleshooting
- 📚 Siehe auch
- 📝 Changelog
Vollständige DSGVO/eIDAS/HGB-konforme Datenverarbeitung für hochsensible Anwendungen.
| Feature | Beschreibung | Status |
|---|---|---|
| Data Governance | Klassifizierung (offen/vs-nfd/geheim/streng_geheim) | ✅ Produktiv |
| PII Detection | Automatische Erkennung von 7+ PII-Typen | ✅ Produktiv |
| Audit Logging | Encrypt-then-Sign mit PKI | ✅ Produktiv |
| Retention Management | Automatische Archivierung & Löschung | ✅ Produktiv |
| Field Encryption | AES-256-GCM für sensitive Felder | ✅ Produktiv |
cd build/Release
./themis_server.exe --config ../../config/config.json// config/config.json
{
"features": {
"retention": {
"enabled": true,
"interval_hours": 24,
"policies_path": "./config/retention_policies.yaml"
}
}
}python demo_compliance.py| Artikel | Anforderung | Umsetzung |
|---|---|---|
| Art. 5 | Datenminimierung | PII-Detection + Auto-Redaction |
| Art. 17 | Recht auf Vergessenwerden | Auto-Purge nach Retention-Period |
| Art. 25 | Privacy by Design | Verschlüsselung per Governance-Policy |
| Art. 30 | Verzeichnis der Verarbeitungstätigkeiten | Audit-Logs (Encrypt-then-Sign) |
| Art. 32 | Sicherheit der Verarbeitung | AES-256-GCM + PKI + TLS |
| Komponente | Funktion | Status |
|---|---|---|
| Qualifizierte Signatur | PKI-Client (RSA-SHA256) | ✅ Produktiv (mit ENV-Konfiguration) / ⚙️ Stub (ohne ENV) |
| Zeitstempel | Präzise Zeiterfassung | ✅ |
| Langzeitarchivierung | Archive-Handler (S3/Tape) | ⚙️ Konfigurierbar |
| Nachweisbarkeit | Tamper-proof Audit-Logs | ✅ Mit konfiguriertem PKI |
✅ PKI Update (Nov 2025): Die PKI-Implementierung (src/utils/pki_client.cpp) unterstützt jetzt echte RSA-Signaturen via OpenSSL. Produktiv eIDAS-konform wenn ENV-Variablen gesetzt sind (THEMIS_PKI_PRIVATE_KEY, THEMIS_PKI_CERTIFICATE). Ohne ENV läuft Stub-Modus (Base64, nur Development). Details: docs/security/pki_rsa_integration.md.
| Dokument | Aufbewahrungsfrist | Policy |
|---|---|---|
| Geschäftsbriefe | 6 Jahre | transaction_logs |
| Buchungsbelege | 10 Jahre | accounting_records |
| Inventare | 10 Jahre | inventory |
- At-Rest: AES-256-GCM für sensitive Felder
- In-Transit: TLS 1.3 (empfohlen)
- Key-Management: Vault-Integration (optional)
// Beispiel: Audit-Event
{
"action": "DATA_ACCESS",
"user_id": "user_123",
"entity_id": "patient_456",
"classification": "geheim",
"timestamp": 1730505600,
"ip_address": "192.168.1.42"
}Jedes Event wird:
- Verschlüsselt (AES-256-GCM)
- Signiert (RSA-SHA256 via PKI)
- Persistent geloggt (JSONL)
Unterstützte Typen:
- ✅ Email (RFC 5322)
- ✅ Telefon (International + US)
- ✅ SSN (US Social Security)
- ✅ Kreditkarte (Luhn-validiert)
- ✅ IBAN (DE/EU)
- ✅ IP-Adresse (IPv4)
- ✅ URL (HTTP/HTTPS)
# Automatisch via HTTP-Header
X-Data-Classification: geheim
X-Governance-Mode: enforce| Klassifizierung | Verschlüsselung | ANN-Indexing | Retention | Cache |
|---|---|---|---|---|
offen |
✗ | ✓ | 30d | ✓ |
vs-nfd |
✓ | ✗ | 365d | ✗ |
geheim |
✓ | ✗ | 90d | ✗ |
streng_geheim |
✓ | ✗ | 30d | ✗ |
# config/retention_policies.yaml
policies:
- name: user_personal_data
retention_period: 365d
archive_after: 180d
auto_purge_enabled: true
classification_level: geheim# config/pii_detection.yaml
engines:
- name: regex_engine
type: regex
enabled: true
patterns:
- type: CREDIT_CARD
pattern: '\b\d{4}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}\b'
validate_luhn: truecd build
ctest -C Release -R "Governance|PIIDetector|Retention" --output-on-failureErwartetes Ergebnis:
100% tests passed, 0 tests failed out of 48
| Komponente | Tests | Coverage |
|---|---|---|
| Governance | 15 | 100% |
| PII-Detection | 19 | 100% |
| Retention | 14 | 100% |
| Audit-Logging | 3 | 100% |
#include "utils/pii_detector.h"
#include "utils/audit_logger.h"
#include "utils/retention_manager.h"
// 1. PII-Detection
vcc::PIIDetector pii_detector("./config/pii_detection.yaml");
auto findings = pii_detector.detectInJson(request_body);
// 2. Governance-Check
if (classification == "geheim" && !encryption_enabled) {
return error("Encryption required for geheim classification");
}
// 3. Audit-Logging
nlohmann::json audit_event;
audit_event["action"] = "DATA_CREATE";
audit_event["user_id"] = user_id;
audit_event["classification"] = classification;
audit_logger->logEvent(audit_event);
// 4. Verschlüsselte Speicherung
for (const auto& finding : findings) {
if (finding.type == PIIType::CREDIT_CARD) {
EncryptedField<std::string> encrypted(key_provider, "entity_key");
encrypted.encrypt(finding.value);
entity.setField("credit_card_encrypted", encrypted.toBase64());
}
}
// 5. Retention-Metadata
entity.setField("_classification", classification);
entity.setField("_created_at", std::time(nullptr));themis_governance_requests_total{classification="geheim"} 1523
themis_pii_detections_total{type="CREDIT_CARD"} 234
themis_retention_archived_total 42
themis_retention_purged_total 18
themis_audit_events_total 3456
# Retention-Statistik
grep "Retention.*Completed" logs/themis_server.log | tail -1
# PII-Detections pro Tag
grep "PII_DETECTED" data/logs/audit.jsonl | \
jq -r '.timestamp' | \
xargs -I{} date -d @{} +%Y-%m-%d | \
sort | uniq -c
# Klassifizierungs-Verteilung
grep "classification" data/logs/audit.jsonl | \
jq -r '.classification' | \
sort | uniq -cSymptom: Keine Logs wie [Retention] Completed
Lösung:
// config/config.json
{
"features": {
"retention": {
"enabled": true // <- Prüfen!
}
}
}Symptom: Kreditkarte wird nicht als PII markiert
Lösung: Luhn-Validierung aktivieren
patterns:
- type: CREDIT_CARD
validate_luhn: true // <- Wichtig!Symptom: Klartext in audit.jsonl
Lösung:
AuditLoggerConfig cfg;
cfg.encrypt_then_sign = true; // <- Aktivieren!- Issues: GitHub Issues
- Dokumentation:
docs/Verzeichnis - Demo:
python demo_compliance.py
- ✅ Data Governance (4 Klassifizierungsstufen)
- ✅ PII Detection (7 Typen, YAML-konfigurierbar)
- ✅ Audit Logging (Encrypt-then-Sign)
- ✅ Retention Management (YAML-Policies, Auto-Purge)
- ✅ Field Encryption (AES-256-GCM)
- ✅ 48 Unit-Tests (100% Pass)
License: Proprietary
Maintainer: Themis Compliance Team
Version: 0.1.0