ガイドAPIリファレンス
ガイド

アクセスフィルターによるリソースアクセスの制御

アクセスフィルターは、アクセスリクエストの権限境界を定義するIAMリソースです。アクセスフィルターは次のような特定のタイプのエンティティに適用できます。

  • レルム
  • ユーザー
  • アプリ
  • 役割

closed組織設定では、IDがリソースとサービスにアクセスできるようにするには管理者が少なくとも1つのアクセスフィルターを追加する必要があります。さらに、アクセスフィルターでは、組織のサブスクライブされているリソースおよびサービスへのアクセス権しか付与できません。

管理者は、個々のIDに最大5つのアクセスフィルターを割り当てることができます。

動作

アクセスフィルターで制限されているIDがアクセスリクエストを行う場合、評価プロセスを続行するには、リクエストがいずれかのフィルターに合格する必要があります。

アクセスフィルターには、アクセスリクエストの評価方法を決定するステートメントのリストが含まれています。次の表にステートメントの概要を示します。

プロパティ説明
permissionsunscopedscopedlinkableのいずれか。•unscopedではプロジェクト外のサービスとリソースへのアクセス権が付与されます。
scopedでは、プロジェクトでリンクまたは作成されたサービスおよびリソースへのアクセス権のみが付与されます。
linkableでは、スコープアクセス用にプロジェクトにリンクできるサービスとリソースを指定します。
serviceアクセスリクエストでserviceIdが送信されました。
actionアクセスリクエストでactionが送信されました。フィルターにはactionまたはactionAccessLevelのいずれかが必要です。
actionAccessLevelリクエスト内のアクションのアクセスレベル。フィルターにはactionまたはactionAccessLevelのいずれかが必要です。
resource任意です。アクセスリクエスト内のリソース。
scope任意です。アクセスリクエストのスコープ。
evaluate次のステートメントでは、一致する権限を評価するかどうかを決定します。指定できる値はtrueまたはfalseです。
priorityステートメントの優先度を表す整数。指定できる値の範囲は0~1000で、1000が最高の優先度です。

すべてのアクセスリクエストが該当するアクセスフィルターに照らし合わせてチェックされます。これには、リクエスト依頼者、リクエスト依頼者のレルム、またはリクエスト依頼者の役割にアタッチされているアクセスフィルターが含まれます。

リクエストされたサービス、アクション、リソース、スコープに一致するアクセスフィルターの各ステートメントは、設定されているpriority値に従って収集および並べ替えられます。次に、最も優先度の高いステートメントを使用してリクエストが評価されます。このステートメントのevaluate値がtrueの場合、アクセスリクエストではステートメントの対応する権限カテゴリーが評価されます。それ以外の場合、カテゴリーはスキップされます。

複数のステートメントが一致し、すべてのステートメントで優先度が同じものの、評価する値が異なる場合、trueを返す評価が他の評価よりも優先され、そのカテゴリーの権限が評価されます。

アクセスフィルターのタイプ

IDには3種類のアクセスフィルターを割り当てることができます。各IDには最大5つのフィルターを設定できますが、3つのフィルタータイプの任意の組み合わせを含めることができます。

プラットフォームのアクセスフィルター

定義済みアクセスフィルターはHEREプラットフォームのデフォルトフィルターです。 これらのフィルターは、OrgAdminResourceManagerなど、ユーザーやアプリに割り当て可能な役割に基づいており、それらの役割の権限と制限を反映しています。 「open」、「strict」、「closed」の各フィルターもプラットフォームアクセスフィルターに分類され、これらはユーザーやアプリにも適用できます。

カスタムアクセスフィルター

カスタムアクセスフィルターを使用すると、特定のIDがアクセスできるリソースやサービスに対して、よりきめ細かく表現力豊かな制御が可能になります。たとえば、フィルターステートメントでワイルドカード文字*を使用して、レルムで使用可能なリソース、アクション、またはサービスのいずれかまたはすべてにIDがアクセスできるかどうかを評価できます。これには、サブスクリプションを介して組織で利用できるリソースまたはサービスが含まれます。

仮想アクセスフィルター

仮想アクセスフィルターでは、サブスクリプション情報を使用することで、提供されるリソースまたはサービスを指定せずにアクセスフィルターの作成を可能にします。組織に複数のサブスクリプションがある場合は、サブスクリプションごとに異なる仮想アクセスフィルターを設定できます。

フィルターの割り当て

アクセスフィルターはエンティティの組織、役割タイプに基づいて割り当てることも、エンティティ自体に直接割り当てることもできます。

  • Org - レルムベースのフィルターは組織設定とも呼ばれます。利用可能な3つのアクセスフィルターはopenstrictclosedです。
  • User/App - 上記のセクションで説明した3種類のアクセスフィルターのいずれかを使用して、ユーザーとAppIDにアクセスフィルターを直接割り当てます。IDには最大5つのアクセスフィルターを割り当てることができます。
  • Role - そのIDに役割が割り当てられたときにユーザー/アプリに自動的に提供される、役割用の事前定義されたアクセスフィルター。たとえば、OrgAdminにはOrgレベルのアクセスフィルター「Strict」が設定されているため、この役割を持つユーザーやアプリはレルム内で利用可能なすべてのリソースとサービスにアクセスできます。その他の役割には、こちらに用意されている権限で説明されているように、役割ごとのアクセス権があります。これらのアクセスフィルターは事前定義されており、編集できません。

厳密

