要塞のIAMポリシー

このトピックでは、要塞サービスへのアクセスを制御するポリシーの記述に関する詳細を説明します。

個別のリソース・タイプ

bastion

bastion-session

集約リソース・タイプ

bastion-family

<verb> bastion-familyを使用するポリシーは、個別の要塞リソース・タイプごとに、それぞれ<verb> <individual resource-type>ステートメントを使用して記述するのと同じです。

bastion-familyに含まれる個別のリソース・タイプについて、各動詞が対応するAPI操作の詳細な内訳は、「動詞+リソース・タイプの組合せの詳細」の表を参照してください。

サポートされる変数

要塞では、すべての一般的な変数と、ここにリストされている変数がサポートされています。Oracle Cloud Infrastructureサービスでサポートされる一般的な変数の詳細は、「動詞+リソース・タイプの組合せの詳細」を参照してください。

変数 変数タイプ コメント
target.bastion.ocid エンティティ(OCID) この変数は、要塞の読取り、更新、削除または移動、要塞の作業リクエストに関連する情報の表示、あるいは要塞に対するセッションの作成がリクエストされた場合に、特定の要塞に対する操作を許可するかどうかを制御するために使用します。
target.bastion.name 文字列 この変数は、要塞の読取り、更新、削除または移動、要塞の作業リクエストに関連する情報の表示、あるいは要塞に対するセッションの作成がリクエストされた場合に、特定の要塞に対する操作を許可するかどうかを制御するために使用します。
target.bastion-session.username 文字列 この変数は、コンピュート・インスタンスに接続するセッションを作成する際に、特定のオペレーティング・システム・ユーザー名をターゲットにするために使用します。
target.resource.ocid エンティティ(OCID) この変数は、セッションの作成時に、Oracle Cloud Identifier (OCID)で特定のコンピュート・インスタンスをターゲットとするために使用します。

動詞+リソース・タイプの組合せの詳細

アクセスのレベルは、inspectからreadusemanageの順に累積します。

表のセルにあるプラス記号(+)は、前のセルと比較してアクセス権が増えていることを示し、「追加なし」はアクセス権が増えていないことを示します。

たとえば、bastionリソース・タイプの動詞readには、動詞inspectと同じ権限とAPI操作が含まれ、GetBastion API操作も追加されています。同様に、bastionリソース・タイプの動詞manageでは、use権限と比較してさらに多くの権限が許可されています。bastionリソース・タイプの場合、動詞manageには、動詞useと同じ権限およびAPI操作に加えて、BASTION_CREATEBASTION_UPDATEBASTION_DELETEBASTION_MOVE権限と多数のAPI操作(CreateBastionUpdateBastionDeleteBastionおよびChangeBastionCompartment)が含まれます。

bastion
動詞 権限 完全に対象となるAPI 部分的に対象となるAPI
inspect

BASTION_INSPECT

ListBastions

なし

read

INSPECT +

BASTION_READ

INSPECT +

GetBastion

ListSessions (inspect sessionも必要)

use

READ +

BASTION_USE

追加なし

 

CreateSession (manage sessionread instancesread subnetsおよびread vcnsも必要)

UpdateSession (manage sessionも必要)

DeleteSession (manage sessionも必要)

manage

USE +

BASTION_CREATE

BASTION_UPDATE

BASTION_DELETE

BASTION_MOVE

USE +

UpdateBastion

ChangeBastionCompartment

CreateBastion (manage vcnsmanage subnetsmanage route-tablesmanage security-listsmanage dhcp-optionsuse network-security-groupsおよびuse vnicsも必要)

DeleteBastion (manage vcnsuse private-ipsuse vnicsuse subnetsおよびuse network-security-groupsも必要)

session
動詞 権限 完全に対象となるAPI 部分的に対象となるAPI
inspect

BASTION_SESSION_INSPECT

なし

ListSessions (read bastionも必要)

read

INSPECT +

BASTION_SESSION_READ

INSPECT +

GetSession

なし

use

READ +

BASTION_SESSION_UPDATE

READ +

追加なし

UpdateSession (use bastionも必要)

manage

USE +

BASTION_SESSION_CREATE

BASTION_SESSION_DELETE

USE +

追加なし

CreateSession (use bastionread instancesread subnetsおよびread vcnsも必要)

API操作ごとに必要な権限

次の表は、論理的な順序で、リソース・タイプ別にグループ化してAPI操作を示しています。

権限の詳細は、権限を参照してください。

