feat(security): Cloudflare-aware IP trust and admin-tunable anti-DDoS
- resolveClientIp: trust cf-connecting-ip only behind cf-ray/cdn-loop, use nginx x-real-ip otherwise (anti-spoof) - antiddos-config: Redis-backed live config (antiddos:config) with 30s cache, 13 ANTI_DDOS_* env vars - ddos-guard: consume tunable rates/tiers via getAntiddosConfig - admin panel at /admin/devops/antiddos (save/reset/unban actions, PERMS.SETTINGS_VIEW) - register new admin page in housekeeping migration matrix (146 -> 147)
This commit is contained in:
@@ -272,6 +272,36 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
localization: "PARTIAL",
|
||||
accessibility: "PARTIAL",
|
||||
}),
|
||||
plannedSystemEntry({
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/devops/antiddos",
|
||||
sourceFile: "src/app/admin/devops/antiddos/page.tsx",
|
||||
targetPath: "/admin/system/configuration/antiddos",
|
||||
decision: "REHOST",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
mutate: [PERMS.SETTINGS_EDIT],
|
||||
},
|
||||
dependencies: {
|
||||
queries: [
|
||||
"antiddos:config override",
|
||||
"WebsiteSetting antiddos_*",
|
||||
"blocked anti-DDoS IPs",
|
||||
"GET /api/health",
|
||||
],
|
||||
mutations: [
|
||||
"saveAntiddosSettings",
|
||||
"resetAntiddosSettings",
|
||||
"unbanAntiddosIp",
|
||||
],
|
||||
},
|
||||
auditRequirement: "MUTATION",
|
||||
localization: "PARTIAL",
|
||||
accessibility: "PARTIAL",
|
||||
notes: [
|
||||
"Tunable anti-DDoS rates and block tiers; Cloudflare detection is read-only and driven by cf-ray/cdn-loop presence",
|
||||
],
|
||||
}),
|
||||
plannedSystemEntry({
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/emulator",
|
||||
|
||||
Reference in New Issue
Block a user