Security Policies
Security policies let you define natural language rules that automatically validate tool execution in real-time. This enterprise-critical feature ensures AI assistants follow your organization’s security and compliance requirements.What Are Security Policies?
Security policies are rules written in plain English that Backstack enforces before allowing tools to execute: Example Policies:- “Never delete files from the production database”
- “Only allow read operations on customer data”
- “Require approval for commands that modify more than 100 records”
- “Block access to sensitive environment variables”
- “Prevent file uploads to external services”
Security policies provide an additional layer of protection beyond tool-level permissions. They work alongside your existing security controls, not as a replacement.
Why Security Policies Matter
Compliance:- Enforce regulatory requirements (HIPAA, SOC 2, GDPR)
- Meet industry standards
- Satisfy audit requirements
- Demonstrate security controls
- Prevent accidental data deletion
- Block unauthorized access attempts
- Limit scope of AI actions
- Protect sensitive resources
- Centralized security rules
- Consistent enforcement across teams
- Clear security boundaries
- Audit trail of policy decisions
Creating Security Policies
Policy Creation Workflow
- Navigate to Organization → Security → Policies
- Click Create Policy
- Enter policy details:
- Name - Descriptive title (e.g., “Production Database Protection”)
- Description - What this policy protects and why
- Policy Rules - Plain English rules (see examples below)
- Configure settings:
- Strict Mode - How to handle policy evaluation failures
- Workspaces - Where to apply this policy
- Click Create
Writing Effective Policies
Good Policy Examples:- Be specific about what you’re protecting
- Use clear, unambiguous language
- Include examples when helpful
- Test policies in a non-production workspace first
- Start with broad protections, refine over time
Policy Document Import
Import existing security documentation as policies:- Click Import from Document
- Upload a file:
- PDF - Security policy documents
- Word (
.docx) - Compliance requirements - Markdown (
.md) - Security guidelines - Text (
.txt) - Simple policy lists
- Backstack extracts rules from the document
- Review and refine extracted policies
- Save as a new policy
Policy Assignment
Global vs Workspace-Specific
Global Policies:- Apply to ALL workspaces in the organization
- Cannot be disabled at workspace level
- Used for organization-wide security requirements
- Examples: PII protection, regulatory compliance, data deletion prevention
- Apply only to selected workspaces
- Can be assigned to one or multiple workspaces
- Used for project-specific or team-specific rules
- Examples: Development environment restrictions, project-specific access controls
Assigning Policies to Workspaces
To apply a policy to specific workspaces:- Open the policy settings
- Go to Workspace Assignment
- Select workspaces from the list
- Click Save
- Open the policy settings
- Check Apply Globally
- Click Save
Policy Enforcement
How Policies Work
When an AI assistant attempts to execute a tool:- Request Initiated - User asks AI to perform an action
- Policy Check - Backstack evaluates all applicable policies
- Validation - Policies approve or reject the request
- Execution - If approved, tool executes; if rejected, user is notified
Strict Mode vs Fail-Open
Strict Mode (Recommended):- If policy evaluation fails (timeout, error), block the request
- Prioritizes security over availability
- Use for production environments
- Ensures no tools execute without policy validation
- If policy evaluation fails, allow the request
- Prioritizes availability over security
- Use for development/testing environments
- Risk: Tools may execute without validation if policy service is unavailable
Strict Mode is recommended for all production workspaces. Fail-open should only be used in development environments where availability is more critical than security.
Policy Violations
When a policy blocks a tool execution:- User Notification - Clear message explaining what was blocked and why
- Activity Log Entry - Violation recorded for audit
- Admin Alert - Optional notifications for critical violations
- Tool Cancellation - Tool execution is prevented
Managing Policies
Viewing Active Policies
Access your organization’s policies:- Navigate to Organization → Security → Policies
- View all policies with:
- Policy name and description
- Number of rules
- Applied workspaces (or “Global”)
- Strict mode status
- Last modified date
Editing Policies
To modify an existing policy:- Find the policy in the list
- Click Edit
- Update policy rules, settings, or assignments
- Click Save
Disabling Policies
To temporarily disable a policy without deleting it:- Open the policy
- Toggle Enabled to Off
- Click Save
Deleting Policies
To permanently remove a policy:- Find the policy
- Click Delete
- Confirm deletion
Viewing Policy Activity
Activity Logs
All policy decisions are logged:- Navigate to Organization → Activity Logs
- Filter by Event Type: “Policy Violation”
- View:
- When the violation occurred
- Which policy was violated
- What tool was blocked
- Which user triggered it
- The specific rule that was violated
Policy Effectiveness
Monitor how policies are protecting your organization:- Violation count - How many requests were blocked
- Most violated policies - Which rules trigger most often
- User patterns - Which teams need policy education
- False positives - Rules that may be too strict
Best Practices
Policy Design
Start Broad, Refine Over Time:- Begin with high-level protections (prevent data deletion, block external access)
- Monitor violations and adjust rules
- Add specific rules based on real usage patterns
- Avoid overly restrictive policies that block legitimate work
- Global: Critical organization-wide security
- Workspace: Team or project-specific rules
- Role-based: Different rules for different user roles
- Create new policies in a test workspace
- Verify they work as expected
- Check for false positives
- Roll out to production workspaces after validation
Policy Writing
Be Specific:- ❌ “Don’t delete things” (too vague)
- ✅ “Never delete tables in the production schema”
- Include concrete examples of blocked actions
- Reference specific tools, file paths, or resources
- Clarify edge cases in policy description
- Different rules for development vs production
- Time-based restrictions (e.g., no deployments during business hours)
- User role considerations
Compliance
Regulatory Requirements:- Map compliance requirements to specific policies
- Document which policies satisfy which regulations
- Include policy IDs in compliance documentation
- Review policies during audits
- Quarterly policy effectiveness review
- Annual compliance alignment check
- Update policies when regulations change
- Remove obsolete policies
Common Use Cases
Data Protection (GDPR, CCPA)
Healthcare Compliance (HIPAA)
Financial Services (SOC 2, PCI-DSS)
Development Guardrails
Troubleshooting
Policy Blocking Legitimate Actions
Problem: Policy blocks a tool that should be allowed Solutions:- Review the policy rule that was violated
- Check if the rule is too broad
- Add an exception for specific cases
- Refine policy language to be more precise
- Consider creating a workspace-specific policy for special cases
Policy Not Triggering
Problem: Tool executes when it should have been blocked Solutions:- Verify policy is enabled
- Check policy is assigned to the correct workspace
- Review policy rules for accuracy
- Ensure strict mode is enabled
- Check activity logs for policy evaluation results
Too Many False Positives
Problem: Policies block too many legitimate requests Solutions:- Review violation logs to find patterns
- Refine overly strict rules
- Add exceptions for common legitimate cases
- Consider workspace-specific policies instead of global
- Educate users on policy boundaries
Policy Evaluation Timeouts
Problem: Policies take too long to evaluate Solutions:- Simplify complex policy rules
- Reduce number of rules per policy
- Split large policies into smaller, focused policies
- Contact support if timeouts persist
Security Considerations
Policy as Code
- Treat policies like code - version control recommended
- Document why each policy exists
- Review policy changes like code reviews
- Test policy changes before production deployment
Defense in Depth
Policies are one layer in your security strategy:- Tool permissions - Control what tools can do
- Security policies - Validate how tools are used
- Workspace isolation - Separate environments
- Activity logs - Monitor and audit
- Client restrictions - Control which AI clients can connect
Privacy
- Policy evaluation logic is not exposed to users
- Violation messages explain what was blocked, not how
- Policy rules themselves are visible to admins only
- Activity logs show who violated policies but not full request details