API操作 操作の使用に必要な権限
ListBastions BASTION_INSPECT
GetBastion BASTION_READ
CreateBastion BASTION_CREATEおよびVCN_CREATE
UpdateBastion BASTION_UPDATE
DeleteBastion BASTION_DELETEおよびVCN_DELETE
ChangeBastionCompartment BASTION_MOVE
CreateSession

BASTION_USE、INSTANCE_READ、INSTANCE_INSPECT、VCN_READ、VNIC_ATTACHMENT_READ、VNIC_READ、BASTION_SESSION_CREATE、SUBNET_READおよびINSTANCE_AGENT_PLUGIN_READ

ノート: INSTANCE_AGENT_PLUGIN_READは、管理対象SSHセッションにのみ必要です。

GetSession BASTION_SESSION_READ
ListSessions BASTION_READおよびBASTION_SESSION_INSPECT
UpdateSession BASTION_USEおよびBASTION_SESSION_UPDATE
DeleteSession BASTION_USEおよびBASTION_SESSION_DELETE

ポリシーの例

例から、要塞のIAMポリシーについて説明します。

要塞またはセッションを作成するには、他のOracle Cloud Infrastructureリソースに対する次の権限が必要です:

  • ネットワークの管理
  • コンピュート・インスタンスの読取り
  • コンピュート・インスタンス・エージェント(Oracle Cloud Agent)・プラグインの読取り
  • 作業リクエストの検査

詳細は、「コア・サービスの詳細」を参照してください。

要塞のポリシーの例:

  • グループSecurityAdminsのユーザーに、テナンシ全体のあらゆる要塞リソースの作成、更新および削除を許可します:

    Allow group SecurityAdmins to manage bastion-family in tenancy
    Allow group SecurityAdmins to manage virtual-network-family in tenancy
    Allow group SecurityAdmins to read instance-family in tenancy
    Allow group SecurityAdmins to read instance-agent-plugins in tenancy
    Allow group SecurityAdmins to inspect work-requests in tenancy
  • グループBastionUsersのユーザーに、テナンシ全体のセッションの作成、接続および終了を許可します:

    Allow group BastionUsers to use bastions in tenancy
    Allow group BastionUsers to read instances in tenancy
    Allow group BastionUsers to read vcn in tenancy
    Allow group BastionUsers to manage bastion-session in tenancy
    Allow group BastionUsers to read subnets in tenancy
    Allow group BastionUsers to read instance-agent-plugins in tenancy
    Allow group BastionUsers to read vnic-attachments in tenancy
    Allow group BastionUsers to read vnics in tenancy
  • グループBastionUsersのユーザーに、コンパートメントSalesAppsのセッションの作成、接続および終了を許可します:

    Allow group BastionUsers to use bastion in compartment SalesApps
    Allow group BastionUsers to read instances in compartment SalesApps
    Allow group BastionUsers to read vcn in compartment SalesApps
    Allow group BastionUsers to manage bastion-session in compartment SalesApps
    Allow group BastionUsers to read subnets in compartment SalesApps
    Allow group BastionUsers to read instance-agent-plugins in compartment SalesApps
    Allow group BastionUsers to read vnic-attachments in compartment SalesApps
    Allow group BastionUsers to read vnics in compartment SalesApps

    この例では、ネットワークおよびコンピュート・インスタンスが要塞と同じコンパートメントにあることを前提としています。

  • グループSalesAdminsのユーザーに、コンパートメントSalesAppsにある特定のターゲット・ホストのセッションの作成、接続および終了を許可します:

    Allow group SalesAdmins to use bastion in compartment SalesApps
    Allow group BastionUsers to read instances in compartment SalesApps
    Allow group BastionUsers to read vcn in compartment SalesApps
    Allow group SalesAdmins to manage bastion-session in compartment SalesApps where ALL {target.resource.ocid='<instance_OCID>', target.bastion-session.username='<session_username>'}
    Allow group SalesAdmins to read subnets in compartment SalesApps
    Allow group SalesAdmins to read instance-agent-plugins in compartment SalesApps
    Allow group BastionUsers to read vnic-attachments in compartment SalesApps
    Allow group BastionUsers to read vnics in compartment SalesApps

    <session_username>は、そのコンピュート・インスタンスでセッションを作成する場合の特定のオペレーティング・システム・ユーザー名です。

    この例では、ネットワークおよびコンピュート・インスタンスが要塞と同じコンパートメントにあることを前提としています。

  • グループSecurityAuditorsのユーザーに、コンパートメントSalesApps内の要塞リソースすべての表示を許可します:

    Allow group SecurityAuditors to read bastion-family in compartment SalesApps