Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
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?
Deploy an AuthorizationPolicy configured with action ALLOW and an empty rules list (rules: - {}), and rely on standard Kubernetes NetworkPolicies to filter source IP addresses.
Deploy an AuthorizationPolicy with action ALLOW scoped to the workload selector that explicitly matches the prod-runner-sa principal under rules.from.source.principals, combined with STRICT mutual TLS (mTLS) or a DENY policy matching notPrincipals: ["*"].
Configure an AuthorizationPolicy with action DENY containing an empty spec (allow-nothing) and assign developers the roles/iam.securityAdmin role to bypass mesh enforcement.
Grant the Google Cloud predefined role roles/container.serviceAgent directly to developer human identities and the prod-runner-sa service account at the production project level.
Deploy an AuthorizationPolicy configured with action ALLOW and an empty rules list (rules: - {}), and rely on standard Kubernetes NetworkPolicies to filter source IP addresses.
Deploy an AuthorizationPolicy with action ALLOW scoped to the workload selector that explicitly matches the prod-runner-sa principal under rules.from.source.principals, combined with STRICT mutual TLS (mTLS) or a DENY policy matching notPrincipals: ["*"].
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.
Configure an AuthorizationPolicy with action DENY containing an empty spec (allow-nothing) and assign developers the roles/iam.securityAdmin role to bypass mesh enforcement.
Grant the Google Cloud predefined role roles/container.serviceAgent directly to developer human identities and the prod-runner-sa service account at the production project level.