Info icon
End of Life Notice: For Trend Cloud One™ - Conformity Customers, Conformity will reach its End of Sale on “July 31st, 2025” and End of Life “July 31st, 2026”. The same capabilities and much more is available in Trend Vision One™ Cloud Risk Management. For details, please refer to Upgrade to Trend Vision One
Use the Knowledge Base AI to help improve your Cloud Posture

Implement Least Privilege Access for Document AI using Cloud IAM

Trend Vision One™ provides continuous assurance that gives peace of mind for your cloud infrastructure, delivering over 1100 automated best practice checks.

Risk Level: Medium (should be achieved)

Ensure that IAM roles with administrative permissions are not assigned to IAM identities (users, groups, and service accounts) managing Document AI resources. This helps enforce the Principle of Least Privilege (POLP) by granting members (principals) only the minimum access necessary to complete their tasks.

Security

One of the most prevalent security vulnerabilities in Google Cloud is misconfigured access permissions. To minimize security risks, avoid assigning IAM roles with admin privileges to IAM members (principals) on a regular basis. IAM members with administrator roles (Owner, Editor, or Document AI Administrator role) can create, update, process, and delete Document AI resources. To adhere to the Principle of Least Privilege (POLP), assign IAM members only the minimal permissions required for their tasks and remove any overly permissive administrator roles.


Audit

To determine whether the IAM identities managing Document AI resources are using roles with administrative permissions, perform the following operations:

Using GCP Console

01 Sign in to the Google Cloud Management Console.

02 Select the Google Cloud Platform (GCP) project that contains your Document AI resources from the console top navigation bar.

03 Navigate to IAM & Admin console available at https://console.cloud.google.com/iam-admin/iam.

04 In the left navigation panel, under IAM & Admin, select IAM.

05 Select the Allow tab and choose View by principals to list all the IAM members (principals) that have access to the selected GCP project.

06 Click inside the Filter box and perform the following actions:

  1. Select Role, type Owner, and press Enter to return the principals with the Owner role.
  2. Select OR, choose Role, type Editor, and press Enter to return the members with the Editor role.
  3. Select OR, choose Role, type Document AI Administrator, and press Enter to return the principals with the Document AI Administrator role (includes the permissions required to access and manage all Document AI resources).

07 If the filtering process in the previous step identifies one or more IAM members, it indicates that there are principals using IAM roles with administrative permissions in the selected GCP project.

08 Repeat steps no. 2 – 7 for each GCP project with Document AI resources, available in your Google Cloud account.

Using GCP CLI

01 Run projects list command (Windows/macOS/Linux) with custom output filters to list the ID of each project available in your Google Cloud Platform (GCP) account:

gcloud projects list
	--format="value(projectId)"

02 The command output should return the requested GCP project identifiers (IDs):

cc-project5-123123
cc-ai-project-123123

03 Run projects get-iam-policy command (Windows/macOS/Linux) with the ID of the GCP project that contains your Document AI resources as the identifier parameter, to describe the Identity and Access Management (IAM) policy defined for the selected project:

gcloud projects get-iam-policy cc-project5-123123
	--format="default(bindings)"

04 The command output should return the requested IAM policy bindings:

bindings:
	- members:
		- serviceAccount:123456789012-compute@developer.gserviceaccount.com
		- user:username1@domain.com
		role: roles/editor
	- members:
		- user:username2@domain.com
		role: roles/owner
	- members:
		- user:username3@domain.com
		role: roles/documentai.admin

Check the name of each IAM role (i.e., role property value) returned by the projects get-iam-policy command output to determine the permissions granted to the principals (members) defined for the associated IAM policy. If one or more principals have the role property set to roles/owner, roles/editor, and/or roles/documentai.admin, as shown in the example above, the IAM policy associated with the selected Google Cloud Platform (GCP) project is configured with administrative permissions.

05 Repeat steps no. 3 and 4 for each GCP project with Document AI resources, created within your Google Cloud account.

Remediation / Resolution

To ensure that IAM roles with administrative permissions are not used for Document AI resource management, perform the following operations:

Using GCP Console

01 Sign in to the Google Cloud Management Console.

02 Select the Google Cloud Platform (GCP) project that contains your Document AI resources from the console top navigation bar.

03 Navigate to IAM & Admin console available at https://console.cloud.google.com/iam-admin/iam.

04 In the left navigation panel, under IAM & Admin, select IAM.

05 Select the Allow tab and choose View by principals to list all the IAM members (principals) that have access to the selected GCP project.

06 Choose the principal with admin permissions that you want to configure and click on the Edit principal button (i.e., pencil icon) to modify the member permissions. The panel with the principal permissions opens.

07 In the Assign roles section, perform the following actions:

  1. Identify the administrator-based roles (i.e., Owner, Editor, and Document AI Administrator roles) assigned to the selected principal and click on the Delete role button (i.e., bin icon) next to each admin role to remove the role binding.
  2. Choose Add another role and select an IAM role that follows the Principle of Least Privilege (POLP) from the Select a role dropdown list to attach the appropriate role to the selected principal. Use Add another role button to add as many roles as needed, according to the selected identity access requirements.

08 Choose Save to apply the permission changes.

09 Repeat steps no. 3 – 8 for each GCP project with Document AI resources, deployed in your Google Cloud account.

Using GCP CLI

01 Run projects remove-iam-policy-binding command (Windows/macOS/Linux) with the ID of the GCP project that contains your Document AI resources as the identifier parameter, to remove an administrator-based binding (e.g., "roles/documentai.admin") from the IAM policy associated with selected project. Repeat this step for each administrator-based binding configured for your policy:

gcloud projects remove-iam-policy-binding cc-project5-123123
	--member='user:username3@domain.com'
	--role='roles/documentai.admin'

02 The command output should return the modified IAM policy:

bindings:
	- members:
		- serviceAccount:123456789012-compute@developer.gserviceaccount.com
		- user:username1@domain.com
		role: roles/editor
	- members:
		- user:username2@domain.com
		role: roles/owner
	etag: abcd1234abcd
	version: 1

03 Run projects add-iam-policy-binding command (Windows/macOS/Linux) with the ID of the GCP project that contains your Document AI resources as the identifier parameter, to add a new binding to the IAM policy associated with selected project. Use the --role parameter to specify the IAM role required by the selected principal, that follows the Principle of Least Privilege (POLP). As an example, the following command assigns the Document AI Viewer (i.e., roles/documentai.viewer) to the specified principal. The Document AI Viewer role grants access to view all Google Cloud Document AI resources and process documents in Document AI:

gcloud projects add-iam-policy-binding cc-project5-123123
	--member='user:username3@domain.com'
	--role='roles/documentai.viewer'

04 The command output should return the modified IAM policy:

bindings:
	- members:
		- serviceAccount:123456789012-compute@developer.gserviceaccount.com
		- user:username1@domain.com
		role: roles/editor
	- members:
		- user:username2@domain.com
		role: roles/owner
	- members:
		- user:username3@domain.com
		role: roles/documentai.viewer
	etag: abcd1234abcd
	version: 1

05 Repeat steps no. 1 - 4 for each GCP project with Document AI resources, available within your Google Cloud account.

NAME: 123412341234
ORGANIZATION: 112233441122
SCOPES: projects/111122223333
TITLE: cc-org-access-policy
ETAG: abcd1234abcd1234abcd

References

Publication date Jul 28, 2025