On this page
What zero trust says about network location
The reference text is NIST SP 800-207, published in August 2020. Its abstract says zero trust assumes no implicit trust is granted to assets or user accounts "based solely on their physical or network location". The key word is solely. The document rejects the old model where being on the corporate network was enough. It does not reject network location as evidence.
Two of the seven tenets in section 2.1 settle the question. Tenet 2 says "Network location alone does not imply trust." Tenet 4 says access is decided by dynamic policy, and it names requestor network location as one of the environmental attributes that policy may use. Section 3.3, on the trust algorithm, goes further. Its list of example resource requirements includes network location, with the example "deny access from overseas IP addresses".
So an IP allowlist is compatible with zero trust as long as it is never the only check. The failure that zero trust was written to fix is the allowlist that replaces authentication. A firewall rule that opens an internal admin panel to the office range, with no login behind it, is the pattern to remove. A firewall rule that limits who can reach a login, a database, or a payout API is a different thing.
Google's BeyondCorp paper from 2014 made the same argument from practice. A breached perimeter gives an attacker the privileged network, so Google moved its corporate apps off the privileged intranet and checked users and devices on every request. NIST's later cloud-native guide, SP 800-207A, keeps both kinds of rule. Its keywords include network-tier policies and identity-tier policies.
What an IP allowlist proves, and what it does not
An IP check proves one fact. The TCP connection arrived from an address on your list. A full TCP session cannot be completed from a spoofed source address over the public internet, because the handshake reply goes to the real owner of that address. For a TLS API, the check is hard to fake at the network layer.
It proves nothing about who sent the request. Every process on an allowed host, every tenant behind a shared NAT, and every user of a shared proxy IP looks the same. If the allowed address belongs to a cloud range, every other customer of that cloud can rent a neighbour. The cloud IP ranges post puts numbers on that.
| Control | Proves | Does not prove | Typical failure |
|---|---|---|---|
| IP allowlist | The connection came from a listed address | Which person, process, or tenant sent it | Shared or recycled IPs, or a compromised host on the list |
| mTLS | The client holds a private key whose certificate your CA signed | That the key has not been copied off the machine | Long-lived certificates with no revocation plan |
| Signed request (HMAC or asymmetric) | This exact body and timestamp came from a holder of the key | That the caller is allowed to do this action | No timestamp check, so captured requests can be replayed |
| Scoped, short-lived token | An authorization server granted these permissions recently | Where the token is being used from | Bearer tokens that leak through logs and work anywhere |
Read the last two columns together. Each control covers a gap in another. A bearer token works from any network, and the IP check closes that. An IP check admits anything on the allowed host, and the token or certificate closes that.
The header that breaks most allowlists
Network-layer spoofing is rare. Application-layer spoofing is common. Many apps read the client IP from X-Forwarded-For, and any client can send that header. MDN's reference is direct about it. If the server can be reached directly from the internet, no part of the list is safe for security decisions, and only entries added by your own trusted proxies count. Check the TCP peer address, or the rightmost entry your own load balancer appended, never the leftmost value.
Where IP allowlists still earn their place
Stolen credentials stop working elsewhere
The clearest recent case is the 2024 Snowflake customer breaches. Mandiant's report on UNC5537 says about 165 organizations were notified as potentially exposed. It named three factors. The accounts had no MFA. Credentials from infostealer malware were still valid, in some cases years after theft. And the instances "did not have network allow lists in place to only allow access from trusted locations." Any one of the three controls would have made the stolen passwords far less useful. The allowlist is the one that needs no change to how people log in.
Pre-auth attack surface shrinks
A service that only accepts connections from two addresses cannot be reached by internet-wide scanners. Bugs in the TLS stack, the login page, or the database's own handshake are out of reach for anyone off the list. Authentication cannot give you that, because the attacker has to reach the code that authenticates. This is why managed databases still ship access lists. The MongoDB Atlas post covers what an open 0.0.0.0/0 list exposes.
Regulators and partners require it
Some allowlists are not your choice. SEBI's February 2025 circular on retail algo trading tells brokers to allow API access only through a unique vendor-client-specific API key and a static IP whitelisted by the broker. In the same list it requires OAuth-based authentication. That is layering, written into regulation. The stated purpose is also worth noting. The static IP is there for identification and traceability of the algo provider and the investor, not only for access control. The SEBI rules post has the details.
Banks and payout providers work the same way. Corporate banking APIs in India commonly ask for production IPs next to certificates and payload encryption, as the bank onboarding post describes. RazorpayX payout APIs in live mode need a whitelisted IP, covered in the RazorpayX post. You can argue the control is dated. You still need to pass onboarding.
Cross-company trust without a shared identity system
NIST section 4.4 describes cross-enterprise collaboration and notes that with a federated identity system, you do not need firewall rules that allow certain IP addresses of one company into another. That is true, and most B2B integrations do not have one. Two companies that share an API key and a pair of IPs have two independent checks with no identity federation project. For a payment or settlement API, that trade is often the right one.
The limits you have to plan for
- A compromised host on the list passes. This is the exact case zero trust was written for, and the reason an allowlist can never be the only control.
- Shared egress weakens the check. Serverless platforms and PaaS send traffic from pools of addresses that change and are shared, as the serverless egress post explains. Allowlisting the pool admits every tenant in it.
- Lists rot. Addresses get released, reassigned, and forgotten. Nobody removes the IP of a server decommissioned two years ago, and whoever gets that address next inherits the access.
- Some request paths carry no source IP. In AWS, the `aws:SourceIp` condition key is missing from the request context when the call comes through a VPC endpoint, so a policy that relies on it needs
aws:VpcSourceIporaws:SourceVpcefor those paths. - Address families drift. A client that egresses over IPv6 will fail an IPv4-only list, which shows up as a mystery 403. The IPv6 egress post covers forcing IPv4.
- Change is slow. Each new address is a ticket to a partner, and some partners limit how often the list can change. Plan addresses you can keep for years.
How to layer the checks
Order the checks from cheapest to most specific. Drop connections from unknown addresses before any TLS work. Then let mTLS prove which client key is talking. Then verify the request signature, which binds the body and a timestamp to a key. Then authorize the action against the client's scopes. A request that fails any step stops there, and each step logs a different reason.
This Node.js server does all four for a partner that calls your payout endpoint. It drops unlisted addresses on the raw TCP socket, before the TLS handshake. It uses the socket's peer address, never a header. It needs no packages beyond Node itself.
import { createHmac, timingSafeEqual } from "node:crypto";
import { readFileSync } from "node:fs";
import { createServer } from "node:https";
import { BlockList, isIP } from "node:net";
import type { TLSSocket } from "node:tls";
// 1. Network: the partner's two egress IPs.
const allowed = new BlockList();
allowed.addAddress("203.0.113.10");
allowed.addAddress("203.0.113.11");
// 4. Authorization: what each client certificate may do.
const scopes = new Map([["payouts.partner.example", new Set(["POST /v1/payouts"])]]);
// Fail at startup without a secret. An empty HMAC key is one anyone can use.
const secret = process.env.PARTNER_SIGNING_SECRET ?? "";
if (secret === "") throw new Error("PARTNER_SIGNING_SECRET is not set");
const MAX_SKEW_SECONDS = 300;
const MAX_BODY_BYTES = 1024 * 1024;
function fromAllowedIp(addr: string | undefined): boolean {
if (!addr || isIP(addr) === 0) return false;
return allowed.check(addr, isIP(addr) === 6 ? "ipv6" : "ipv4");
}
// Header shape: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<body>">
function validSignature(header: string, body: Buffer): boolean {
const parts = new URLSearchParams(header.replaceAll(",", "&"));
const t = Number(parts.get("t"));
if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > MAX_SKEW_SECONDS) return false;
const expected = createHmac("sha256", secret).update(`${t}.`).update(body).digest();
const given = Buffer.from(parts.get("v1") ?? "", "hex");
return given.length === expected.length && timingSafeEqual(given, expected);
}
const server = createServer(
{
key: readFileSync("server.key"),
cert: readFileSync("server.crt"),
// 2. Identity: only client certificates issued by this CA complete the handshake.
ca: readFileSync("partner-ca.crt"),
requestCert: true,
rejectUnauthorized: true,
},
(req, res) => {
// A certificate can carry several CNs. Accept exactly one.
const subjectCn = (req.socket as TLSSocket).getPeerCertificate().subject?.CN;
const cn = typeof subjectCn === "string" ? subjectCn : "";
const chunks: Buffer[] = [];
let size = 0;
req.on("data", (chunk: Buffer) => {
size += chunk.length;
if (size > MAX_BODY_BYTES) req.destroy();
else chunks.push(chunk);
});
req.on("end", () => {
const body = Buffer.concat(chunks);
// 3. Integrity: this body and timestamp were signed with the shared key.
const sig = req.headers["x-signature"];
if (typeof sig !== "string" || !validSignature(sig, body)) {
res.writeHead(401).end();
return;
}
// 4. Authorization: this client may call this route.
if (!scopes.get(cn)?.has(`${req.method} ${req.url}`)) {
res.writeHead(403).end();
return;
}
res.writeHead(202, { "content-type": "application/json" }).end('{"status":"accepted"}');
});
},
);
// 1. Network check on the raw TCP socket, before any TLS work.
server.on("connection", (socket) => {
if (!fromAllowedIp(socket.remoteAddress)) socket.destroy();
});
server.listen(8443);In production, enforce the IP rule at the firewall or security group too, so scanners never reach the process. Keep the in-process check as a second copy, because firewall rules drift and nobody notices until an audit.
mTLS and certificate-bound tokens
mTLS proves the client holds a private key. On its own, it says nothing about permissions. RFC 8705 connects the two. An OAuth server binds the access token to the client's certificate, and the API accepts the token only over a TLS connection made with that same certificate. A token copied out of a log is then useless without the key. That is the same goal as an IP condition, which is to make a stolen credential worthless somewhere else, but tied to a key instead of an address.
Signed requests
A signature covers the request itself. AWS SigV4, the HMAC schemes payment providers use for webhooks, and the standard HTTP Message Signatures (RFC 9421) with its Signature-Input and Signature headers all bind a key to the method, path, body, and a timestamp. Reject old timestamps, or a captured request can be replayed from an allowed IP. On the inbound side, payment webhooks are the classic case for doing both. Stripe publishes its webhook source IPs, signs every event in the Stripe-Signature header, and its webhook best practices tell you to use both protections. The webhook allowlisting post covers keeping both checks.
Scoped, short-lived tokens
NIST tenet 3 says access is granted per session with least privilege, and that access to one resource does not grant another. In practice, that means one token per integration, scoped to the actions it needs, with an expiry measured in minutes or hours. Pair that token with the IP condition and a leak has to beat two independent controls in the same window.
The same idea in a cloud IAM policy
Cloud IAM puts network location and identity in one policy. AWS documents an identity policy that denies every action from outside listed ranges. Attach a version of it to the role a partner or CI job uses. The caller still needs valid signed credentials, and if those leak, they fail from any other address.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": ["203.0.113.10/32", "203.0.113.11/32"]
}
}
}
}This policy only denies. Other policies still have to allow the actions. Test it against every path the role uses, including any VPC endpoints, before you rely on it.
When you are the caller
Often you are on the other side. A partner wants your IP, your client certificate, and your signed requests. The question is how to get a stable IP from a platform that does not have one, without weakening the other three checks.
An HTTP CONNECT proxy fits because it does not terminate TLS. The proxy opens a TCP tunnel, and your client runs the TLS handshake with the partner through it, end to end. Your signatures and bearer tokens travel encrypted inside that tunnel, and the proxy cannot read them. The private key never leaves your client. One detail on the certificate itself. TLS 1.3 encrypts it, while TLS 1.2 sends it in the clear during the handshake, so anyone on the path can read its subject. The CONNECT walk-through shows the bytes, and the TLS passthrough post covers what a proxy can still see. Here is mTLS and a bearer token through a proxy in three clients.
# TLS to the proxy, then CONNECT, then mTLS to the partner inside the tunnel.
curl --proxy "$FIXEDMARK_PROXY_URL" \
--cert client.crt --key client.key \
-H "Authorization: Bearer $PARTNER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"amount": 1000}' \
https://api.partner.example/v1/payouts// npm install undici
import { readFileSync } from "node:fs";
import { fetch, ProxyAgent } from "undici";
const proxy = new ProxyAgent({
uri: process.env.FIXEDMARK_PROXY_URL,
// TLS options for the partner, used inside the CONNECT tunnel.
requestTls: {
cert: readFileSync("client.crt"),
key: readFileSync("client.key"),
},
});
const res = await fetch("https://api.partner.example/v1/payouts", {
method: "POST",
dispatcher: proxy,
headers: {
authorization: `Bearer ${process.env.PARTNER_TOKEN}`,
"content-type": "application/json",
},
body: JSON.stringify({ amount: 1000 }),
});
console.log(res.status, await res.text());# pip install requests (urllib3 1.26+ for an https:// proxy URL)
import os
import requests
proxy = os.environ["FIXEDMARK_PROXY_URL"]
res = requests.post(
"https://api.partner.example/v1/payouts",
json={"amount": 1000},
cert=("client.crt", "client.key"),
headers={"Authorization": f"Bearer {os.environ['PARTNER_TOKEN']}"},
proxies={"https": proxy},
timeout=30,
)
print(res.status_code, res.text)Send only the partner calls through the proxy. The Next.js routing post and the NO_PROXY post show per-client setups. Ask for two IPs up front, so one node can fail without a new allowlist request, as the IP pairs post explains.
A checklist for the next allowlist
- 1Never let the IP be the only checkEvery allowlisted endpoint also needs a credential. If it has none today, add one before you touch the list.
- 2List addresses only you controlUse dedicated addresses, not a cloud's published ranges or a platform's shared pool.
- 3Read the right addressUse the TCP peer, or the entry your own load balancer appended. Ignore client-supplied headers.
- 4Scope the credential that rides with itOne token or certificate per integration, least privilege, short expiry, and a rotation plan.
- 5Sign anything that moves moneyBind body and timestamp with a signature, and reject stale timestamps.
- 6Give every entry an ownerRecord who asked for each address and why. Review the list on a schedule and remove what nobody claims.
Doing this with Fixedmark
Fixedmark, in early access, gives serverless and PaaS apps a pair of static IPv4 addresses to hand to partners, dedicated to you from the Pro plan up. It fits the caller side of the layering above. TLS passes through end to end and is never decrypted, so your client certificates, signatures, and tokens reach the partner untouched. The TLS proxy endpoints on ports 443 and 1443 keep your proxy credential encrypted on the way to the proxy. The plain endpoints on 8080 and 1080 exist for clients that cannot do TLS, and they send it in cleartext.
The proxy credential is itself a token worth scoping. On Business and up, destination allowlists restrict each credential to the hosts and ports it needs, such as api.razorpay.com:443, so a leaked proxy token cannot reach anything else. A denied connection answers 403 Forbidden with X-Proxy-Error: denied_by_policy and shows up in the connection logs, next to the egress IP and SNI of every allowed connection. See security for the full model and pricing for the planned plans.
Sources
Checked November 2026. Confirm current details on the vendor's site before you decide. Prices and limits change.
- NIST SP 800-207: Zero Trust Architecture (PDF)
- NIST SP 800-207A: Zero trust access control for cloud-native apps
- Google Cloud (Mandiant): UNC5537 targets Snowflake customer instances
- SEBI: Safer participation of retail investors in algorithmic trading
- RFC 8705: OAuth 2.0 mutual-TLS and certificate-bound access tokens
- RFC 9421: HTTP Message Signatures
- AWS IAM: Global condition context keys
- AWS IAM: Deny access based on the source IP
- Stripe: Manage webhook endpoints (best practices)
- Stripe: Domains and IP addresses
- MDN: X-Forwarded-For
- Google Research: BeyondCorp, a new approach to enterprise security