次の例は、システムがstrictに設定されている場合の動作を示しています。この場合、スコープ対象外のリクエストはスコープ対象外権限のみを評価し、スコープ対象のリクエストはスコープ対象権限のみを評価します。linkable権限タイプが直接決定コールで評価されることは決してありません。

   {
    "hrn": "hrn:here:authorization::HERE:platform:filter/strict",
    "name": "Strict",
    "statements": [
        {
            "description": "Allow unscoped permissions for any unscoped request with resource",
            "permissions": "unscoped",
            "service": "*",
            "actions": [
                "*"
            ],
            "resource": "*",
            "evaluate": true,
            "priority": 0
        },
        {
            "description": "Allow unscoped permissions for any unscoped request without resource",
            "permissions": "unscoped",
            "service": "*",
            "actions": [
                "*"
            ],
            "evaluate": true,
            "priority": 0
        },
        {
            "description": "Allow scoped permissions for any scoped request with resource",
            "permissions": "scoped",
            "service": "*",
            "actions": [
                "*"
            ],
            "resource": "*",
            "scope": "*",
            "evaluate": true,
            "priority": 0
        },
        {
            "description": "Allow scoped permissions for any scoped request without resource",
            "permissions": "scoped",
            "service": "*",
            "actions": [
                "*"
            ],
            "scope": "*",
            "evaluate": true,
            "priority": 0
        },
        {
            "description": "Deny linkable permissions for any scoped request with resource",
            "permissions": "linkable",
            "service": "*",
            "actions": [
                "*"
            ],
            "resource": "*",
            "scope": "*",
            "evaluate": false,
            "priority": 0
        },
        {
            "description": "Deny linkable permissions for any scoped request without resource",
            "permissions": "linkable",
            "service": "*",
            "actions": [
                "*"
            ],
            "scope": "*",
            "evaluate": false,
            "priority": 0
        },
        {
            "description": "Deny linkable permissions for any unscoped request with resource",
            "permissions": "linkable",
            "service": "*",
            "actions": [
                "*"
            ],
            "resource": "*",
            "evaluate": false,
            "priority": 0
        },
        {
            "description": "Deny linkable permissions for any unscoped request without resource",
            "permissions": "linkable",
            "service": "*",
            "actions": [
                "*"
            ],
            "evaluate": false,
            "priority": 0
        }
    ],
    "type": "here-platform"
}

デフォルト許可

このフィルターは、スコープ対象・対象外のリクエストを問わず、あらゆるリクエストに対して、利用可能な3つのカテゴリーすべての権限へのアクセス権を付与します。

{
  "hrn": "hrn:here:authorization::HERE:platform:filter/open",
  "name": "Open",
  "statements": [
    {
      "description": "Allow unscoped permissions for any unscoped request without resource",
      "permissions": "unscoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow scoped permissions for any unscoped request without resource",
      "permissions": "scoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow linkable permissions for any unscoped request without resource",
      "permissions": "linkable",
      "service": "*",
      "actions": [
        "*"
      ],
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow unscoped permissions for any unscoped request with resource",
      "permissions": "unscoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow scoped permissions for any unscoped request with resource",
      "permissions": "scoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow linkable permissions for any unscoped request with resource",
      "permissions": "linkable",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow unscoped permissions for any scoped request without resource",
      "permissions": "unscoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "scope": "*",
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow scoped permissions for any scoped request without resource",
      "permissions": "scoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "scope": "*",
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow linkable permissions for any scoped request without resource",
      "permissions": "linkable",
      "service": "*",
      "actions": [
        "*"
      ],
      "scope": "*",
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow unscoped permissions for any scoped request with resource",
      "permissions": "unscoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "scope": "*",
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow scoped permissions for any scoped request with resource",
      "permissions": "scoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "scope": "*",
      "evaluate": true,
      "priority": 0
    },
    {
      "description": "Allow linkable permissions for any scoped request with resource",
      "permissions": "linkable",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "scope": "*",
      "evaluate": true,
      "priority": 0
    }
  ],
  "type": "here-platform"
} 

デフォルト拒否

このフィルターは、利用可能な3つのカテゴリーの権限へのアクセスを求めるすべてのリクエスト (スコープ対象のおよびスコープなしの両方) を拒否します。

{
  "hrn": "hrn:here:authorization::HERE:platform:filter/closed",
  "name": "Closed",
  "statements": [
    {
      "description": "Deny unscoped permissions for any unscoped request with resource",
      "permissions": "unscoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "evaluate": false,
      "priority": 0
    },
    {
      "description": "Deny unscoped permissions for any unscoped request without resource",
      "permissions": "unscoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "evaluate": false,
      "priority": 0
    },
    {
      "description": "Deny scoped permissions for any scoped request with resource",
      "permissions": "scoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "scope": "*",
      "evaluate": false,
      "priority": 0
    },
    {
      "description": "Deny scoped permissions for any scoped request without resource",
      "permissions": "scoped",
      "service": "*",
      "actions": [
        "*"
      ],
      "scope": "*",
      "evaluate": false,
      "priority": 0
    },
    {
      "description": "Deny linkable permissions for any scoped request with resource",
      "permissions": "linkable",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "scope": "*",
      "evaluate": false,
      "priority": 0
    },
    {
      "description": "Deny linkable permissions for any scoped request without resource",
      "permissions": "linkable",
      "service": "*",
      "actions": [
        "*"
      ],
      "scope": "*",
      "evaluate": false,
      "priority": 0
    },
    {
      "description": "Deny linkable permissions for any unscoped request with resource",
      "permissions": "linkable",
      "service": "*",
      "actions": [
        "*"
      ],
      "resource": "*",
      "evaluate": false,
      "priority": 0
    },
    {
      "description": "Deny linkable permissions for any unscoped request without resource",
      "permissions": "linkable",
      "service": "*",
      "actions": [
        "*"
      ],
      "evaluate": false,
      "priority": 0
    }
  ],
  "type": "here-platform"
}