Access Control

This page describes the access control options available to you for the Cloud Asset API.

Overview

Cloud Asset Inventory uses Cloud Identity and Access Management (Cloud IAM) for access control.

In the Cloud Asset API, access control can be configured at the project level or organization level. For example, you can grant access to all Cloud Asset Inventory resources within a project to a group of developers.

For a detailed description of Cloud IAM and its features, see the Cloud IAM developer's guide. In particular, see its Managing Cloud IAM Policies section.

Every Cloud Asset Inventory API method requires the caller to have the necessary permissions. See Permissions and roles for more information.

Permissions and roles

This section summarizes Cloud Asset API permissions and roles that Cloud IAM supports.

Required permissions

The following table lists the permissions that the caller must have to call each API method in the Cloud Asset API or to perform tasks using Google Cloud Platform tools that use the API, such as Google Cloud Platform Console or Cloud SDK.

Permission API Methods
cloudasset.assets.exportResource or
cloudasset.assets.exportIamPolicy
based on the content_type
*.batchGetAssetsHistory
*.exportAssets
*.operations.get

Roles

Cloud Asset Inventory has one Cloud IAM role, roles/cloudasset.viewer. This role grants the cloudasset.assets.exportResource and cloudasset.assets.exportIamPolicy permissions, allowing the use of all Cloud Asset API methods. The roles/owner role can also be used to grant this permission. Note that the primitive role owner includes permissions for other Google Cloud Platform services as well.

Access control with the GCP Console

You can use the GCP Console to manage access control for your environments and projects.

To set access controls at the project level:

  1. Open the IAM page in the Google Cloud Platform Console.
  2. Select your project, and click Continue.
  3. Click Add Member.
  4. Enter the email address of a new member to whom you have not granted any Cloud IAM role previously.
  5. Select the desired role from the drop-down menu.
  6. Click Add.
  7. Verify that the member is listed under the role that you granted.
หน้านี้มีประโยชน์ไหม โปรดแสดงความคิดเห็น