What You’ll Learn
- How to configure every security layer in the Declaw SDK in a single
SecurityPolicy - How transformation rules mask internal hostnames and API key patterns in transit
- How to inspect the configured security policy programmatically
- The defense-in-depth model: six independent layers that work together
Prerequisites
- Declaw running locally or in the cloud (see Deployment)
DECLAW_API_KEYandDECLAW_DOMAINset in your environment
This example is available in Python. TypeScript support coming soon.
Security Layers Configured
Code Walkthrough
1. Define transformation rules
Transformation rules apply regex replacements to HTTP request and response bodies passing through the proxy:2. Build the full SecurityPolicy
domains list names the egress hosts whose request bodies are scanned (here, the only allowed egress host). An empty or unset domains list means no scanning, even with enabled=True.