メインコンテンツへスキップ

リクエストをブロックする

この Tenant ACL ルールの例では、特定の地理的位置の国コードからの受信トラフィックをブロックします。
Management API を使用してこの Tenant ACL ルールを作成するには、次の手順を実行します。
  1. create:network_acls スコープを持つ Management API のアクセストークンを取得 します。
  2. 次のリクエストボディを使用して、Management API の アクセス制御リスト作成エンドポイント を呼び出します。
{
  "description": "Example of blocking a request",
  "active": true,
  "priority": 2,
  "rule": {
    "action": {
      "block": true
    },
    "match": {
      "geo_country_codes": [
        "{geoCountryCode}"
      ]
    },
    "scope": "authentication"
  }
}{
  "description": "Example of blocking a request",
  "active": true,
  "priority": 2,
  "rule": {
    "action": {
      "block": true
    },
    "match": {
      "geo_country_codes": [
        "{geoCountryCode}"
      ]
    },
    "scope": "authentication"
  }
}
以下はブロックページの例です。 ブロックページの例

リクエストを許可する

この Tenant ACL ルールの例では、特定の地理的位置の国コードからのトラフィックのみを許可します。
Management API を使用してこの Tenant ACL ルールを作成するには、次の手順を実行します。
  1. create:network_acls スコープを持つ Management API アクセストークンを取得します
  2. 次のリクエストボディを指定して、Management API の アクセス制御リスト作成エンドポイント を呼び出します。
{
  "description": "Example of allowing a request",
  "active": true,
  "priority": 2,
  "rule": {
    "action": {
      "allow": true
    },
    "match": {
      "geo_country_codes": [
        "{geoCountryCode}"
      ]
    },
    "scope": "authentication"
  }
}

リクエストをリダイレクトする

この Tenant ACL ルール の例では、地理位置情報に基づく特定の国コードからのすべてのトラフィックをリダイレクトします。
Management API を使用してこの Tenant ACL ルール を作成するには、次の手順に従います。
  1. create:network_acls スコープを持つ Management API アクセストークンを取得 します。
  2. 次のリクエスト本文を指定して、Management API のアクセス制御リスト作成エンドポイントを呼び出します。
{
  "description": "Example of redirecting a request",
  "active": true,
  "priority": 2,
  "rule": {
    "action": {
      "redirect": true,
      "redirect_uri": "REDIRECT_URI"
    },
    "match": {
      "geo_country_codes": [
        "{geoCountryCode}"
      ]
    },
    "scope": "authentication"
  }
}

複雑な比較

match 演算子と not_match 演算子は、1 つの Tenant ACL ルール内で組み合わせて使用でき、きめ細かなアクセス制御ポリシーを適用できます。 この Tenant ACL ルールの例では、geo_country_code シグナルと geo_subdivision_code シグナルを評価し、特定の国からのすべてのトラフィックをブロックします。ただし、その国の特定の州、地域、または省からのトラフィックは許可します。
Management API でこの Tenant ACL ルールを作成するには、次の手順を実行します。
  1. create:network_acls スコープを持つ Management API アクセストークンを取得 します。
  2. 次のボディを指定して、Management API のアクセス制御リスト作成エンドポイントを呼び出します。
{
  "description": "Example of a complex comparison",
  "active": true,
  "priority": 1,
  "rule": {
    "action": {
      "block": true
    },
    "match": {
      "geo_country_codes": [
        "{geoCountryCode}"
      ]
    },
    "not_match": {
      "geo_subdivision_codes": [
        "{geoSubdivisionCode}"
      ]
    },
    "scope": "authentication"
  }
}

特定のインフラストラクチャ経由にトラフィックを制限する

hostnames シグナルと connecting_ipv4_cidrs シグナルを組み合わせることで、リバースプロキシや VPN など、承認済みのインフラストラクチャ経由にのみ、テナントへのリクエストをルーティングできます。 この Tenant ACL ルールの例では、Auth0 エッジに直接接続する特定の IP アドレス群からのリクエストでない限り、正規ドメインおよびカスタムドメインへのアクセスをブロックします。これにより、ユーザーが公開インターネットからテナントのホスト名に直接アクセスしてセキュリティ制御を回避することを防げます。
Management API を使用してこの Tenant ACL ルールを作成するには、次の手順に従います。
  1. create:network_acls スコープを持つ Management API アクセストークンを取得 します。
  2. 次のリクエストボディを指定して、Management API の アクセス制御リスト作成エンドポイント を呼び出します。
{
  "description": "Restrict access to specific proxy IPs for custom and canonical domains",
  "active": true,
  "priority": 10,
  "rule": {
    "action": {
      "block": true
    },
    "match": {
      "any": [
        { "hostnames": ["auth.example.com"] },
        { "hostnames": ["my-tenant.us.auth0.com"] }
      ]
    },
    "not_match": {
      "connecting_ipv4_cidrs": [
        "192.0.2.0/24",
        "203.0.113.5/32"
      ]
    },
    "scope": "tenant"
  }
}