Passer au contenu principal
You can configure Tenant Access Control List (ACL) rules with the Auth0 .

Available actions

You can view, create, update, overwrite, and delete Tenant ACL rules with the Management API.
ActionEndpointRequire scope
View a ruleGet a specific access control list entry for a tenantread:network_acls
View all rulesGet all access control list entries for a tenantread:network_acls
Create a ruleCreate access control listcreate:network_acls
Update a rulePartial update for an access control listupdate:network_acls
Overwrite a ruleUpdate access control listupdate:network_acls
Delete a ruleDelete access control listdelete:network_acls

Parameters

For detailed information about Tenant ACL parameters and how to use them, read Reference.
ParameterData typeDescription
descriptionstringDescribes the purpose or functionality of the rule.
activebooleanEnables or disables the rule.
prioritynumberNumerical value that determines the order in which the rule is evaluated. Lower values indicate higher priority.
ruleobjectContains the following properties:
  • action: object. Contains the action the rule performs.
  • match: object. Defines the conditions that the incoming request must fulfill.
  • not_match: object. Defines the conditions that the incoming request must not fulfill.
  • scope: string. Service or context in which the rule is enforced.

Example: Block all traffic from a given country

Here’s an example of a Tenant ACL rule that blocks all incoming traffic from China.
  • Management API
  • Go SDK
  • Node SDK
  • Terraform
  • Deploy CLI
  • Auth0 CLI
To create a Tenant ACL rule with the Management API:
  1. Get a Management API access token with the create:network_acls scope.
  2. Call the Management API Create access control list endpoint with the following body:
    {
      "description": "Block all traffic from China",
      "active": true,
      "priority": 1,
      "rule": {
        "action": {
          "block": true
        },
        "match": {
          "geo_country_codes": ["CN"]
        },
        "scope": "authentication"
      }
    }
    

Toggle monitoring mode for a rule

You can enable or disable monitoring mode for a Tenant ACL rule by setting the rule.action.log object to true or false, respectively.

Example: Enable monitoring mode for an existing Tenant ACL rule

  • Management API
  • Go SDK
  • Node SDK
  • Terraform
  • Deploy CLI
  • Auth0 CLI
To enable monitoring mode for a Tenant ACL rule with the Management API:
  1. Get a Management API access token with the update:network_acls scope.
  2. Call the Management API Partial update for an access control list endpoint with the following body:
    {
      "rule": {
        "action": {
          "log": true
        },
        "scope": "authentication"
      }
    }
    
I