アクセスフィルターによるリソースアクセスの制御
アクセスフィルターは、アクセスリクエストの権限の境界を定義するIAMリソースです。アクセスフィルターは次のような特定のタイプのエンティティに適用できます。
- レルム
- ユーザー
- アプリ
- 役割
closed組織設定では、IDがリソースとサービスにアクセスできるようにするには管理者が少なくとも1つのアクセスフィルターを追加する必要があります。さらに、アクセスフィルターでは、組織のサブスクライブされているリソースおよびサービスへのアクセス権しか付与できません。
管理者は、個々のIDに最大5つのアクセスフィルターを割り当てることができます。
動作
アクセスフィルターで制限されているIDがアクセスリクエストを行う場合、評価プロセスを続行するには、リクエストがいずれかのフィルターに合格する必要があります。
アクセスフィルターには、アクセスリクエストの評価方法を決定するステートメントのリストが含まれています。次の表にステートメントの概要を示します。
| プロパティ | 説明 |
|---|---|
permissions | unscoped、scoped、linkableのいずれか。•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プラットフォームのデフォルトフィルターです。 これらのフィルターは、OrgAdminやResourceManagerなど、ユーザーやアプリに割り当て可能な役割に基づいており、それらの役割の権限と制限を反映しています。
「open」、「strict」、「closed」の各フィルターもプラットフォームアクセスフィルターに分類され、これらはユーザーやアプリにも適用できます。
カスタムアクセスフィルター
カスタムアクセスフィルターを使用すると、特定のIDがアクセスできるリソースやサービスに対して、よりきめ細かく表現力豊かな制御が可能になります。たとえば、フィルターステートメントでワイルドカード文字*を使用して、レルムで使用可能なリソース、アクション、またはサービスのいずれかまたはすべてにIDがアクセスできるかどうかを評価できます。これには、サブスクリプションを介して組織で利用できるリソースまたはサービスが含まれます。
仮想アクセスフィルター
仮想アクセスフィルターでは、サブスクリプション情報を使用することで、提供されるリソースまたはサービスを指定せずにアクセスフィルターの作成を可能にします。組織に複数のサブスクリプションがある場合は、サブスクリプションごとに異なる仮想アクセスフィルターを設定できます。
デフォルト(暗黙)のアクセスフィルター
HEREプラットフォームは新しく作成されたエンティティに、明示的にアタッチしなくても、デフォルトで特定のアクセスフィルターを適用します。こうした暗黙のフィルターは、IDが作成された瞬間から最小権限の原則を適用します。
アプリに対するデフォルトの動作
新しいアプリを作成すると、Restricted IAM Access(制限付きIAMアクセス)フィルター(hrn:here:authorization::HERE:platform:filter/restricted-iam-access)が自動的に適用されます。このフィルターは、PIIデータを扱うIAM APIへのアクセスを制限し、IAMリソースの新規作成を防ぎます。一方で、HEREのロケーションサービスやPIIを含まない基本的なIAMデータへのアクセスは維持します。
| エンティティタイプ | デフォルトのフィルター | 効果 |
|---|---|---|
| アプリ | restricted-iam-access | PIIを受け渡すIAM APIや、IAMリソースの作成をブロックします |
| ユーザー | なし | 暗黙のフィルターは適用されません |
デフォルトのフィルターのオプトアウト
アプリがより広範なIAMアクセスを必要とする場合、アプリへの管理アクセス権限を持つOrgAdminまたはID(ユーザーまたはアプリ)はデフォルトのフィルターを明示的にデタッチできます。
olp permission access delete \
hrn:here:account::<realm>:app/<appClientId> \
hrn:here:authorization::HERE:platform:filter/restricted-iam-access
デタッチされた時点で、明示的なオプトアウト設定がプラットフォームに登録されます。IDが更新された場合でもフィルターは自動的に再適用されません。
より厳しいフィルターへのオプトイン
アプリ側でIAMの操作を一切行う必要がない場合、HEREでは代わりにBlock IAM Access(IAMアクセスをブロック)フィルターを適用することをおすすめします。
olp permission access set \
hrn:here:account::<realm>:app/<appClientId> \
hrn:here:authorization::HERE:platform:filter/block-iam-access
表示
明示的な紐付けの記録が存在しない場合でも、暗黙的なデフォルトフィルターはエンティティのアクセスフィルターリスト(olp permission access showにより取得)に表示されます。これらは、アクセス制御の決定とAPIレスポンスの両方にアタッチされたものとして扱われます。
IAMセキュリティフィルター
HEREプラットフォームには、AppIDがIAM APIをどのように操作するかを制限するために特別に設計された2つの定義済みアクセスフィルターが用意されています。
| フィルター名 | フィルターのHRN | ブロック対象 |
|---|---|---|
| Block IAM Access | hrn:here:authorization::HERE:platform:filter/block-iam-access | すべての IAM API (承認およびアカウントサービス)へのアクセスをブロックします。IAMに対する操作を一切必要としないアプリにおすすめです。 |
| Restricted IAM Access | hrn:here:authorization::HERE:platform:filter/restricted-iam-access | PIIデータを受け渡すIAM APIをブロックし、IAMリソースの作成を防ぎます。アプリはプランや権限などの基本的なIAMデータへのアクセスを保持します。 |
Restricted IAM Access - ブロック対象
このフィルターを適用すると、IDによる次の動作を防ぎます。
- PIIデータへのアクセス - レルムメンバー、招待情報、グループメンバー、ロールエンティティ、付与された権限の詳細
- IAMリソースの作成 - プロジェクト、グループ、アプリ、シークレット、リソースポリシー
- 営業担当の連絡先情報の表示
次のアクセス権限は保持されます。
- 購読プランとリソースプランの読み取り
- 自分の権限の表示
- サブスクライブ済みのHERE Location Services (地図、ルーティング、ジオコーディングなど)へのアクセス
Block IAM Access - ブロック対象
このフィルターを適用すると、制限付きフィルターがブロックする対象すべてに加え、以下を含むすべてのIAM APIへのアクセスがブロックされます。
- すべての承認エンドポイントまたはアカウントサービスエンドポイントの読み取り
- すべてのプロジェクト管理業務
- すべての役割およびポリシーの管理業務
OLP CLIによるIAMセキュリティフィルターの管理
使用可能なプラットフォームアクセスフィルターを一覧表示します。
olp permission access filter list --type here-platform
メンバーにアタッチ可能なフィルターを一覧表示します。
olp permission access filter list --member-only
アプリにフィルターをアタッチします。
olp permission access set \
hrn:here:account::<realm>:app/<appClientId> \
hrn:here:authorization::HERE:platform:filter/block-iam-access
アタッチ済みのフィルターを確認します。
olp permission access show \
hrn:here:account::<realm>:app/<appClientId>
フィルターをデタッチします。
olp permission access delete \
hrn:here:account::<realm>:app/<appClientId> \
hrn:here:authorization::HERE:platform:filter/block-iam-access
セキュリティに関する注意
- 適切なアクセスフィルターを適用せずに、公開されているアプリケーション、モバイルアプリ、またはデバイスにOAuth資格情報(アクセスキーIDとアクセスキーシークレット)を埋め込まないでください。
- アクセスフィルターがないと、有効なOAuth資格情報を持つアプリケーションがIAMエンドポイントにアクセスし、メールアドレス、ユーザー名、役割、レルムメンバーの招待ステータスなどの個人を特定できる情報を取得できるようになります。
- 常に、アプリケーションが正しく機能する範囲で最も制限の厳しいフィルターを適用してください。
- アクセスフィルターの制限を無効にできるのは、OrgAdminロールを持つIDのみです。
フィルターの割り当て
アクセスフィルターは、エンティティの組織、ロールタイプに基づいて、エンティティ自体に直接割り当てることも、デフォルトで暗黙的に割り当てることもできます。
- Org -レルムベースのフィルターは組織設定とも呼ばれます。利用可能な3つのアクセスフィルターは
open、strict、closedです。 - 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"
} 今月の更新