Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
An enterprise DevOps team manages deployment pipelines for microservices running across development, staging, and production namespaces in a Cloud Service Mesh on Google Kubernetes Engine (GKE). To satisfy strict security and compliance standards, the team must implement environment-aware access controls:
production, services must only accept traffic from workloads authenticated with the specific production service account identity (spiffe://cluster.local/ns/prod/sa/prod-runner-sa).production must enforce least privilege and deny all unauthorized communication by default.Which Cloud Service Mesh policy strategy should the team implement in the production namespace?
An AuthorizationPolicy in Cloud Service Mesh (built on Istio) provides fine-grained, declarative access control for workloads at the service mesh layer. It allows administrators to enforce identity-based access control policies using authenticated service account identities across different namespaces and environments. By combining workload selectors, source identity verification (principals), and transport-level security, Cloud Service Mesh enforces the principle of least privilege.
action: ALLOW and defines rules.from.source.principals with the SPIFFE identity corresponding to prod-runner-sa. Only workloads authenticated with that specific service account identity are granted access.DENY policy matching notPrincipals: ["*"], requests lacking a validated cryptographic identity (such as plaintext requests with empty principal headers) are denied before reaching the application.ALLOW policy is applied to a workload, an implicit default-deny rule is enforced. Any traffic not matching the specified rules and principals is automatically denied.DENY policies before ALLOW policies to guarantee security guardrails.This approach directly leverages Cloud Service Mesh's identity extraction and policy engine. It guarantees that development and staging identities cannot invoke production workloads, and that unauthenticated or unapproved principals are rejected by default.
An AuthorizationPolicy configured with action: ALLOW and an empty rules list (rules: - {}) functions as an allow-all policy. It grants full, unrestricted access to the target workload from any client within or outside the service mesh, regardless of authenticated identity, namespace, or transport method.
ALLOW policies by allowing every incoming request.You needed to temporarily open full access to a non-critical development service for troubleshooting purposes while diagnostic tests are actively being executed.
The roles/container.serviceAgent role is a specialized Google Cloud Identity and Access Management (IAM) role intended exclusively for Google-managed Kubernetes Engine service agents to manage cluster infrastructure (such as compute resources, disks, and load balancers).
service-PROJECT_NUMBER@container-engine-robot.iam.gserviceaccount.com).development, staging, and production workloads.You were troubleshooting internal Google Kubernetes Engine control plane provisioning issues where the underlying platform service agent had its default bindings accidentally revoked.
An AuthorizationPolicy with action: ALLOW without rules functions as an allow-nothing policy that denies all traffic, whereas a DENY policy with empty match criteria (rules: - {}) blocks all incoming traffic unconditionally. Meanwhile, roles/iam.securityAdmin is a Google Cloud project-level IAM role that manages IAM policies.
prod-runner-sa service account, from communicating with production endpoints.roles/iam.securityAdmin manage Google Cloud resource access; they do not bypass or override Cloud Service Mesh envoy sidecar authorization rules in the GKE data plane.roles/iam.securityAdmin to developers gives them administrative control over security policies across the Google Cloud project, violating least privilege.DENY policies take absolute precedence over ALLOW policies in the Cloud Service Mesh decision tree.DENY rule (deny-all) blocks 100% of requests, causing complete service downtime.You needed to execute an emergency shutdown or quarantine of a compromised production microservice to immediately prevent any incoming or outgoing network traffic.
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