What are Policies?
Policies are collections of Guardrails with specific configurations that define what should be protected and how. Instead of configuring individual guardrails for each application, you create policies that bundle related protections together and apply them consistently across projects. A policy specifies:- Which Guardrails to activate
- How strictly to enforce them (BLOCK or WARN)
- Custom detection thresholds and patterns
- Placeholder text for redactions
- Scope and applicability rules
Why Use Policies?
Consistency
Apply the same security rules across multiple projects without duplicating configuration. When you update a policy, all projects using it inherit the changes.Flexibility
Create different policies for different scenarios:- Strict enforcement for production customer-facing APIs
- Moderate protection for internal tools
- Permissive settings for development environments
Compliance
Build policies that meet specific regulatory requirements (HIPAA, PCI, GDPR) and apply them to relevant projects automatically.Maintainability
Manage security rules in one place instead of updating each project individually. Easier to audit, test, and improve over time.Policy Structure
A policy contains: Guardrail Configurations: Which protections to enableCommon Policy Types
Production Policy
Strict protection for customer-facing applications:- All guardrails enabled
- BLOCK enforcement for critical threats
- High sensitivity detection
- Comprehensive logging
- Real-time alerting
Internal Tools Policy
Moderate protection for employee-facing applications:- Core guardrails enabled
- WARN enforcement for most violations
- Medium sensitivity detection
- Standard logging
- Periodic review
Development Policy
Permissive settings for testing and development:- Basic guardrails enabled
- WARN enforcement with logging
- Low sensitivity detection
- Detailed logging for debugging
- No alerting
Compliance Policies
Industry-specific protection: HIPAA Policy:- PHI detection and redaction
- Medical content moderation
- Strict audit logging
- BLOCK enforcement
- Payment card data detection
- Financial information protection
- Transaction logging
- BLOCK enforcement
- EU personal data protection
- Right to deletion support
- Consent tracking
- Data minimization
Policy Inheritance
Policies can inherit from base policies:Real-World Example
A healthcare company creates three policies: Patient Portal Policy (Production):Policy Assignment
Policies are assigned to projects:Best Practices
- Start with templates: Use pre-built compliance policies as starting points
- Test before deploying: Validate policies in staging before production
- Monitor false positives: Track blocked legitimate requests
- Version policies: Keep history of policy changes
- Document decisions: Explain why specific rules are configured
- Regular reviews: Audit policy effectiveness quarterly
- Gradual enforcement: Start with WARN in development, move to BLOCK in production after tuning