Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Security Engineer practice bank has 1,343 more like it. Try 10 free: instant score, no account.
A security engineer is configuring Workforce Identity Federation to grant external security analysts access to Google Cloud resources in a project named analytics-prod. The identity provider (IdP) is integrated via an organization-level workforce pool named corp-analysts-pool.
The engineer must satisfy the following requirements:
roles/storage.objectViewer) to all users belonging to the IdP group sec-analysts.Which configuration should the security engineer apply?
The identifier syntax containing projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/... is specifically designed for Workload Identity Federation, which federates machine and software workloads (such as GitHub Actions, AWS EC2, or Kubernetes clusters) rather than human workforce members. The --service-account-token-lifetime-seconds flag is used when creating client credential configurations for service account impersonation in workload pipelines.
projects/PROJECT_NUMBER/.../workloadIdentityPools/... targets workload pools and will fail to authenticate human workforce users.--service-account-token-lifetime-seconds setting applies only to service account token generation in workload credential exchange files, not to human user sign-in sessions on the Google Cloud console or gcloud CLI.locations/global/workforcePools/POOL_ID without project IDs or numbers.A machine workload running in an external cloud needed to impersonate a service account using a workload identity pool credential configuration file with a custom token expiration.
The group:group-email@domain.com syntax is used exclusively for Google Groups created in Cloud Identity or Google Workspace. Workforce Identity Federation does not synchronize groups into Cloud Identity, nor does it create virtual service account email addresses for IdP groups. Furthermore, the workforce pool provider sub-resource defines protocol details (OIDC/SAML metadata, client IDs, attribute conditions), not the top-level session duration.
principalSet://iam.googleapis.com/... syntax.--session-duration flag is a property of the parent workforce identity pool (gcloud iam workforce-pools create/update), not the child identity pool provider (gcloud iam workforce-pools providers create-oidc/create-saml).The organization were using Google Cloud Directory Sync (GCDS) to sync Microsoft Active Directory groups directly into Cloud Identity as standard Google Groups.
Workforce Identity Federation allows users managed in an external IdP (such as Microsoft Entra ID or Okta) to access Google Cloud resources directly without synchronizing user accounts into Cloud Identity. Group-based access is granted by referencing the mapped google.groups attribute using a specific principalSet:// resource identifier format under the organization-scoped workforce identity pool. The session duration setting manages the credential lifecycle and controls how long federated sessions and security tokens remain valid.
google.groups, IAM requires the principalSet:// prefix targeting the workforce pool resource path followed by /group/GROUP_ID. Specifically, principalSet://iam.googleapis.com/locations/global/workforcePools/corp-analysts-pool/group/sec-analysts ensures all analysts within that group inherit roles/storage.objectViewer on analytics-prod.--session-duration=14400s (4 hours) at the workforce identity pool level directly governs the maximum lifetime of issued Google Cloud access tokens, federated web console sign-in sessions, and gcloud CLI sessions. Google Cloud supports workforce pool session durations between 15 minutes (900s) and 12 hours (43200s), making 14,400 seconds valid.gcloud CLI) access pathways.locations/global/workforcePools/), avoiding hardcoded project numbers in member identifiers.This approach uses the exact workforce pool principal identifier syntax and leverages the native --session-duration parameter on the workforce pool resource to enforce access boundaries and credential lifecycles cleanly.
The principal:// scheme prefix (in the singular) is reserved strictly for single distinct subjects (such as an individual user mapped to google.subject), while principalSet:// must be used for collections of identities like groups or attribute mappings. The constraints/iam.allowServiceAccountCredentialLifetimeExtension organization policy constraint is used to allow service account access tokens to exceed the standard 1-hour limit up to a maximum of 12 hours.
principal://. Attempting to use principal://.../group/... results in an invalid IAM member syntax error because groups represent a principal set.principal:// is strictly for individual subjects (/subject/SUBJECT_VALUE), whereas principalSet:// is required for groups (/group/GROUP_ID), attribute mappings (/attribute.KEY/VALUE), and wildcards (/*).--session-duration.You were binding a role to a single individual subject and managing extended token lifetimes for automated service accounts across the organization.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated