Production-ready for module loading, signature verification, and plugin lifecycle management across Windows, Linux, and macOS.
- Secure DLL/shared library loading (Windows DLL, Linux SO, macOS DYLIB) — Evidence:
src/base/module_loader.cppdlopen/LoadLibrarypaths - Digital signature verification for loaded modules — Evidence:
ModuleSecurityVerifierinmodule_loader.cpp - File integrity hash validation — Evidence:
ModuleHashVerifier::loadManifest(),src/base/module_loader.cppline 372 (SHA-256 manifest check Issue #2471) - Trust levels: TRUSTED, VERIFIED, UNTRUSTED — Evidence:
TrustLevelenum ininclude/themis/base/module_loader.h - Revocation checking for certificates — Evidence: OCSP/CRL code paths in
module_loader.cpp - Development mode to allow unsigned modules — Evidence:
ModuleSecurityPolicy::allowUnsignedinmodule_loader.h - Plugin lifecycle management (initialize, execute, shutdown) — Evidence: lifecycle state machine in
module_loader.cpp - Interface discovery to query plugin capabilities — Evidence:
getCapabilities()inmodule_loader.cpp - Automatic resource cleanup on unload — Evidence:
unloadModule()+ RAII handles inmodule_loader.cpp - Cross-platform export/import macros — Evidence:
include/themis/base/export.h - Version compatibility checking — Evidence: version fields in
ModuleCapabilitiesstruct - Plugin sandboxing with resource limits (memory, CPU) (Issue: #2372) — Evidence:
src/base/module_sandbox.cpp,include/themis/base/module_sandbox.h - Plugin health monitoring and automatic restart (Issue: #2373) — Watchdog background thread (
ModuleLoader::startWatchdog/stopWatchdog) performs periodic health checks on all loaded modules and automatically restarts failed plugins with configurable exponential backoff;WatchdogConfigandWatchdogModuleStatsexpose full per-module restart metrics;PluginWatchdogFocusedTestsintests/CMakeLists.txt - [~] WASM-based plugin isolation for untrusted code (Issue: #1572) — Partial: full sandbox infrastructure implemented in
src/base/wasm_plugin_sandbox.cpp; requires injection of a concreteWasmRuntime(e.g. Wasmtime, WasmEdge) beforecallExport()is operational; see Missing Implementations report - Hot-reload support for plugins without database restart (Issue: #1554, PR: #2396) — Evidence:
src/base/hot_reload_manager.cpp - Plugin dependency graph visualization (Issue: #1563) — Evidence:
src/base/plugin_dependency_graph.cpp,topologicalOrder()+ DOT output - Per-plugin audit trail (load, unload, errors) (Issue: #1564) — Evidence:
auditTrail_inmodule_loader.cpp - A/B testing framework using module swapping (Issue: #1565) — Evidence:
src/base/ab_test_manager.cpp - Remote plugin loading from authenticated registry (
base/remote_registry_client.cpp) — Evidence: TLS-verified download + SHA-256 integrity check inremote_registry_client.cpp - Plugin dependency resolution and ordered loading (Issue: #1566) —
ModuleDependencyResolverfully implemented inmodule_loader.cpp:registerModule,resolve,resolveFor,isVersionCompatible(semver), topological sort (Kahn's algorithm), cycle detection, missing-dependency and version-mismatch reporting - TLS public-key pinning for remote plugin registry —
RegistryConfig::pinned_public_keyfield added;CURLOPT_PINNEDPUBLICKEYapplied in bothhttpGetandhttpGetBinarycode paths inremote_registry_client.cpp
(No open work items — all Phase 1 and Phase 2 features are complete)
- Unit test coverage > 80% (Target: Q2 2026) (Issue: #1573)
- Integration tests for hot-reload and sandbox scenarios (Target: Q2 2026) (Issue: #1574)
- Performance benchmarks for module load and hot-reload cycles (Target: Q2 2026) (Issue: #1575)
- Automatic plugin restart after health-check failure (Issue: #2373) — implemented via
ModuleLoaderwatchdog:startWatchdog(),stopWatchdog(),configureWatchdog(WatchdogConfig),getWatchdogStats(),getAllWatchdogStats(),resetWatchdogStats()
- Concrete WasmRuntime integration (Wasmtime or WasmEdge) (Target: Q3 2026) —
ModuleSandbox::Config::enable_wasm_isolationandWasmRuntimeInjectorinjection path are ready (v1.8.0); register a concrete backend viaTHEMIS_REGISTER_WASM_RUNTIMEmacro - TLS public-key pinning for remote plugin registry — implemented via
RegistryConfig::pinned_public_key+CURLOPT_PINNEDPUBLICKEY; Ed25519 application-layer key pinning is handled separately bySignedPluginRepositoryin the plugins module
- Secure DLL/SO/DYLIB loading across Windows, Linux, macOS (
base/module_loader.cpp) - Digital signature verification for loaded modules
- File integrity hash validation
- Trust levels: TRUSTED, VERIFIED, UNTRUSTED
- Revocation checking for certificates
- Development mode to allow unsigned modules
- Plugin lifecycle management: initialize, execute, shutdown (
base/module_loader.cpp) - Interface discovery to query plugin capabilities
- Automatic resource cleanup on unload
- Cross-platform export/import macros and version compatibility checking
- Hot-reload support for plugins without database restart (
base/hot_reload_manager.cpp) (Issue: #1554, PR: #2396) - Per-plugin audit trail: load, unload, errors (
base/module_loader.cpp) (Issue: #1564) - Plugin dependency graph visualization (
base/plugin_dependency_graph.cpp) (Issue: #1563) - Remote plugin loading from authenticated registry (
base/remote_registry_client.cpp) - A/B testing framework via module swapping (
base/ab_test_manager.cpp) (Issue: #1565) - Plugin dependency resolution and ordered loading (Issue: #1566) —
ModuleDependencyResolverinmodule_loader.cpp
- Plugin marketplace manifest format (JSON schema) — Evidence:
setHashManifest()inmodule_loader.cpp - Runtime plugin capability negotiation (version ranges) —
ModuleDependencyResolver::isVersionCompatible()+topologicalSort()enforce version constraints during load-order resolution; higher-level runtime negotiation viaPluginCapabilityNegotiatorinpluginsmodule (Issue: #1984) - Plugin sandboxing with resource limits (memory, CPU) — Evidence:
module_sandbox.cpp - Plugin health monitoring and automatic restart — Watchdog background thread (
startWatchdog/stopWatchdog) with configurable exponential backoff,WatchdogConfig/WatchdogModuleStats,PluginWatchdogFocusedTests(Issue: #2373) - Signed plugin repository with key pinning — TLS SPKI pinning via
RegistryConfig::pinned_public_key+CURLOPT_PINNEDPUBLICKEY; Ed25519 application-layer key pinning inSignedPluginRepository(plugins/signed_plugin_repository.h) - [~] WASM-based plugin isolation for untrusted code — Partial: infrastructure complete; WASM runtime injection into
ModuleSandboximplemented (v1.8.0, Issue: #1572); concrete backend (Wasmtime/WasmEdge) registration still required for production execution
- Unit tests coverage > 80% (Issue: #1573) —
test_base_entity.cpp(383 LOC),test_base_interfaces.cpp(678 LOC); focused standalone targets:BaseEntityFocusedTests,BaseInterfacesFocusedTests - [I] Integration tests (Issue: #1574)
- [I] Performance benchmarks (Issue: #1575)
- Security audit (signature verification, revocation checking)
- Documentation complete — validated 2026-03-09
- API stability guaranteed for module loading interface
- WASM plugin isolation (
WasmPluginSandbox) requires injection of a concrete WASM runtime (Wasmtime, WasmEdge, etc.) for full execution support (Issue: #1572) - Automatic plugin restart after health-check failure is implemented via
ModuleLoaderwatchdog thread (Issue: #2373) - Unit test coverage, integration tests, and performance benchmarks are still open (Issues: #1573, #1574, #1575)
- WASM plugin interface will be a new API surface (additive, non-breaking to existing plugin interface)