Block a request
This Tenant ACL rule example blocks incoming traffic from a specific geolocation country code.- Management API
- Go SDK
- Node SDK
- Terraform
- Deploy CLI
- Auth0 CLI
To create this Tenant ACL rule with the Management API:
-
Get a Management API access token with the
create:network_aclsscope. - Call the Management API Create access control list endpoint with the following body:
Allow a request
This Tenant ACL rule example allows traffic only from a specific geolocation country code.- Management API
- Go SDK
- Node SDK
- Terraform
- Deploy CLI
- Auth0 CLI
To create this Tenant ACL rule with the Management API:
-
Get a Management API access token with the
create:network_aclsscope. - Call the Management API Create access control list endpoint with the following body:
Redirect a request
This Tenant ACL rule example redirects all traffic from a specific geolocation country code.- Management API
- Go SDK
- Node SDK
- Terraform
- Deploy CLI
- Auth0 CLI
To create this Tenant ACL rule with the Management API:
-
Get a Management API access token with the
create:network_aclsscope. - Call the Management API Create access control list endpoint with the following body:
Complex comparisons
You can combine thematch and not_match operators in a single Tenant ACL rule to enforce fine-grained access policies.
This Tenant ACL rule example evaluates the geo_country_code and geo_subdivision_code signals to block all traffic from a given country except for a specific state, region, or province within that country.
- Management API
- Go SDK
- Node SDK
- Terraform
- Deploy CLI
- Auth0 CLI
To create this Tenant ACL rule with the Management API:
-
Get a Management API access token with the
create:network_aclsscope. - Call the Management API Create access control list endpoint with the following body:
Enforce traffic through specific infrastructure
You can combine thehostnames and connecting_ipv4_cidrs signals to route requests to your tenant exclusively through your authorized infrastructure, such as a reverse proxy or VPN.
This Tenant ACL rule example blocks access to your canonical and custom domains unless the request originates from a specific set of IP addresses that connect directly to the Auth0 edge. This prevents users from bypassing your security controls by accessing your tenant hostnames directly from the public internet.
- Management API
To create this Tenant ACL rule with the Management API:
-
Get a Management API access token with the
create:network_aclsscope. - Call the Management API Create access control list endpoint with the following body: