From 25377b4021837c91ab16d5108957d51c71b18f80 Mon Sep 17 00:00:00 2001 From: Renn F Date: Thu, 15 Oct 2026 15:38:43 +0200 Subject: [PATCH 1/2] fix(ip): let a configured whitelist decide alone in route checks and isIpAllowed --- packages/core/src/core/checks/helpers.ts | 8 +- packages/core/src/utils.ts | 10 +- .../test-utils/ip-list-precedence-cases.json | 1334 +++++++++++++++++ .../test-utils/ip-list-precedence.test.ts | 62 + 4 files changed, 1407 insertions(+), 7 deletions(-) create mode 100644 packages/core/tests/test-utils/ip-list-precedence-cases.json create mode 100644 packages/core/tests/test-utils/ip-list-precedence.test.ts diff --git a/packages/core/src/core/checks/helpers.ts b/packages/core/src/core/checks/helpers.ts index d2a1f9f..6ce0b33 100644 --- a/packages/core/src/core/checks/helpers.ts +++ b/packages/core/src/core/checks/helpers.ts @@ -59,13 +59,13 @@ export async function checkRouteIpAccess( middleware: GuardMiddlewareProtocol, ): Promise { try { - if (routeConfig.ipBlacklist && routeConfig.ipBlacklist.length > 0) { - if (isIpInBlacklist(clientIp, routeConfig.ipBlacklist)) return false; - } - + /* Reference check_route_ip_access: a configured route whitelist alone + decides; the route blacklist is consulted only when it is absent. */ if (routeConfig.ipWhitelist && routeConfig.ipWhitelist.length > 0) { const whitelistResult = isIpInWhitelist(clientIp, routeConfig.ipWhitelist); if (whitelistResult !== null) return whitelistResult; + } else if (routeConfig.ipBlacklist && routeConfig.ipBlacklist.length > 0) { + if (isIpInBlacklist(clientIp, routeConfig.ipBlacklist)) return false; } const countryResult = checkCountryAccess(clientIp, routeConfig, middleware.geoIpHandler); diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index c82087d..7afe5d3 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -473,9 +473,13 @@ export async function isIpAllowed( try { if (canonicalIpText(ip) === null) return false; - if (ipInList(ip, config.blacklist)) return false; - - if (config.whitelist && config.whitelist.length > 0 && !ipInList(ip, config.whitelist)) return false; + /* Reference _check_ip_lists_detail: a configured whitelist alone decides; + the blacklist applies only when no whitelist is configured. */ + if (config.whitelist && config.whitelist.length > 0) { + if (!ipInList(ip, config.whitelist)) return false; + } else if (ipInList(ip, config.blacklist)) { + return false; + } /* v8 ignore start -- geoIpHandler branch unreachable in recursive JSON check because dangerousPatterns check returns first */ if (geoIpHandler) { diff --git a/packages/core/tests/test-utils/ip-list-precedence-cases.json b/packages/core/tests/test-utils/ip-list-precedence-cases.json new file mode 100644 index 0000000..73d48d9 --- /dev/null +++ b/packages/core/tests/test-utils/ip-list-precedence-cases.json @@ -0,0 +1,1334 @@ +[ + { + "whitelist": [], + "blacklist": [], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [], + "ip": "10.0.0.2", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [], + "ip": "2001:db8::1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [], + "ip": "unknown", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.1" + ], + "ip": "::ffff:10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.1" + ], + "ip": "2001:db8::1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.1" + ], + "ip": "unknown", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "::ffff:10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "2001:db8::1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "unknown", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "10.0.0.2", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "2001:db8::1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "unknown", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.2" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.2" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.2" + ], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.2" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.2" + ], + "ip": "2001:db8::1", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [], + "blacklist": [ + "10.0.0.2" + ], + "ip": "unknown", + "global": true, + "isAllowed": true, + "route": null + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.1" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [], + "ip": "10.0.0.2", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "10.0.0.2", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "10.0.0.2", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "192.168.1.5", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "::ffff:10.0.0.1", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "10.0.0.0/24" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [], + "ip": "10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [], + "ip": "::ffff:10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "::ffff:10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.1" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "::ffff:10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.0/8" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "::ffff:10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "192.168.0.0/16" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "10.0.0.2", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "192.168.1.5", + "global": true, + "isAllowed": true, + "route": true + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "::ffff:10.0.0.1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "2001:db8::1", + "global": false, + "isAllowed": false, + "route": false + }, + { + "whitelist": [ + "192.168.0.0/16" + ], + "blacklist": [ + "10.0.0.2" + ], + "ip": "unknown", + "global": false, + "isAllowed": false, + "route": false + } +] \ No newline at end of file diff --git a/packages/core/tests/test-utils/ip-list-precedence.test.ts b/packages/core/tests/test-utils/ip-list-precedence.test.ts new file mode 100644 index 0000000..20bd8f1 --- /dev/null +++ b/packages/core/tests/test-utils/ip-list-precedence.test.ts @@ -0,0 +1,62 @@ +/** + * Global and route IP list precedence parity with the reference engine + * (guard_core/_utils/access_control.py `_check_ip_lists_detail`, + * guard_core/core/checks/helpers.py `check_route_ip_access`): when a whitelist + * is configured only the whitelist decides and the blacklist is not consulted; + * the blacklist applies only when no whitelist is configured. The expectations + * in ip-list-precedence-cases.json are generated by running the reference. + */ +import { readFileSync } from 'node:fs'; +import { describe, expect, it } from 'vitest'; +import { isIpAllowed } from '../../src/utils.js'; +import { checkIpAccess } from '../../src/core/checks/ip-access.js'; +import { checkRouteIpAccess } from '../../src/core/checks/helpers.js'; +import { SecurityConfigSchema } from '../../src/models/config.js'; +import { RouteConfig } from '../../src/models/route-config.js'; +import { createMockMiddleware } from '../helpers.js'; + +interface Row { + whitelist: string[]; + blacklist: string[]; + ip: string; + global: boolean; + isAllowed: boolean; + route: boolean | null; +} + +const ROWS: Row[] = JSON.parse( + readFileSync(new URL('./ip-list-precedence-cases.json', import.meta.url), 'utf8'), +); + +function cfg(row: Row) { + return SecurityConfigSchema.parse({ + enableRedis: false, + whitelist: row.whitelist.length > 0 ? row.whitelist : null, + blacklist: row.blacklist, + }); +} + +const label = (r: Row) => `wl=${JSON.stringify(r.whitelist)} bl=${JSON.stringify(r.blacklist)} ip=${r.ip}`; + +describe('IP list precedence matches the reference', () => { + it.each(ROWS.map((r) => [label(r), r] as const))('global checkIpAccess %s', async (_l, r) => { + expect((await checkIpAccess(r.ip, cfg(r))).allowed).toBe(r.global); + }); + + it.each(ROWS.filter((r) => r.ip !== 'unknown').map((r) => [label(r), r] as const))( + 'isIpAllowed %s', + async (_l, r) => { + expect(await isIpAllowed(r.ip, cfg(r))).toBe(r.isAllowed); + }, + ); + + it.each(ROWS.filter((r) => r.ip !== 'unknown').map((r) => [label(r), r] as const))( + 'route checkRouteIpAccess %s', + async (_l, r) => { + const rc = new RouteConfig(); + rc.ipWhitelist = r.whitelist.length > 0 ? r.whitelist : null; + rc.ipBlacklist = r.blacklist.length > 0 ? r.blacklist : null; + expect(await checkRouteIpAccess(r.ip, rc, createMockMiddleware())).toBe(r.route); + }, + ); +}); From 37afc1a7056caba194c3a03946b491f0999e3b2f Mon Sep 17 00:00:00 2001 From: Renn F Date: Thu, 15 Oct 2026 18:42:00 +0200 Subject: [PATCH 2/2] test(ip): pin route and global list composition against the reference --- .../test-utils/ip-list-precedence.test.ts | 55 +- .../ip-list-route-global-cases.json | 3242 +++++++++++++++++ 2 files changed, 3296 insertions(+), 1 deletion(-) create mode 100644 packages/core/tests/test-utils/ip-list-route-global-cases.json diff --git a/packages/core/tests/test-utils/ip-list-precedence.test.ts b/packages/core/tests/test-utils/ip-list-precedence.test.ts index 20bd8f1..c26929e 100644 --- a/packages/core/tests/test-utils/ip-list-precedence.test.ts +++ b/packages/core/tests/test-utils/ip-list-precedence.test.ts @@ -13,7 +13,10 @@ import { checkIpAccess } from '../../src/core/checks/ip-access.js'; import { checkRouteIpAccess } from '../../src/core/checks/helpers.js'; import { SecurityConfigSchema } from '../../src/models/config.js'; import { RouteConfig } from '../../src/models/route-config.js'; -import { createMockMiddleware } from '../helpers.js'; +import { initializeSecurityMiddleware } from '../../src/middleware-support.js'; +import { defaultLogger } from '../../src/models/logger.js'; +import type { GuardRequest } from '../../src/protocols/request.js'; +import { createMockMiddleware, createMockResponseFactory } from '../helpers.js'; interface Row { whitelist: string[]; @@ -60,3 +63,53 @@ describe('IP list precedence matches the reference', () => { }, ); }); + +interface RouteGlobalRow { + globalWhitelist: string[]; + globalBlacklist: string[]; + routeWhitelist: string[]; + routeBlacklist: string[]; + ip: string; + allowed: boolean; +} + +const ROUTE_GLOBAL_ROWS: RouteGlobalRow[] = JSON.parse( + readFileSync(new URL('./ip-list-route-global-cases.json', import.meta.url), 'utf8'), +); + +function request(ip: string, routeConfig: RouteConfig): GuardRequest { + return { + urlPath: '/api/test', + urlScheme: 'https', + urlFull: 'https://example.com/api/test', + urlReplaceScheme: (s: string) => `${s}://example.com/api/test`, + method: 'GET', + clientHost: ip, + headers: { 'user-agent': 'TestAgent/1.0' }, + queryParams: {}, + body: async () => new Uint8Array(0), + state: { _routeConfig: routeConfig }, + scope: {}, + }; +} + +describe('route and global IP lists match the reference', () => { + it('a configured route whitelist skips the global lists', async () => { + const failures: string[] = []; + for (const r of ROUTE_GLOBAL_ROWS) { + const config = SecurityConfigSchema.parse({ + enableRedis: false, + enableRateLimiting: false, + whitelist: r.globalWhitelist.length > 0 ? r.globalWhitelist : null, + blacklist: r.globalBlacklist, + }); + const rc = new RouteConfig(); + rc.ipWhitelist = r.routeWhitelist.length > 0 ? r.routeWhitelist : null; + rc.ipBlacklist = r.routeBlacklist.length > 0 ? r.routeBlacklist : null; + const components = await initializeSecurityMiddleware(config, defaultLogger, createMockResponseFactory()); + const allowed = (await components.pipeline.execute(request(r.ip, rc))) === null; + if (allowed !== r.allowed) failures.push(`${JSON.stringify(r)}: got ${allowed}`); + } + expect(failures).toEqual([]); + }); +}); diff --git a/packages/core/tests/test-utils/ip-list-route-global-cases.json b/packages/core/tests/test-utils/ip-list-route-global-cases.json new file mode 100644 index 0000000..2c81a96 --- /dev/null +++ b/packages/core/tests/test-utils/ip-list-route-global-cases.json @@ -0,0 +1,3242 @@ +[ + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "10.0.0.1" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.1" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "10.0.0.1" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.1" + ], + "ip": "192.168.1.5", + "allowed": true + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.1", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "10.0.0.2", + "allowed": false + }, + { + "globalWhitelist": [ + "192.168.0.0/16" + ], + "globalBlacklist": [ + "10.0.0.0/8" + ], + "routeWhitelist": [ + "192.168.0.0/16" + ], + "routeBlacklist": [ + "10.0.0.0/8" + ], + "ip": "192.168.1.5", + "allowed": true + } +] \ No newline at end of file