Google Professional Cloud Developer Practice Test 18
Question 170
A payment service must control its encryption-key versions yet a developer proposes treating a key resource as an ordinary string secret. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage.
- Select Cloud API Gateway for supported simpler managed gateway use or Apigee when its broader API management features are necessary.
- Cache safely recomputable read results in Memorystore while retaining authoritative durable records in the appropriate datastore.
- Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment.
Explanation
Correct Answer
A:Use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage. In this scenario, a payment service must control its encryption-key versions yet a developer proposes treating a key resource as an ordinary string secret. Before rollout, inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
Incorrect Answers
B:Select Cloud API Gateway for supported simpler managed gateway use or Apigee when its broader API management features are necessary. This design addresses API Gateway versus Apigee responsibilities, where a basic managed gateway and a full API management platform overlap in routing but differ in breadth of policy, analytics, and developer lifecycle. Applying it first would leave cloud kms and encryption key lifecycle unresolved.
C:Cache safely recomputable read results in Memorystore while retaining authoritative durable records in the appropriate datastore. This design addresses memorystore cache for hot data, where an in-memory cache accelerates repeated reads but must not be mistaken for a durable system of record. Applying it first would leave cloud kms and encryption key lifecycle unresolved.
D:Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment. This design addresses binary Authorization deployment policy, where artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. Applying it first would leave cloud kms and encryption key lifecycle unresolved.
Question 171
A payment service must control its encryption-key versions yet a developer proposes treating a key resource as an ordinary string secret. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Configure a proof-of-concept policy and verify partner access, API metrics, and operational ownership against requirements.
- Measure cost and latency under representative burst and idle patterns and deploy appropriate scaling controls.
- Configure claim conditions and tightly scoped impersonation, then test valid and invalid CI identities.
- Configure the approved key ring, key permissions, and key-rotation plan, then test authorized encrypt/decrypt operations.
Explanation
Correct Answer
D:Configure the approved key ring, key permissions, and key-rotation plan, then test authorized encrypt/decrypt operations. In this scenario, a payment service must control its encryption-key versions yet a developer proposes treating a key resource as an ordinary string secret. Validate the change by checking that key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material.
Incorrect Answers
A:Configure a proof-of-concept policy and verify partner access, API metrics, and operational ownership against requirements. This action changes a different concern, API Gateway versus Apigee responsibilities. That may help elsewhere, but it does not make the change required for cloud kms and encryption key lifecycle.
B:Measure cost and latency under representative burst and idle patterns and deploy appropriate scaling controls. This action changes a different concern, Cloud Run scaling and cost guardrails. That may help elsewhere, but it does not make the change required for cloud kms and encryption key lifecycle.
C:Configure claim conditions and tightly scoped impersonation, then test valid and invalid CI identities. This action changes a different concern, external CI Workload Identity Federation. That may help elsewhere, but it does not make the change required for cloud kms and encryption key lifecycle.
Question 172
A payment service must control its encryption-key versions yet a developer proposes treating a key resource as an ordinary string secret. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- User state remains correct during scale-out, failover, and rollout even if a subsequent request reaches another instance.
- The API control plane enforces necessary policies without a complexity gap or missing governance feature.
- Key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material.
- The allowed caller invokes the private service successfully while requests without valid identity are denied.
Explanation
Correct Answer
C:Key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material. In this scenario, a payment service must control its encryption-key versions yet a developer proposes treating a key resource as an ordinary string secret. The original diagnosis should have included this step: inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
Incorrect Answers
A:User state remains correct during scale-out, failover, and rollout even if a subsequent request reaches another instance. That result could support testing of session affinity limitations: Affinity influences routing preferences but cannot guarantee durable state or prevent all changes in backend selection. A more direct response is to recognize that key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material.
B:The API control plane enforces necessary policies without a complexity gap or missing governance feature. That result could support testing of API Gateway versus Apigee responsibilities: A basic managed gateway and a full API management platform overlap in routing but differ in breadth of policy, analytics, and developer lifecycle. A more direct response is to recognize that key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material.
D:The allowed caller invokes the private service successfully while requests without valid identity are denied. That result could support testing of Cloud Run service-to-service identity tokens: Cloud Run authenticated HTTP invocation validates an identity token audience and caller permissions; generic Google API access tokens are not interchangeable. A more direct response is to recognize that key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material.
Question 173
A team needs to rotate a customer-managed encryption key and verify dependent data remains decryptable under its planned policy. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect producer and consumer latency, durability, delivery retries, and whether side effects require synchronous confirmation.
- Inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
- Inspect compute placement, dependency replication, backups, failover prerequisites, and recovery objectives.
- Inspect affinity configuration, revision traffic allocation, session data dependencies, and failover behavior.
Explanation
Correct Answer
B:Inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions. This checks the actual operating conditions relevant to Cloud KMS and encryption key lifecycle, rather than changing a service before the failure is understood. A focused follow-up is to configure the approved key ring, key permissions, and key-rotation plan, then test authorized encrypt/decrypt operations. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect producer and consumer latency, durability, delivery retries, and whether side effects require synchronous confirmation. Publish-subscribe messaging decouples production from consumption but consumers still need retry-safe processing and eventual completion visibility. To examine the reported mechanism, the team instead needs to inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
C:Inspect compute placement, dependency replication, backups, failover prerequisites, and recovery objectives. Spreading compute across zones does not automatically replicate state or guarantee continuity after a region-wide disruption. To examine the reported mechanism, the team instead needs to inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
D:Inspect affinity configuration, revision traffic allocation, session data dependencies, and failover behavior. Affinity influences routing preferences but cannot guarantee durable state or prevent all changes in backend selection. To examine the reported mechanism, the team instead needs to inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
Question 174
A team needs to rotate a customer-managed encryption key and verify dependent data remains decryptable under its planned policy. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Kubernetes NetworkPolicy for supported traffic isolation and a supported service mesh for additional service-level controls.
- Generate time-limited Cloud Storage signed URLs scoped to the intended object and operation instead of exposing a broad credential.
- Use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage.
- Use Workload Identity Federation for GKE to provide keyless workload access limited to intended Google resources.
Explanation
Correct Answer
C:Use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage. The expected outcome is that key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material. Before rollout, inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
Incorrect Answers
A:Use Kubernetes NetworkPolicy for supported traffic isolation and a supported service mesh for additional service-level controls. This design addresses service mesh versus network policy, where network policies and service meshes operate at different levels; allowing or denying packets does not automatically implement mutual TLS or service observability. It cannot substitute for the required control: use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage.
B:Generate time-limited Cloud Storage signed URLs scoped to the intended object and operation instead of exposing a broad credential. In this scenario, a team needs to rotate a customer-managed encryption key and verify dependent data remains decryptable under its planned policy. It cannot substitute for the required control: use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage.
D:Use Workload Identity Federation for GKE to provide keyless workload access limited to intended Google resources. This design addresses GKE Workload Identity Federation, where GKE Workload Identity Federation associates Kubernetes workload identity with Google IAM permissions without embedding service-account private keys in containers. It cannot substitute for the required control: use Cloud KMS for supported cryptographic key operations and lifecycle controls, rather than confusing it with Secret Manager storage.
Question 175
A team needs to rotate a customer-managed encryption key and verify dependent data remains decryptable under its planned policy. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Implement the matching service, record its retry or schedule settings, and verify failure and completion paths.
- Configure the approved key ring, key permissions, and key-rotation plan, then test authorized encrypt/decrypt operations.
- Prototype the shortlisted runtime with the real container, platform permissions, and scaling limits before migrating traffic.
- Configure a proof-of-concept policy and verify partner access, API metrics, and operational ownership against requirements.
Explanation
Correct Answer
B:Configure the approved key ring, key permissions, and key-rotation plan, then test authorized encrypt/decrypt operations. In this scenario, a team needs to rotate a customer-managed encryption key and verify dependent data remains decryptable under its planned policy. Validate the change by checking that key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material.
Incorrect Answers
A:Implement the matching service, record its retry or schedule settings, and verify failure and completion paths. This action changes a different concern, Workflows versus Cloud Tasks versus Scheduler. It addresses a different dependency from cloud kms and encryption key lifecycle.
C:Prototype the shortlisted runtime with the real container, platform permissions, and scaling limits before migrating traffic. This action changes a different concern, Cloud Run versus GKE versus Compute Engine. It addresses a different dependency from cloud kms and encryption key lifecycle.
D:Configure a proof-of-concept policy and verify partner access, API metrics, and operational ownership against requirements. This action changes a different concern, API Gateway versus Apigee responsibilities. It addresses a different dependency from cloud kms and encryption key lifecycle.
Question 176
A team needs to rotate a customer-managed encryption key and verify dependent data remains decryptable under its planned policy. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material.
- The origin remains authoritative and read latency improves without losing business records when the cache is empty.
- User state remains correct during scale-out, failover, and rollout even if a subsequent request reaches another instance.
- The application reaches authorized private resources without unintended public exposure or blanket networking changes.
Explanation
Correct Answer
A:Key governance and cryptographic operations work under intended IAM restrictions without disclosing raw key material. This is evidence that the particular acceptance condition for Cloud KMS and encryption key lifecycle has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
Incorrect Answers
B:The origin remains authoritative and read latency improves without losing business records when the cache is empty. That result could support testing of memorystore cache for hot data: An in-memory cache accelerates repeated reads but must not be mistaken for a durable system of record. The reported condition is about cloud kms and encryption key lifecycle, not this adjacent change.
C:User state remains correct during scale-out, failover, and rollout even if a subsequent request reaches another instance. That result could support testing of session affinity limitations: Affinity influences routing preferences but cannot guarantee durable state or prevent all changes in backend selection. The reported condition is about cloud kms and encryption key lifecycle, not this adjacent change.
D:The application reaches authorized private resources without unintended public exposure or blanket networking changes. That result could support testing of private VPC egress from Cloud Run: Private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. The reported condition is about cloud kms and encryption key lifecycle, not this adjacent change.
Question 177
One private Cloud Run service returns HTTP 401 when another invokes it with an unrelated OAuth access token. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect per-instance simultaneous requests, CPU saturation, memory pressure, tail latency, and autoscaling metrics.
- Inspect hot-key access frequency, database load, cache hit rate, data criticality, and eviction or expiry behavior.
- Inspect authenticated invocation settings, caller service account, token audience, and Cloud Run invoker permissions.
- Inspect whether the requirement is L3/L4 network isolation, L7 routing telemetry, or authenticated service-to-service encryption.
Explanation
Correct Answer
C:Inspect authenticated invocation settings, caller service account, token audience, and Cloud Run invoker permissions. This checks the actual operating conditions relevant to Cloud Run service-to-service identity tokens, rather than changing a service before the failure is understood. A focused follow-up is to configure caller identity to request a token with the intended audience and test authorized and unauthorized calls.
Incorrect Answers
A:Inspect per-instance simultaneous requests, CPU saturation, memory pressure, tail latency, and autoscaling metrics. Cloud Run concurrency bounds concurrent requests handled by an instance; optimal settings depend on whether its code is CPU-bound, I/O-bound, or stateful. This is not the decisive inspection for cloud run service-to-service identity tokens.
B:Inspect hot-key access frequency, database load, cache hit rate, data criticality, and eviction or expiry behavior. An in-memory cache accelerates repeated reads but must not be mistaken for a durable system of record. This is not the decisive inspection for cloud run service-to-service identity tokens.
D:Inspect whether the requirement is L3/L4 network isolation, L7 routing telemetry, or authenticated service-to-service encryption. Network policies and service meshes operate at different levels; allowing or denying packets does not automatically implement mutual TLS or service observability. This is not the decisive inspection for cloud run service-to-service identity tokens.
Question 178
One private Cloud Run service returns HTTP 401 when another invokes it with an unrelated OAuth access token. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use an appropriate Google-signed identity token for the target URL plus minimum Cloud Run Invoker authorization.
- Use an appropriate external Application Load Balancer with URL routing instead of treating DNS records as layer-seven routing policies.
- Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment.
- Publish durable business events through Pub/Sub and let independent subscribers process appropriate downstream work asynchronously.
Explanation
Correct Answer
A:Use an appropriate Google-signed identity token for the target URL plus minimum Cloud Run Invoker authorization. This is the bounded design decision for Cloud Run service-to-service identity tokens, not a general request to widen access or replace unrelated resources. Before rollout, inspect authenticated invocation settings, caller service account, token audience, and Cloud Run invoker permissions.
Incorrect Answers
B:Use an appropriate external Application Load Balancer with URL routing instead of treating DNS records as layer-seven routing policies. This design addresses external application load balancer routing, where application load balancing can apply HTTP host and path rules; DNS resolution alone cannot implement those backend routing decisions. That may help elsewhere, but it does not make the change required for cloud run service-to-service identity tokens.
C:Use Binary Authorization policies and supported attestations to enforce approved container promotion at deployment. This design addresses binary Authorization deployment policy, where artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. That may help elsewhere, but it does not make the change required for cloud run service-to-service identity tokens.
D:Publish durable business events through Pub/Sub and let independent subscribers process appropriate downstream work asynchronously. This design addresses Pub/Sub decoupled processing architecture, where publish-subscribe messaging decouples production from consumption but consumers still need retry-safe processing and eventual completion visibility. That may help elsewhere, but it does not make the change required for cloud run service-to-service identity tokens.
Question 179
One private Cloud Run service returns HTTP 401 when another invokes it with an unrelated OAuth access token. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Configure caller identity to request a token with the intended audience and test authorized and unauthorized calls.
- Create an appropriately signed URL with short expiration and test allowed and disallowed methods or objects.
- Persist a unique operation key before the side effect and test repeated messages and interrupted acknowledgments.
- Benchmark representative clients and validate the region of every persistent data replica and downstream dependency.
Explanation
Correct Answer
A:Configure caller identity to request a token with the intended audience and test authorized and unauthorized calls. Validate the change by checking that the allowed caller invokes the private service successfully while requests without valid identity are denied.
Incorrect Answers
B:Create an appropriately signed URL with short expiration and test allowed and disallowed methods or objects. This action changes a different concern, Cloud Storage signed URL access. A more direct response is to configure caller identity to request a token with the intended audience and test authorized and unauthorized calls.
C:Persist a unique operation key before the side effect and test repeated messages and interrupted acknowledgments. This action changes a different concern, retry-safe application side effects. A more direct response is to configure caller identity to request a token with the intended audience and test authorized and unauthorized calls.
D:Benchmark representative clients and validate the region of every persistent data replica and downstream dependency. This action changes a different concern, regional latency and data placement. A more direct response is to configure caller identity to request a token with the intended audience and test authorized and unauthorized calls.
Question 180
One private Cloud Run service returns HTTP 401 when another invokes it with an unrelated OAuth access token. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The workload executes the needed steps in the intended order without conflating scheduling, orchestration, and queue delivery.
- The allowed caller invokes the private service successfully while requests without valid identity are denied.
- The selected runtime meets the application contract without hidden node-management or host-customization gaps.
- The origin remains authoritative and read latency improves without losing business records when the cache is empty.
Explanation
Correct Answer
B:The allowed caller invokes the private service successfully while requests without valid identity are denied. This is evidence that the particular acceptance condition for Cloud Run service-to-service identity tokens has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect authenticated invocation settings, caller service account, token audience, and Cloud Run invoker permissions.
Incorrect Answers
A:The workload executes the needed steps in the intended order without conflating scheduling, orchestration, and queue delivery. It would not establish the success condition for Cloud Run service-to-service identity tokens. The case instead calls for the following: the allowed caller invokes the private service successfully while requests without valid identity are denied.
C:The selected runtime meets the application contract without hidden node-management or host-customization gaps. It would not establish the success condition for Cloud Run service-to-service identity tokens. The case instead calls for the following: the allowed caller invokes the private service successfully while requests without valid identity are denied.
D:The origin remains authoritative and read latency improves without losing business records when the cache is empty. That result could support testing of memorystore cache for hot data: An in-memory cache accelerates repeated reads but must not be mistaken for a durable system of record. The case instead calls for the following: the allowed caller invokes the private service successfully while requests without valid identity are denied.