Recommended attesta.yaml
Start with this production-ready configuration and adjust to your needs:attesta.yaml
Use
Attesta.from_config("attesta.yaml") to load this configuration. The rich format (with policy:, risk:, trust: sections) automatically initializes the trust engine, domain scorer, audit logger, and terminal renderer.Fail Modes
Thefail_mode setting controls behavior when the approval system is unavailable (renderer crash, timeout, network failure):
Audit Log Persistence
Attesta supports two audit backends:- Legacy backend (default) — Built-in SHA-256 hash-chained JSONL logger
- TrailProof backend — Enhanced features including HMAC signing and multi-tenancy
Option 1: Local JSONL with Rotation
The simplest approach — write to a local file and rotate withlogrotate or a similar tool.
attesta.yaml
logrotate config
When using
copytruncate, the hash chain resumes correctly because the audit logger reads the last entry’s hash on startup. However, the chain integrity check (verify_chain() or verify()) should be run on each rotated file individually.Option 2: PostgreSQL Audit Logger
For queryable, durable audit storage, implement a database-backed logger:Option 3: Cloud Storage (S3 / GCS)
For compliance-heavy environments, write audit logs to immutable cloud storage:Trust Engine Tuning
The trust engine adjusts effective risk scores based on agent history. Getting the parameters right is critical for balancing security with usability.Parameter Reference
Tuning Strategies
- Conservative
- Balanced
- Permissive
For high-security environments (finance, healthcare):Agents start with very low trust, the ceiling is restrictive, trust decays faster, and the maximum risk discount is small.
Monitoring Trust
Use the CLI to inspect trust scores:Performance Considerations
Scorer Performance
TheDefaultRiskScorer is fast (sub-millisecond) and suitable for high-throughput environments. Custom scorers that involve I/O (database lookups, ML model inference) add latency.
Audit Logger Performance
The JSONL file logger is append-only and fast. For high-volume environments:Renderer Latency
The renderer is the primary source of latency since it waits for human input. For non-blocking architectures:- Use
Attesta.evaluate()with an async renderer that returns immediately with a pending status - Process the approval asynchronously and execute the action when approved
- Set
timeout_secondsto prevent indefinite blocking
Monitoring and Alerting
Key Metrics to Track
Rubber Stamp Detection
The built-in audit logger provides a method to find suspiciously fast approvals:Audit Chain Verification
Run chain verification as a scheduled check:Prometheus Metrics Example
Deployment Checklist
1
Configure attesta.yaml
Set
fail_mode: deny, configure minimum review times, and set up risk overrides for your most dangerous actions.2
Set Up Persistent Audit Logging
Choose a durable storage backend (PostgreSQL, S3, or JSONL with rotation) and configure the audit logger.
3
Configure the Renderer
Specify an explicit renderer. Do not rely on auto-detection in production containers.
4
Tune the Trust Engine
Start with the balanced preset and adjust based on your organization’s risk tolerance.
5
Set Up Monitoring
Track approval rates, rubber stamp frequency, review times, and audit chain integrity.
6
Run Integration Tests
Verify the full pipeline with your production configuration using mock renderers (see the Testing Guide).
7
Schedule Audit Verification
Run
verify_chain() daily and alert on any broken links.attesta.yaml Reference
Full configuration file reference
Testing Guide
Testing patterns for gated functions
TrailProof Integration
Enhanced audit backend with HMAC signing
Audit Trail Concepts
Understand tamper-proof audit logging