Security¶
Lango provides multiple layers of security to protect sensitive data flowing between users, agents, and AI providers.
Security Layers¶
| Layer | Purpose | Details |
|---|---|---|
| Master Key Envelope | Hierarchical key management | MK/KEK architecture, recovery mnemonic, passphrase rotation without re-encryption |
| Encryption & Secrets | Protect data at rest and in transit | AES-256-GCM encryption, key registry, secret management |
| PII Redaction | Strip personal information before it reaches AI providers | Regex patterns + optional NER via Microsoft Presidio |
| Exportability Policy | Decide what early knowledge artifacts can be traded | Source-primary evaluation for knowledge exchange v1 |
| Approval Flow | Decide when early artifact releases can move forward | Structured artifact release states and audit-backed receipts |
| Upfront Payment Approval | Decide whether a transaction may start with an upfront payment | Structured prepayment decisioning and canonical transaction receipt state |
| Escrow Execution | Execute approved escrow recommendations into canonical receipt-backed escrow state | Receipt-backed create + fund execution for escrow-recommended transactions |
| Actual Payment Execution Gating | Enforce direct payment execution against canonical receipt state | Receipt-backed allow/deny gate for payment_send and p2p_pay |
| Dispute-Ready Receipts | Preserve receipt evidence for early knowledge exchange | Lite submission/transaction receipt model with a current create_dispute_ready_receipt entrypoint |
| Tool Approval | Control which tools agents can execute | Policy-based approval workflows with channel notifications |
| Authentication | Secure gateway access | OIDC login flow, session management, CORS controls |
| Hardware Keyring | Secure passphrase storage | Hardware-backed passphrase via Touch ID (macOS Secure Enclave) or TPM 2.0 (Linux) |
| Payload Protection | Protect sensitive data at rest | Broker-managed AES-256-GCM payload encryption with redacted search projections |
| Cloud KMS / HSM | Hardware-backed cryptography | AWS KMS, GCP KMS, Azure Key Vault, PKCS#11 HSM integration |
| P2P Session Management | Peer session lifecycle | Session listing, explicit invalidation, security-event-based revocation |
| P2P Tool Sandbox | Execution isolation | Subprocess and container-based isolation for remote tool invocations |
| P2P Auth Hardening | Signed challenge protocol | ECDSA signed challenges, nonce replay protection, timestamp validation |
Architecture¶
graph LR
User -->|input| Interceptor
Interceptor -->|PII redacted| Agent
Agent -->|tool call| Approval[Tool Approval]
Approval -->|approved| Tool
Tool -->|secret ref| RefStore[Secret RefStore]
RefStore -->|resolved| Execution
Agent -->|output| Scanner[Output Scanner]
Scanner -->|secrets masked| User
The security interceptor sits between the user and the AI agent. It:
- Redacts PII from user input before forwarding to the AI provider
- Gates tool execution behind an approval workflow for sensitive operations
- Scans agent output to replace any leaked secret values with
[SECRET:name]placeholders
Enable the Interceptor
The security interceptor is disabled by default. Enable it in your configuration:
Settings:
lango settings→ Security
{
"security": {
"interceptor": {
"enabled": true,
"redactPii": true,
"approvalPolicy": "dangerous"
}
}
}
Encryption Modes¶
Lango supports three encryption modes depending on your deployment:
- Local Mode (default) -- AES-256-GCM with a Master Key envelope. The passphrase wraps a random Master Key; data keys are derived from the MK. Supports recovery mnemonic and O(1) passphrase rotation.
- RPC Mode (production) -- Delegates cryptographic operations to a hardware-backed companion app or external signer. Keys never leave secure hardware.
- Cloud KMS Mode (enterprise) -- Delegates to managed key services (AWS KMS, GCP KMS, Azure Key Vault) or on-premises HSM via PKCS#11. Automatic fallback to local mode when KMS is unavailable.
See Encryption & Secrets for full details.
Quick Links¶
- Master Key Envelope -- MK/KEK hierarchy, migration from legacy, backup & recovery
- Encryption & Secrets -- Key derivation, secret storage, output scanning, companion app
- PII Redaction -- Builtin patterns, custom regex, Presidio integration
- Exportability Policy -- Source-primary exportability evaluation for early knowledge exchange
- Approval Flow -- Structured artifact release decisions and audit-backed receipts
- Approval CLI -- Approval-system behavior and operational entrypoints
- Upfront Payment Approval -- Structured prepayment decisioning and transaction-level payment approval state
- Escrow Execution -- Receipt-backed
create + fundexecution for approved escrow recommendations - Actual Payment Execution Gating -- Receipt-backed direct payment allow/deny enforcement for
payment_sendandp2p_pay - Dispute-Ready Receipts -- Lite receipt evidence model and current operator entrypoint
- Tool Approval -- Approval policies, sensitive/exempt tools, notifications
- Authentication -- OIDC providers, session management, CORS configuration
- Hardware Keyring -- Secure passphrase storage via Touch ID / TPM
- Payload Protection -- Broker-managed payload encryption and legacy DB compatibility notes
- Cloud KMS / HSM -- AWS, GCP, Azure, PKCS#11 integration