Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your engineering team uses GitHub Actions pipelines to deploy microservices to Google Cloud and push container images to Artifact Registry. Currently, the pipelines authenticate using user-managed service account JSON keys stored as repository secrets, which exposes the organization to credential leakage and makes auditing individual pipeline activity difficult.
You need to redesign your service account authentication strategy to meet these requirements:
Which authentication strategy should you implement?
Secret Manager is a centralized Google Cloud service for storing, versioning, and controlling access to sensitive configuration data such as third-party API keys, database passwords, and TLS certificates.
iam.serviceAccountKeys.create permissions to remain enabled, directly conflicting with the requirement to block new key creation across projects.Your pipelines needed to retrieve non-Google Cloud secrets—such as third-party SaaS API tokens or database credentials—after authenticating to Google Cloud via Workload Identity Federation.
When a service account is attached to a Google Cloud compute resource such as a Compute Engine VM, workloads on that VM can automatically obtain short-lived credentials from the instance metadata server using Application Default Credentials (ADC). By default, Compute Engine creates a default service account granted the broad roles/editor basic role.
roles/editor) by default.constraints/iam.disableServiceAccountKeyCreation across projects.You were deploying a single-purpose production application on Compute Engine using a dedicated user-managed service account scoped strictly to that workload's required permissions.
roles/iam.workloadIdentityUser to dedicated single-purpose service accounts per pipeline, and enforce the constraints/iam.disableServiceAccountKeyCreation organization policy.Workload Identity Federation allows external workloads—such as CI/CD pipelines running in GitHub Actions—to exchange native OpenID Connect (OIDC) tokens from an external identity provider for short-lived Google Cloud access tokens via the Security Token Service (STS). Combined with organization policy constraints, this establishes a keyless, least-privilege authentication architecture.
roles/iam.workloadIdentityUser only to specific external identities ensures least-privilege isolation and clear attribution (principalEmail and serviceAccountDelegationInfo) in Cloud Audit Logs.constraints/iam.disableServiceAccountKeyCreation at the organization or folder level prevents principals—even those with Editor or Owner roles on projects—from generating new user-managed keys.google.subject mapped from the pipeline's OIDC claims.Unlike key rotation, secret vaults, or shared VM identities, Workload Identity Federation completely removes persistent private keys from external environments while maintaining strict per-pipeline authorization boundaries and organization-wide governance.
constraints/iam.serviceAccountKeyExpiryHours organization policy constraint with a 24-hour expiration, and update each pipeline to generate a new user-managed service account key before deployment.The constraints/iam.serviceAccountKeyExpiryHours organization policy constraint limits the maximum lifetime (in hours) of newly created user-managed service account keys rather than allowing keys to remain valid indefinitely by default.
constraints/iam.serviceAccountKeyExpiryHours and let pipelines generate keys before each run, you must stop enforcing constraints/iam.disableServiceAccountKeyCreation. This violates the requirement to block new key creation.iam.serviceAccountKeys.create permission.You were supporting a temporary non-production development environment or a legacy third-party tool that cannot use Workload Identity Federation and strictly requires short-term user-managed keys.
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