Service Policies
Why Service Policies?
┌─────────────────────────────────────────────────────────────────────────────┐
│ SERVICE-TO-SERVICE ARCHITECTURE │
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ CLI-Eval │ │ Auto-Rater │ │ LLM │
│ Service │ │ Service │ │ Service │
└──────┬──────┘ └──────▲──────┘ └──────▲──────┘
│ │ │
│ ❌ Direct call │ │
│ NOT ALLOWED │ │
│ │ │
│ ✅ Via Auth Guard │ │
│ │ │
▼ │ │
┌──────────────────────────────┴───────────────────────┴────────────────────┐
│ AUTH GUARD │
│ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ POLICY ENGINE │ │
│ │ │ │
│ │ 1. Receive request with X-Atlas-API-Key │ │
│ │ 2. Validate API key, extract service account │ │
│ │ 3. Lookup policy: cli-eval → auto-rater │ │
│ │ 4. Check endpoint is in allowed_endpoints │ │
│ │ 5. Apply rate limiting │ │
│ │ 6. ✅ Proxy request OR ❌ Deny with 403 │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────────────────┘Policy Structure
Policy Fields
Field
Description
Example
Example Policy
How S2S Authentication Works
Step 1: Service Gets API Key
Step 2: Service Makes Request
Step 3: Auth Guard Validates
Endpoint Patterns
Exact Match
Request
Match?
Wildcard Match
Request
Match?
Prefix Match
Request
Match?
Common Policy Patterns
Full Access
Read-Only Access
Specific Operations
Batch Operations
Admin Dashboard
Policy List View
Column
Description
Policy Actions
Action
Description
Setting Up S2S Communication
Step-by-Step Guide
Best Practices
Policy Design
Practice
Reason
Security
Practice
Reason
Operations
Practice
Reason
Troubleshooting
"403 Forbidden: No policy found"
"403 Forbidden: Endpoint not allowed"
"403 Forbidden: Policy disabled"
"429 Too Many Requests"
"Policy changes not taking effect"
Last updated