Overview
Access policies are the heart of Raily’s content protection. They define who can access your content, under what conditions, and with what limitations. This guide covers everything from simple allow/deny rules to complex conditional policies.Policy Basics
Every policy consists of:- Rules: Conditions and actions that determine access
- Priority: Order in which rules are evaluated
- Default Action: What happens when no rules match
Rule Actions
- Allow
- Deny
- Review
Grants access to the content. You can specify permissions and rate limits.
Conditions
Conditions determine when a rule applies. Multiple conditions are combined with AND logic.Identity Conditions
Control access based on who’s requesting:License Conditions
Control access based on licensing:Usage Conditions
Control based on how content will be used:Time-Based Conditions
Control when access is available:Content Conditions
Apply rules to specific content:Permissions
Permissions define what actions are allowed when access is granted:| Permission | Description |
|---|---|
full_access | Complete content access with no restrictions |
preview_only | Limited preview (configurable length) |
metadata_only | Access to metadata but not content body |
commercial_use | Can use in commercial applications |
training | Can use for AI model training |
fine_tuning | Can use for model fine-tuning |
inference | Can use for AI inference/RAG |
redistribution | Can redistribute to third parties |
Rate Limiting
Protect your content from excessive usage:Rate Limit Examples
Per-Requester Hourly Limit
Per-Requester Hourly Limit
Each requester gets 1000 requests per hour:
Global Daily Cap
Global Daily Cap
Total of 10,000 requests per day across all requesters:
Per-Content Monthly Limit
Per-Content Monthly Limit
Each piece of content can be accessed 5,000 times per month:
Policy Templates
Start with these pre-built templates for common scenarios:Open Access (Free Content)
Licensed Access Only
Tiered Access
Training Restrictions
Time-Limited Access
Applying Policies
To Individual Content
To Multiple Content Items
Default Policy
Set a default policy for content without explicit policy assignment:Testing Policies
Before deploying, test your policies with simulated requests:Test Multiple Scenarios
Policy Versioning
Raily automatically versions your policies. You can view history and rollback if needed:Best Practices
Start Restrictive
Begin with deny-by-default and explicitly allow access. It’s easier to loosen restrictions than tighten them.
Test Before Deploy
Always test policies with representative scenarios before applying to production content.
Use Priorities
Set clear priority order. More specific rules should have lower priority numbers (higher precedence).
Monitor & Iterate
Review analytics regularly and adjust policies based on actual usage patterns.