-
Notifications
You must be signed in to change notification settings - Fork 1
Fastly Migration
Guide for migrating firewall rules from Vercel Firewall to Fastly Next-Gen WAF using Doorman.
⚠️ Not yet available:doorman migratedoes not exist in the current CLI. It's a spec'd, unbuilt roadmap item ("Phase 6" in RELEASE-2.0.md). Running anydoorman migrate ...command shown below will fail withunknown command: migrate.This page documents the planned automated migration workflow so you know what's coming. For migrating today, see Manual Migration (Available Now) below — you'll use
doorman download, hand-edit the config using the Configuration reference and the compatibility matrix below, thendoorman validate/doorman sync --provider fastly.
- Complete the Fastly Setup guide first
- Back up your current Vercel configuration
- Review the compatibility matrix below — some features don't translate 1:1
Important: Always test in a staging workspace before applying to production.
| Feature | Vercel | Fastly | Translation |
|---|---|---|---|
| Path/method/host matching | ✅ | ✅ | Direct |
| Header/query/cookie matching | ✅ | ✅ | Modified — becomes a multival condition requiring a key (the name), not a plain single condition |
| IP blocking | ✅ | ✅ | Modified — becomes two workspace lists (doorman-managed-deny/doorman-managed-allow), replaced wholesale rather than per-IP rules. hostname/notes are dropped |
| User agent matching | ✅ | ✅ | Direct |
| Country-level geo-blocking | ✅ | ✅ | Direct |
| City/region/continent geo-blocking | ✅ | ❌ | Removed — Fastly only exposes country-level geo matching |
| Rate limiting | ✅ | ✅ | Modified — distinct rule type with its own config, and requires a pre-existing custom signal Doorman doesn't create automatically |
| Redirects | ✅ | ✅ | Direct |
| Challenge actions | ✅ Basic | ✅ | Maps to browser_challenge
|
| Regex matching | ✅ | ✅ | Direct, but Fastly's regex syntax may differ slightly — review after migrating |
| Rule evaluation order | Best-effort (insertion order) | ❌ | Removed — Next-Gen WAF rules are evaluated independently, priority has no effect |
| Environment conditions | ✅ | ❌ | Removed (Vercel-specific) |
| JA3/JA4 fingerprints | ✅ | Fastly exposes a JA3 condition field, but Doorman's translator doesn't map it yet | |
| Strict greater-than / less-than | ✅ | Fastly only has >=/<= — the boundary value also matches |
Until doorman migrate ships, migrate by hand using commands that exist today:
doorman backup
doorman download --provider vercel --config vercel-current.jsonOpen vercel-current.json and, using the Configuration reference and the compatibility matrix above, write out the equivalent rules in a new file (e.g. fastly.config.json) with "provider": "fastly" and Fastly-shaped conditions/actions. This is the step the planned migrate command will eventually automate.
doorman validate --config fastly.config.json
doorman sync --config fastly.config.json --provider fastly --dry-rundoorman sync --config fastly.config.json --provider fastlyVerify in the Fastly Next-Gen WAF control panel's Rules view, first against a staging workspace/token if you have one, then repeat against production once you're confident.
The rest of this page describes the automated doorman migrate workflow once it ships (see the roadmap warning at the top of this page).
doorman backup
doorman export --format json --output vercel-backup.jsondoorman migrate --from vercel --to fastly --dry-runThis shows which rules will migrate perfectly, which will be modified, and which can't migrate. No changes are made.
doorman migrate --from vercel --to fastly --output fastly.config.jsonThe generated file includes:
- Translated rules with Fastly provider settings
- Migration metadata (source, date, warnings)
- Notes on any rules that were modified or dropped
Open fastly.config.json and review the translated rules, then:
doorman validate --config fastly.config.json
doorman status --config fastly.config.jsondoorman sync --config fastly.config.json --provider fastlyVerify in the Fastly Next-Gen WAF control panel's Rules view.
doorman sync --config fastly.config.json --provider fastly
doorman status --config fastly.config.json- Check the workspace's request/event views in the Fastly control panel
- Watch for false positives in the first few days
- Adjust rules based on real traffic patterns
Vercel/unified conditions on header, query, or cookie need a key (the specific name to match) to translate to Fastly — a condition missing one is dropped with a warning rather than mistranslated:
// Works — has a key
{ "type": "header", "op": "eq", "value": "internal", "key": "X-Access-Level" }
// Dropped during translation — no key to match on
{ "type": "header", "op": "eq", "value": "internal" }Rate-limit rules translate automatically, but Fastly requires a custom signal to already exist in the workspace to count against. Create one named doorman-rate-limit-<rule-id> before syncing, or the rule will be rejected.
Fastly has no equivalent to Vercel's geo_city/geo_continent/geo_country_region conditions — only geo_country. Rules using the finer-grained conditions need to be redesigned around country-level matching, or replicated using a different signal (e.g. an IP list).
Fastly doesn't have an equivalent to Vercel's environment condition. Options:
- Use separate config files per environment
- Use workspace-based separation (different Fastly workspaces for staging vs production)
doorman backup --list
doorman backup --restore backup-file.json
doorman sync --provider vercelNot automated yet either (same doorman migrate roadmap item). Use the same manual approach as the forward migration: doorman download --provider fastly --config fastly-current.json, hand-translate to a Vercel-shaped config, then doorman validate/doorman sync --provider vercel.
Note: Fastly → Vercel translation has some limitations, especially around rules Fastly's translator only partially maps (e.g. rate limiting, multival conditions). Review the output carefully.
For large rule sets, consider migrating in phases:
- Critical security rules (bot blocking, IP blocking)
- Rate limiting rules (after the required signals exist)
- Remaining rules
- Optimize for Fastly-specific features
- All critical rules active in the Fastly workspace
- IP blocking working correctly (check the
doorman-managed-deny/doorman-managed-allowlists) - Rate limiting functioning as expected, with signals created
- No false positives in legitimate traffic
- Fastly's request/event views showing expected rule triggers
- Team trained on Fastly-specific workflows
- CI/CD pipelines updated for the Fastly provider
- Backup procedures updated
- Fastly Setup — Credentials, environment, and initial configuration
- Configuration — Configuration file reference
- Commands Overview — Full CLI reference
Getting Started
Configuration
Commands
Guides