palisade-config
Security-focused configuration and policy crate for deception/honeypot systems.
What this crate provides
- Typed
ConfigandPolicyConfigmodels with validation - Cryptographic tag derivation via
RootTag(SHA3-512) - Runtime no-allocation representations (
RuntimeConfig,RuntimePolicy) - Centralized timing-floor profiles (
TimingProfile::Balanced/Hardened) - Security-oriented error model via
palisade-errors
Version
Current crate version: 1.0.1
Installation
[]
= "1.0.1"
Quick start
1) Load and validate config/policy
use ;
async
2) Convert to runtime no-alloc mode
use Config;
3) Set centralized timing profile
use ;
Architecture
Config vs policy
Config: infrastructure/runtime mechanics (paths, logging, telemetry, root tag)PolicyConfig: detection/response logic (thresholds, rules, suspicious patterns)
Runtime no-alloc layer
to_runtime() converts deserialized models into fixed-capacity runtime types backed by heapless:
RuntimeConfigRuntimePolicy
This is the intended execution layer for strict no-allocation runtime behavior.
Timing model
The crate uses centralized operation timing floors in src/timing.rs.
Profiles:
Balanced(default): lower latency, moderate smoothingHardened: higher floors, stronger timing smoothing
Applied across:
- tag creation/derivation/comparison
- config load/validate/diff
- policy load/validate/diff and suspicious-process checks
- runtime build and runtime policy checks
Security notes
- Sensitive data types use zeroization (
ZeroizeOnDrop). RootTaguses fixed-size secret storage ([u8; 32]).- Runtime cryptographic APIs support no-allocation usage (
*_bytes,*_hex_into). - Constant-time compare is used for root tag hash equality.
Important behavior changes
Config::from_fileandPolicyConfig::from_fileare async.RootTag::new(...)expects exactly 64 hex chars (32 bytes).RootTagserialization currently outputs the root secret as hex for round-trip support. Treat serialized config files as sensitive secrets.
Examples
See examples/:
basic_config.rsruntime_no_alloc.rstiming_profile.rs
Run with:
Benchmark analysis utility
Script:
scripts/analyze_bench_results.py
Usage docs:
scripts/ANALYZE_BENCH_RESULTS_USAGE.md
License
Apache-2.0