Google Professional Cloud Developer Practice Test 17
Question 160
A developer embeds a service account JSON private key in application source to call a Google Cloud API. 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.
- Approved clients can exchange the expected payloads within latency and compatibility requirements.
- Operational document queries, large objects, and analytic scans use services aligned with their access patterns.
- Authorized operations succeed while unrelated resource access is rejected under least privilege.
Explanation
Correct Answer
D:Authorized operations succeed while unrelated resource access is rejected under least privilege. This is evidence that the particular acceptance condition for service account and least-privilege API identity has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect execution identity, IAM policy bindings, resource scope, and how credentials are obtained at runtime. A developer embeds a service account JSON private key in application source to call a Google Cloud API. The team has tried a correction.
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 service account and least-privilege API identity. It cannot substitute for the required control: authorized operations succeed while unrelated resource access is rejected under least privilege.
B:Approved clients can exchange the expected payloads within latency and compatibility requirements. That result could support testing of REST and gRPC contract choice: REST and gRPC are different interface and transport approaches; a protocol choice must match actual client support and the API contract. It cannot substitute for the required control: authorized operations succeed while unrelated resource access is rejected under least privilege.
C:Operational document queries, large objects, and analytic scans use services aligned with their access patterns. That result could support testing of Firestore versus Cloud Storage versus BigQuery: Document stores, object stores, and analytical warehouses solve different persistence problems even if each can hold serialized data. It cannot substitute for the required control: authorized operations succeed while unrelated resource access is rejected under least privilege.
Question 161
A service stores an external API password in a Git-tracked environment file distributed to every developer. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy.
- Inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity.
- Inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values.
- Inspect authenticated invocation settings, caller service account, token audience, and Cloud Run invoker permissions.
Explanation
Correct Answer
C:Inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values. Success requires that only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. A focused follow-up is to migrate the credential to an approved secret version and test rotation without exposing secret contents in logs.
Incorrect Answers
A:Inspect user geography, regional service availability, dependency placement, measured round-trip latency, and residency policy. A product's regional or zonal scope determines placement, failure exposure, and latency; global branding alone does not guarantee global data residency. The first evidence should address secret manager access and rotation, not this separate diagnostic path.
B:Inspect destination IP, supported VPC region, egress configuration, firewall rules, and service identity. Private VPC egress changes the network path for selected Cloud Run outbound traffic and still requires downstream firewall and identity controls. The first evidence should address secret manager access and rotation, not this separate diagnostic path.
D:Inspect authenticated invocation settings, caller service account, token audience, and Cloud Run invoker permissions. Cloud Run authenticated HTTP invocation validates an identity token audience and caller permissions; generic Google API access tokens are not interchangeable. The first evidence should address secret manager access and rotation, not this separate diagnostic path.
Question 162
A service stores an external API password in a Git-tracked environment file distributed to every developer. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Cache safely recomputable read results in Memorystore while retaining authoritative durable records in the appropriate datastore.
- Place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements.
- Store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity.
- Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule.
Explanation
Correct Answer
C:Store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity. The expected outcome is that only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. Before rollout, inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values.
Incorrect Answers
A: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. The reported condition is about secret manager access and rotation, not this adjacent change.
B:Place application and data resources in supported regions that satisfy locality, resilience, and regulatory requirements. This design addresses regional latency and data placement, where a product's regional or zonal scope determines placement, failure exposure, and latency; global branding alone does not guarantee global data residency. The reported condition is about secret manager access and rotation, not this adjacent change.
D:Use versioned or invalidated cached data with identity-scoped keys and freshness bounds appropriate to the business rule. This design addresses cache freshness and invalidation, where cache invalidation and tenant-aware keying are correctness and security controls, not merely performance tuning. The reported condition is about secret manager access and rotation, not this adjacent change.
Question 163
A service stores an external API password in a Git-tracked environment file distributed to every developer. 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.
- Configure a proof-of-concept policy and verify partner access, API metrics, and operational ownership against requirements.
- Persist the approved order then publish a stable event and implement idempotent consumers with a measured backlog policy.
- Migrate the credential to an approved secret version and test rotation without exposing secret contents in logs.
Explanation
Correct Answer
D:Migrate the credential to an approved secret version and test rotation without exposing secret contents in logs. Validate the change by checking that only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy.
Incorrect Answers
A:Configure caller identity to request a token with the intended audience and test authorized and unauthorized calls. This action changes a different concern, Cloud Run service-to-service identity tokens. Applying it first would leave secret manager access and rotation unresolved.
B: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. Applying it first would leave secret manager access and rotation unresolved.
C:Persist the approved order then publish a stable event and implement idempotent consumers with a measured backlog policy. This action changes a different concern, Pub/Sub decoupled processing architecture. Applying it first would leave secret manager access and rotation unresolved.
Question 164
A service stores an external API password in a Git-tracked environment file distributed to every developer. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy.
- The workload executes the needed steps in the intended order without conflating scheduling, orchestration, and queue delivery.
- The application reaches authorized private resources without unintended public exposure or blanket networking changes.
- Unhealthy backends stop receiving new eligible traffic while healthy capacity serves the request contract.
Explanation
Correct Answer
A:Only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. This is evidence that the particular acceptance condition for secret Manager access and rotation has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values.
Incorrect Answers
B:The workload executes the needed steps in the intended order without conflating scheduling, orchestration, and queue delivery. In this case, the outcome to verify is that only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. That may help elsewhere, but it does not make the change required for secret manager access and rotation.
C: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. That may help elsewhere, but it does not make the change required for secret manager access and rotation.
D:Unhealthy backends stop receiving new eligible traffic while healthy capacity serves the request contract. That result could support testing of backend health and failure routing: A healthy network listener and a healthy application are not necessarily equivalent; routing depends on meaningful health checks. That may help elsewhere, but it does not make the change required for secret manager access and rotation.
Question 165
A secret is rotated in Secret Manager but the application unexpectedly continues using cached old credentials. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values.
- Inspect immutable revision IDs, serving percentages, tag URLs, and rollback targets.
- Inspect whether the requirement is L3/L4 network isolation, L7 routing telemetry, or authenticated service-to-service encryption.
- Inspect Kubernetes ServiceAccount binding, workload identity principal, token audience, and IAM access scope.
Explanation
Correct Answer
A:Inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values. Success requires that only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. A focused follow-up is to migrate the credential to an approved secret version and test rotation without exposing secret contents in logs. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
B:Inspect immutable revision IDs, serving percentages, tag URLs, and rollback targets. Cloud Run revisions are immutable; traffic splitting and revision tags let teams stage, test, and reverse changes without editing an existing revision. The more informative check is to inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values.
C: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. The more informative check is to inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values.
D:Inspect Kubernetes ServiceAccount binding, workload identity principal, token audience, and IAM access scope. GKE Workload Identity Federation associates Kubernetes workload identity with Google IAM permissions without embedding service-account private keys in containers. The more informative check is to inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values.
Question 166
A secret is rotated in Secret Manager but the application unexpectedly continues using cached old credentials. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity.
- Use Identity Platform for supported end-user identity flows and separate application sessions from workload IAM credentials.
- Keep critical session state in an appropriate shared durable store and use affinity only as a performance optimization where justified.
- Select Cloud API Gateway for supported simpler managed gateway use or Apigee when its broader API management features are necessary.
Explanation
Correct Answer
A:Store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity. The expected outcome is that only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. Before rollout, inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values. A secret is rotated in Secret Manager but the application unexpectedly continues using cached old credentials. The team is choosing a sustainable solution.
Incorrect Answers
B:Use Identity Platform for supported end-user identity flows and separate application sessions from workload IAM credentials. This design addresses identity Platform end-user sign-in, where end-user authentication and service-to-service IAM authentication are distinct trust boundaries requiring different tokens and policies. The case instead calls for the following: store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity.
C:Keep critical session state in an appropriate shared durable store and use affinity only as a performance optimization where justified. This design addresses stateless service session design, where autoscaled instances can be ephemeral; affinity does not replace durable shared state or safe per-user authorization. The case instead calls for the following: store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity.
D: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. The case instead calls for the following: store sensitive application credentials in Secret Manager and grant narrowly scoped access to the execution identity.
Question 167
A secret is rotated in Secret Manager but the application unexpectedly continues using cached old credentials. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Configure the intended network and selected egress policy, then validate access to private and public dependencies.
- Configure caller identity to request a token with the intended audience and test authorized and unauthorized calls.
- Migrate the credential to an approved secret version and test rotation without exposing secret contents in logs.
- Integrate the chosen provider, validate ID tokens server-side, and map authorized users to application roles.
Explanation
Correct Answer
C:Migrate the credential to an approved secret version and test rotation without exposing secret contents in logs. Validate the change by checking that only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Configure the intended network and selected egress policy, then validate access to private and public dependencies. This action changes a different concern, private VPC egress from Cloud Run. It cannot substitute for the required control: migrate the credential to an approved secret version and test rotation without exposing secret contents in logs.
B:Configure caller identity to request a token with the intended audience and test authorized and unauthorized calls. This action changes a different concern, Cloud Run service-to-service identity tokens. It cannot substitute for the required control: migrate the credential to an approved secret version and test rotation without exposing secret contents in logs.
D:Integrate the chosen provider, validate ID tokens server-side, and map authorized users to application roles. This action changes a different concern, identity Platform end-user sign-in. It cannot substitute for the required control: migrate the credential to an approved secret version and test rotation without exposing secret contents in logs.
Question 168
A secret is rotated in Secret Manager but the application unexpectedly continues using cached old credentials. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain.
- Only expected events invoke the handler and their metadata is validated before a side effect occurs.
- Repeated delivery yields a single authorized business result with traceable completion or failure state.
- Only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy.
Explanation
Correct Answer
D:Only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. This is evidence that the particular acceptance condition for secret Manager access and rotation has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect secret resource permissions, runtime version selection, rotation timing, and how the application loads values. A secret is rotated in Secret Manager but the application unexpectedly continues using cached old credentials. The team has tried a correction.
Incorrect Answers
A:Untrusted images are rejected while policy-compliant images can be deployed under a recorded approval chain. That result could support testing of binary Authorization deployment policy: Artifact storage and verified deployment authorization are separate; Binary Authorization enforces policy based on artifact trust evidence. It addresses a different dependency from secret manager access and rotation.
B:Only expected events invoke the handler and their metadata is validated before a side effect occurs. In this case, the outcome to verify is that only authorized workloads retrieve approved secret versions, and the service adopts rotations according to policy. It addresses a different dependency from secret manager access and rotation.
C:Repeated delivery yields a single authorized business result with traceable completion or failure state. That result could support testing of retry-safe application side effects: Transient retries and at-least-once event delivery do not imply exactly-once business effects without an idempotent application design. It addresses a different dependency from secret manager access and rotation.
Question 169
A payment service must control its encryption-key versions yet a developer proposes treating a key resource as an ordinary string secret. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect end-user sign-in provider requirements, token validation, session lifecycle, and runtime service identity.
- Inspect whether the requirement is storing an API credential or managing cryptographic keys and their rotation permissions.
- Inspect transaction scope, SQL query needs, global replication, throughput, data size, and indexing patterns.
- Inspect required authentication, quota policy, developer-portal features, routing, and API product governance.
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.
Incorrect Answers
A:Inspect end-user sign-in provider requirements, token validation, session lifecycle, and runtime service identity. End-user authentication and service-to-service IAM authentication are distinct trust boundaries requiring different tokens and policies. The relevant dependency is cloud kms and encryption key lifecycle, which this inspection alone does not establish.
C:Inspect transaction scope, SQL query needs, global replication, throughput, data size, and indexing patterns. Cloud SQL, Spanner, and Bigtable differ in data model and transaction guarantees; no one product is optimal for all workloads. The relevant dependency is cloud kms and encryption key lifecycle, which this inspection alone does not establish.
D:Inspect required authentication, quota policy, developer-portal features, routing, and API product governance. A basic managed gateway and a full API management platform overlap in routing but differ in breadth of policy, analytics, and developer lifecycle. The relevant dependency is cloud kms and encryption key lifecycle, which this inspection alone does not establish.
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.