Question

Difficulty: EasyManaging IAM Roles and Resource Access Permissions

An administrator needs to configure granular, least-privilege access for an auditor who requires read access to application logs in a Google Cloud project. Put the following steps in the correct logical order to safely create and assign a custom IAM role.

  1. 1Identify the exact granular permissions required by the auditor to view application logs.
  2. 2Create the custom IAM role at the project level specifying the identified permissions.
  3. 3Add an IAM policy binding to grant the newly created custom IAM role to the auditor's identity.
  4. 4Test and verify that the auditor can access the logs without having excess permissions.

Answer

The correct sequence starts with identifying the required granular permissions, followed by creating the custom IAM role at the project level, binding the role to the auditor's identity, and finally verifying that least-privilege access is functioning properly.
Following Google Cloud security best practices for custom IAM management requires establishing the least-privilege permission list first. Once the exact permissions are identified, the custom IAM role is formally created at the project level. Next, the administrator binds this custom role to the user's identity. Finally, access is verified to ensure compliance and proper functionality.

Step-by-Step Solution

1
Determine required granular permissions
A specific list of permissions (such as logging.viewer) is identified.
You must know what specific permissions are needed before bundling them into a role.
2
Create the custom role definition
A project-level custom IAM role containing only the required permissions is provisioned.
Custom roles must exist within the resource hierarchy before they can be assigned.
3
Bind the role to the principal
An IAM policy binding connects the custom role to the auditor's Google account or service account.
Permissions take effect for a user only when an explicit policy binding is established.
4
Verify access
Auditor access is tested to confirm intended permissions are granted without extraneous access.
Verification ensures administrative accuracy and compliance with least-privilege best practices.

Key Concept

Custom IAM Role Creation and Lifecycle Management
Rate this question