ワークロードのドライラン実行を完了したら、許可リストに追加する必要のある IP アドレスと ID のリストを特定します。また、一部のワークロードにはデバイスベースの許可リストも必要です。保護された Google Cloud リソースに対する制御されたアクセス権限を付与するには、VPC Service Controls のアクセスレベルを使用できます。アクセスレベルを実装する一部の実用的な手法は、IP アドレス、ID、デバイスに基づいています。
IP ベースの許可リストのアクセスレベルに使用できるのは、パブリック IP CIDR 範囲のみです。この方法では、この IP 範囲から保護されたすべての API が許可されるため、これらの IP の背後にある環境は信頼できる環境で、制御されている必要があります。この許可リストの一般的な利用シナリオは、オンプレミス ネットワークから境界アクセスを許可することです。次の図は、IP ベースの許可リストが境界アクセスのブロックと許可を行う方法を示しています。
上の図では、有効な ID が境界へのアクセスを試みます。IP アドレスから試行されたアクセスは拒否されます。ただし、企業のパブリック IP アドレスから派生したアクセスは許可されます。
このシナリオのバリエーションとして、別のプロジェクトまたは組織にデプロイされた限定公開リソースから境界にアクセスできるようにする場合があります。このユースケースでは、ソース プロジェクトに Cloud NAT ゲートウェイが必要です。Cloud NAT がプライベート Google アクセスと統合されているため、リソースのサブネットでプライベート Google アクセスは自動的に有効になり、Google API とサービスへのトラフィックは内部に保持されます。このトラフィックが、Cloud NAT ゲートウェイの外部 IP アドレスを使用してインターネットに転送されることはありません。トラフィックは Google 内部ネットワーク内でルーティングされるため、AuditLog オブジェクトの RequestMetadata.caller_ip フィールドは gce-internal-ip に編集されます。この場合、境界へのアクセスを許可するには、外部送信元 IP アドレスに基づいてアクセスレベルを構成するのではなく、プロジェクトやサービス アカウントなどの他の属性に基づいてアクセスを許可するように上り(内向き)ルールを構成する必要があります。
呼び出し元の ID に応じてアクセス権を付与する
ID ベースの許可リストを実装するには、サービス アカウントと組織の特権管理者を許可リストに追加します。境界は任意の IP アドレスの ID に対して開いているため、これらの ID が適切に保護されていることを確認する必要があります。また、許可リストに登録したサービス アカウントのキーの作成は避ける必要があります。ユーザー ID を境界の許可リストに追加することは一般的ではありません(グループは許可リストに追加できません)。
デバイスの信頼性(信頼できるエンドポイントとも呼ばれます)は、有効な組織ユーザーが Chrome ブラウザまたは Chromebook にログインしていることに依存します。信頼性は OS ログイン セッションに適用されます。たとえば、Chrome セッションにログインして実行している Windows ユーザー(ブラウザを開いていなくてもかまいません)は、保護された境界の API で gcloud CLI コマンドを正常に呼び出すことができます。しかし、同じマシン上の別の Windows ユーザー セッションで、保護された境界の API のコマンドを呼び出すことはできません。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[],[],null,["# Design access levels\n\nThis document describes access-level implementations and provides\nrecommendations for initiating service perimeter enforcement based on\nallowlists.\n\nWhen you complete a dry-run execution of workloads, you identify a list of IP\naddresses and identities that you need to add to an allowlist. You might also\nfind that some workloads need a device-based allowlist. To grant controlled\naccess to protected Google Cloud resources, you can use\nVPC Service Controls access levels. Some practical ways that you can\nimplement access levels are based on IP address, identity, or device.\n\nFor more information, see [Context-aware access with ingress rules](/vpc-service-controls/docs/context-aware-access).\n\n### Granting access based on source IP\n\nYou can only use\n[public IP CIDR ranges](/access-context-manager/docs/access-level-attributes#ip-subnetworks)\nin the access levels for IP-based allowlists. Since this method allows all\nprotected APIs from this IP range, the environment behind these IPs must be\ntrusted and controlled. A typical usage scenario for this allowlist is to allow\nperimeter access from on-premises networks. The following diagram shows how an\nIP-based allowlist blocks and allows perimeter access:\n\nIn the preceding diagram, a valid identity attempts to access the perimeter.\nThe access attempts are rejected when they originate from any internet IP\naddresses. However, access is allowed when it is sourced from the corporate\npublic IP addresses.\n\nA variation on this scenario is when you allow perimeter access from\nprivate resources deployed in a different project or organization. In this use\ncase, a Cloud NAT gateway is required in the source project.\n[Cloud NAT](/nat/docs/nat-product-interactions#interaction-pga)\nhas an integration with [Private Google Access](/vpc/docs/configure-private-google-access)\nthat automatically enables Private Google Access on the resource's subnet,\nand keeps the traffic to Google APIs and services internal, instead of routing\nit to the internet using the Cloud NAT gateway external IP address.\nAs the traffic is routed within the internal Google network, the\n`RequestMetadata.caller_ip` field of the `AuditLog` object is redacted to\n`gce-internal-ip`. To allow perimeter access in this case, you need to\nconfigure an ingress rule to allow access based on other attributes such as\nthe project or service account, instead of configuring an access level based\non the external source IP address.\n\n### Granting access based on caller identity\n\nTo implement an identity-based allowlist, you add service accounts and\n[organization super administrators](/resource-manager/docs/super-admin-best-practices)\nto an allowlist. The perimeter is open for these identities from any IP address,\nso you need to make sure that the identities are well-guarded. You also need to\nmake sure that you avoid minting keys for service accounts that you have added\nto an allowlist. It is uncommon to add user identities to an allowlist (groups\ncan't be added to an allowlist) on a perimeter.\n\nResources within the perimeter can be accessed through VMs within the\nperimeter, from trusted on-premises networks, or from trusted devices. We\nrecommend using [Cloud Workstations](/workstations/docs/overview) to access\nresources within perimeters because VPC Service Controls doesn't support\n[Cloud Shell](/vpc-service-controls/docs/supported-products#shell).\n| **Note:** You can only implement an identity-based allowlist using access levels by using the [gcloud CLI](/access-context-manager/docs/create-basic-access-level#members-example). You can use the Google Cloud console to configure ingress rules that implement identity-based access levels.\n\n### Qualifying access based on the caller device attributes\n\nDevice trust, also called *trusted endpoint*, relies on having a valid\norganization user signed in to a Chrome browser or to a Chromebook. The trust\napplies to the OS signed-in session. For example, a Windows user that is signed\nin and running a Chrome session (the browser doesn't need to be open) can\nsuccessfully call gcloud CLI commands on protected perimeter APIs.\nHowever, a different Windows user session on the same machine can't call\ncommands on the protected perimeter APIs.\n| **Note:** Caller device attributes are available only if you are using Chrome Enterprise Premium.\n\nThe following device conditions are useful to establish device trust:\n\n- [**Verified Chrome OS**](https://developers.google.com/chrome/verified-access/developer-guide)\n is a highly secure, cryptographically verified condition that indicates that\n a valid organization user is signed in to a securely booted Chromebook. This\n is a recommended tier 1 trust condition.\n\n- [**Require admin approval for device access**](https://support.google.com/cloudidentity/answer/7508418)\n allows Cloud Identity administrators to approve each device before any\n access is granted. By default, devices are auto-approved if they have a\n valid organization user signed in. However, we recommend turning off the\n auto-approval option.\n\n- **Require corp owned device** relies on the Chrome agent retrieving the\n serial number from the OS, which usually comes from the BIOS. This number\n must match existing serial numbers that you have\n [entered into Cloud Identity](https://support.google.com/cloudidentity/answer/7129612).\n\n Because the serial number isn't authoritative in non-Chrome OS devices, a\n user with elevated administrator privileges might be able to spoof the\n serial number. We recommend using this condition only as a tier 2 check.\n\n| **Note:** For trust to apply, the user and device must be in the same organization as the Google Cloud resources.\n\nFor a sample tracker for granting controlled access based on the conditions\ndiscussed in the preceding list, see\n[VPC Service Controls onboarding template - allowlist (PDF)](/static/solutions/vpc-service-controls-enterprise-best-practices-use-cases-template.pdf).\n\n### Initiate enforcement\n\nAfter you design the allowlist and update access levels, we recommend that you\nexecute the workloads again to confirm that there aren't any violations. If the\nworkloads execute without violations, you can initiate VPC Service Controls\nenforcement without impacting the applications.\n\nWhen you plan for enforcement, include the following:\n\n- Choose an enforcement date and communicate that date to all related teams.\n- Ensure that the security operations and incident response teams are aware of the deployment. Additionally, make sure that individuals with appropriate permissions inspect logs and approve additional allowlists, if necessary.\n- Ensure that the situation response team can open a Google Cloud support case, if any questions or issues arise.\n- Create or modify perimeter and access levels using automation tools like [Terraform](https://registry.terraform.io/modules/terraform-google-modules/vpc-service-controls/google/0.1.0/submodules/regular_service_perimeter). We recommend against performing these tasks manually.\n\nWhen you initiate enforcement, start by moving projects that are associated\nwith a single workload from the dry run perimeter to the live perimeter. Make\nsure to allow time for the application to run correctly while you observe the\nviolation logs. Repeat the process for remaining workloads one at a time.\n\nTo surface blocked violations, [configure an aggregated logging sink](/logging/docs/export/aggregated_sinks) that sends audit logs for all projects in the perimeter to BigQuery. Then, run the following query: \n\n SELECT\n receiveTimestamp, #time of violation\n Resource.labels.service, #protected Google Cloud service being blocked\n protopayload_auditlog.methodName, #method name being called\n resource.labels.project_id as PROJECT, #protected project blocking the call\n protopayload_auditlog.authenticationInfo.principalEmail, #caller identity\n protopayload_auditlog.requestMetadata.callerIp, #caller IP\n JSON_EXTRACT(protopayload_auditlog.metadataJson, '$.dryRun') as DRYRUN, #dry-run indicator\n JSON_EXTRACT(protopayload_auditlog.metadataJson, '$.violationReason') as REASON, #reason for violation\n protopayload_auditlog.metadataJson, #raw violation entry\n FROM `BQ_DATASOURCE_NAME.cloudaudit_googleapis_com_policy_*`\n WHERE JSON_EXTRACT(protopayload_auditlog.metadataJson, '$.dryRun') is null #exclude logs from a dry-run perimeter\n\nWhat's next\n-----------\n\n- Learn how to [allow access to protected resources from outside the perimeter](/vpc-service-controls/docs/use-access-levels).\n- Learn how to [list, update, and delete service perimeters](/vpc-service-controls/docs/manage-service-perimeters)."]]