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 team is building a CI/CD pipeline with GitHub Actions to deploy a containerized application to Google Kubernetes Engine (GKE) in an application project (app-prod). Container images are stored in Artifact Registry in a separate shared-artifacts project.
Your security requirements specify that you must:
Which configuration should you implement?
This architecture combines Workload Identity Federation for external CI/CD authentication, cross-project Artifact Registry IAM roles, Artifact Analysis with Binary Authorization for supply chain enforcement, and GKE Workload Identity for fine-grained Pod-level access to Google Cloud resources.
roles/artifactregistry.writer to a dedicated pipeline service account lets GitHub Actions push images without granting repository administration or *.setIamPolicy permissions. Granting roles/artifactregistry.reader to the GKE node service account on shared-artifacts enables cross-project image pulls, while GKE Workload Identity restricts each Pod to only the Google Cloud APIs its specific microservice requires.shared-artifacts from runtime workloads in app-prod.Unlike approaches that rely on Kubernetes imagePullSecrets, GOOGLE_APPLICATION_CREDENTIALS key files, or shared node service accounts, this design implements defense in depth across the entire build-to-runtime lifecycle using short-lived, identity-based credentials and automated policy enforcement.
This approach relies on long-lived service account JSON key files, the overly broad roles/editor basic IAM role, Kubernetes imagePullSecrets on the default Kubernetes ServiceAccount, and mounted Kubernetes Secrets to authenticate pipelines, node image pulls, and running Pods.
roles/editor gives the CI/CD pipeline broad write and configuration access across the project—including sensitive permissions—rather than scoping access solely to roles/artifactregistry.writer. In addition, attaching an imagePullSecret to the default Kubernetes ServiceAccount grants pull access to every Pod in the namespace.Editor and Owner violate deployment pipeline security principles because they grant broad permissions across multiple services._json_key credentials in imagePullSecrets and Pod Secrets increases operational overhead and risk of accidental exposure in logs or configuration.You were integrating a legacy, non-OIDC CI/CD tool or an older GKE cluster version without built-in Artifact Registry IAM support, and organizational policy explicitly permitted static service account keys.
Modern GKE clusters support native IAM authentication for Artifact Registry pulls via the node service account and Workload Identity for Pod-to-API authentication, making imagePullSecrets with _json_key unnecessary and less secure.
This setup assigns roles/artifactregistry.admin to the CI/CD service account, uses Artifact Registry download rules to filter image pulls, and configures GOOGLE_APPLICATION_CREDENTIALS environment variables inside application Pods.
GOOGLE_APPLICATION_CREDENTIALS inside a Pod typically points to a mounted service account JSON key file, contradicting the keyless requirement and risking credential exposure through environment inspection or logs.roles/artifactregistry.admin at the project level allows the pipeline to manage repositories and modify repository IAM policies, whereas roles/artifactregistry.writer is sufficient for pushing artifacts.GOOGLE_APPLICATION_CREDENTIALS and mounted key files increases secret management complexity compared to GKE Workload Identity.You needed to block client pulls of specific package versions or tags at the registry layer and were running an external build client that required an explicit GOOGLE_APPLICATION_CREDENTIALS path.
For GKE deployments, Binary Authorization provides the deploy-time policy gate based on Artifact Analysis attestations, while GKE Workload Identity supplies short-lived Application Default Credentials transparently without GOOGLE_APPLICATION_CREDENTIALS key files.
This configuration attaches a shared service account with roles/artifactregistry.admin to CI/CD runner VMs and GKE nodes, uses the Compute Engine default service account for application workloads, and enables passive Artifact Analysis vulnerability scanning.
roles/artifactregistry.admin also gives pipelines and cluster nodes unnecessary permissions to create, delete, and administer repositories and IAM policies.You were setting up an isolated development sandbox where passive vulnerability visibility was sufficient and strict multi-workload separation or deploy-time blocking were not required.
Best practices for CI/CD and GKE security require dedicated service accounts per pipeline, Workload Identity so Pods do not inherit node permissions, and Binary Authorization to convert scan results into enforceable deployment gates.
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