See all services → Shopify Plus Partner
Dev Dashboard Developer

Combine IPs and ASNs in One Shopify App Allowlist

App IP allowlists can now hold IP addresses and ASNs together, with the address limit raised from 100 to 250. Apps with mixed egress no longer need to allow an entire provider network.

Executive summary

What changed

The IP allowlist section of an app's settings page previously forced a choice between listing addresses and listing networks. It no longer does. You can now enter up to 250 addresses or ranges under IP addresses or CIDR ranges, up to 10 ASNs under networks, or both at once. Under the option to limit ASNs to countries you can select up to 10 countries, and that restriction applies only to your ASNs, never to your explicitly listed IP addresses.

Matching is a union, not an intersection. A request is allowed if it matches any configured IP address or any configured ASN. Anything outside the allowlist fails with a 403.

The address rules are worth having to hand. Allowlists are written as CIDR ranges, one per line. Use /16 or narrower for IPv4 and /32 or narrower for IPv6. Use public addresses only, and where servers sit behind a NAT gateway, list the gateway's addresses. Start each range at its network address, so 203.0.113.0/24 rather than 203.0.113.7/24.

Why it matters

This removes a genuine security compromise. Before the change, an app with one serverless component had to allow its hosting provider's entire ASN, which covers every address on that network including those used by the provider's other customers. The practical effect was that a token leak from a tightly hosted app was protected only as well as the loosest path in the app.

Now the correct configuration is achievable: list your own servers as specific addresses, add an ASN only for the components that genuinely have dynamic egress, and constrain those ASNs by country. Allowing specific addresses remains the strongest option because only your own servers can use your tokens. The 250 address ceiling also makes exhaustive listing realistic for integration platforms that fan out across several regions, which matters for ERP and OMS connectors of the kind we build into Makro Middleware.

Role-specific impact

Use-case example

Real-world scenario

A middleware layer syncing orders and inventory between Shopify and an ERP runs its main sync workers on three fixed hosts and its webhook receivers on serverless functions in two regions. Under the old constraint the team allowed the provider ASN, which meant any tenant on that provider's network was inside the boundary. Reconfigured, the app lists five static addresses for the workers and one ASN limited to two countries for the receivers. The exposed surface drops from an entire cloud region to five addresses plus one scoped network, with no change to application code and about an hour of configuration and log validation.

Implementation checklist

  1. Separate your app's request paths into those with static egress addresses and those with dynamic ones.
  2. List every static address or range under IP addresses or CIDR ranges, up to the new limit of 250 entries, one per line.
  3. Add ASNs only for genuinely dynamic paths, up to 10, and limit them to the countries those components run in.
  4. Confirm your ranges use public addresses, start at the network address, and respect the /16 IPv4 and /32 IPv6 prefix limits.
  5. Where servers sit behind NAT, list the gateway addresses rather than the private ones.
  6. Compare the allowlist against recent request logs to catch any source you missed, then enable enforcement.
  7. Revisit allowlists that were configured as ASN-only purely because of the old restriction.

FAQ

Q: Does limiting ASNs to countries also restrict our listed IP addresses?

A: No. The country restriction applies only to ASNs. Explicitly listed IP addresses are matched regardless of geography.

Q: Should we just use an ASN for simplicity?

A: Only where egress is genuinely dynamic. An ASN admits every address on your hosting provider's network, including other customers' servers, so specific addresses are materially stronger wherever they are available.

Resources

Restrict API access with an IP allowlist

Need guidance? Talk to Makro.