Roadmap-Hinweis: Vage Bullets ohne Akzeptanzkriterien in Checkbox-Tasks überführen. Format:
- [ ] <Task> (Target: <Q/Jahr>).
v0.1.0 — All three FUTURE_ENHANCEMENTS items (stdin key delivery, Argon2id KDF,
key rotation persistence) are implemented and tested. GocryptfsBackend quality
is now ≥ 90/100; KeyRotationScheduler retains Production-Ready (100/100).
-
GocryptfsBackend—fork/execvp-based FUSE container lifecycle - Safe subprocess execution:
executeCommandSafe()withfork/execvp - Stdin key delivery:
executeCommandWithStdin()+deliverKeyViaStdin(); key passed via pipe to gocryptfs-passfile /dev/stdin;explicit_bzeroclears pipe buffer; no key material written to/tmp -
KeyDerivationServiceinterface +Argon2idKeyDerivationService(m=65536, t=3, p=4, output=32 bytes); per-container salt in.themis_kdf_salt -
GocryptfsBackend(KeyDerivationService*)constructor +resolveKey() -
isMounted()via/proc/mounts(Linux) andmountoutput (macOS) -
checkAvailability()— validates gocryptfs binary and/dev/fuse -
KeyRotationScheduler— per-SecurityLevelrotation with background thread -
IRotationStore+ persistence:last_check_msandinterval_dayswritten to store after each callback; state loaded onscheduleRotation() -
shutdown()usescondition_variablefor immediate thread wake -
MultiLevelEncryptedStorage— HOT/WARM/COLD tier orchestration - 20 unit + integration tests (
test_user_storage_features.cpp) - CI workflow (
user-storage-encrypted-ci.yml) - Deprecated
executeCommand()fully removed (v0.3.0); all call sites useexecuteCommandSafe() -
reconcileStaleMounts()— scans/proc/mountsfor orphaned FUSE mounts on startup; unmounts viafusermount -u/umountfallback; non-fatal; called frominitialize()
- [~] Integration tests: create → mount → write file → unmount → re-mount → verify file (Target: Q3 2026)
- Fix
const_castincreatePasswordFile()— returnsResult<std::string>(done) - Secure key delivery via stdin pipe instead of
/tmppassword file (done) - Argon2id KDF (
Argon2idKeyDerivationService, m=65536/t=3/p=4) (done) -
IRotationStorepersistence forKeyRotationScheduler(done) - 20 unit tests (AC-SD, AC-KDF, AC-PRS, AC-GCF) (done)
- Integration tests: create → mount → write file → unmount → re-mount → verify file (Target: Q3 2026)
- Remove deprecated
executeCommand()after confirming no external callers (v0.3.0)
-
reconcileStaleMounts()— scans/proc/mountsfor orphaned FUSE mounts, unmounts viafusermount -u/umountfallback, non-fatal (done) - Called from
initialize()beforeinitializeLevel()(done) - 5
StaleMountReconciliationTesttests (done)
- Prometheus metrics —
StorageMetricsstruct +MultiLevelEncryptedStorage::getMetricsText()(v0.3.0)- Metric families:
user_storage_mounts_active(gauge),user_storage_mount_operations_total(counter, label: operation),user_storage_key_rotations_total(counter),user_storage_container_size_bytes(gauge) - Counters updated in
mountLevel(),unmountLevel(),rotateKey();recordKeyRotation()public for external callers - All atomic; thread-safe; overhead ≤ 0.1 ms per operation
- Metric families:
- Remove deprecated
GocryptfsBackend::executeCommand()(v0.3.0)- Replaced all 3 call sites (
checkAvailability,getBackendVersion,isMounted) withexecuteCommandSafe() - Removed declaration from
gocryptfs_backend.hppand implementation fromgocryptfs_backend.cpp
- Replaced all 3 call sites (
- Stale mount reconciliation on startup via
/proc/mountsscan (Target: Q3 2026) → Implemented in v0.2.0:reconcileStaleMounts()scans for orphaned FUSE mounts; see v0.2.0 section above - Per-user container isolation: one encrypted dir per user_id (Target: Q1 2027)
- Storage quota enforcement per container (Target: Q1 2027)
- Define
GocryptfsBackendcontainer lifecycle API - Define
KeyRotationSchedulerSecurityLevel→ schedule mapping - Define
MultiLevelEncryptedStoragetier model
-
executeCommandSafe()viafork/execvp -
executeCommandWithStdin()+deliverKeyViaStdin()for stdin key delivery -
KeyDerivationService+Argon2idKeyDerivationService(libargon2) -
resolveKey()inGocryptfsBackendintegrating KDF with per-container salt -
IRotationStoreinterface + persistence inKeyRotationScheduler -
isMounted()via/proc/mounts -
KeyRotationScheduler::schedulerLoop()background thread withcondition_variable
- Already-mounted guard in
mountContainer() - Not-mounted guard in
unmountContainer() -
_exit(127)in child onexecvpfailure - Exit code check in parent with error propagation
-
explicit_bzeroclears pipe buffer after key write - Corrupted persisted rotation state is silently ignored
- 20 unit tests: stdin delivery, Argon2id KDF, IRotationStore persistence, GocryptfsBackend (done)
- 5 stale mount reconciliation tests (done)
- 12 v0.3.0 metric + deprecation tests (
test_user_storage_v03_focused, USE-01..12) (done) - Integration tests (Target: Q3 2026)
- Stdin key delivery eliminates
/tmpkey file window - Argon2id KDF: latency ≤ 200 ms on reference hardware (40 ms measured in CI)
-
condition_variablein scheduler enables immediate shutdown
- README, ARCHITECTURE, AUDIT, CHANGELOG, ROADMAP, SECURITY, FUTURE_ENHANCEMENTS
| Area | Status | Notes |
|---|---|---|
GocryptfsBackend core API |
✅ | create/mount/unmount/isMounted implemented |
| Safe subprocess | ✅ | fork/execvp; no shell injection possible |
| Stdin key delivery | ✅ | Pipe + explicit_bzero; no filesystem trace |
| Argon2id KDF | ✅ | Argon2idKeyDerivationService; m=65536, t=3, p=4 |
| Key rotation persistence | ✅ | IRotationStore; JSON state per SecurityLevel |
KeyRotationScheduler |
✅ | Production-Ready; condition_variable shutdown |
| Tests | ✅ | 20 v0.1.0 + 5 v0.2.0 stale-mount + 12 v0.3.0 metric tests |
| Prometheus metrics | ✅ | getMetricsText() — 4 families, std::atomic, thread-safe (v0.3.0) |
executeCommand() removed |
✅ | All call sites migrated to executeCommandSafe() (v0.3.0) |
| CI | ✅ | user-storage-encrypted-ci.yml |
getBackendVersion()usesconst_castto callexecuteCommandSafe()on a const object (cosmetic;executeCommand()fully removed in v0.3.0).- Stale mount reconciliation on startup is planned but not yet implemented (FUTURE_ENHANCEMENTS §4).
- Per-user container isolation and storage quota enforcement are planned for v0.3.0 / Q1 2027.
Stand: 2026-04-20 – Quelle: src/UNUSED_FUNCTIONS_REPORT.md
createContainer– Erstellt verschlüsselten Gocryptfs-Container; Plugin-Tests + impl vorhandenmountContainer– Mounted einen Gocryptfs-Container; Tests + Bench vorhandenunmountContainer– Unmountet einen Container; Bench vorhandenisMounted– Prüft ob Container gemountet; genutzt in usb_volume_hardening.cppGocryptfsBackend– Backend-Implementierung für Gocryptfs-verschlüsselten Storage