Google Professional Cloud Developer Practice Test 49
Question 480
A developer grants a human user's permissions to a service rather than using a dedicated service identity. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Interactive requests terminate predictably while long jobs complete independently with verifiable status.
- The job invokes the private endpoint on schedule without requiring a persistent cron process in a scale-to-zero service.
- The service accesses only approved data and does not inherit a developer's broad personal permissions.
- Replica scaling follows the target utilization and keeps application capacity within tested bounds.
Explanation
Correct Answer
C:The service accesses only approved data and does not inherit a developer's broad personal permissions. In this scenario, a developer grants a human user's permissions to a service rather than using a dedicated service identity. The original diagnosis should have included this step: inspect revision service account, actual access tokens, target resource permissions, and who invokes the service.
Incorrect Answers
A:Interactive requests terminate predictably while long jobs complete independently with verifiable status. It would not establish the success condition for Cloud Run execution identity attachment. A more direct response is to recognize that the service accesses only approved data and does not inherit a developer's broad personal permissions.
B:The job invokes the private endpoint on schedule without requiring a persistent cron process in a scale-to-zero service. That result could support testing of Cloud Scheduler invoking a private service: Cloud Scheduler triggers work on a schedule, while Cloud Run request containers are not a reliable place to run an always-on system cron daemon. A more direct response is to recognize that the service accesses only approved data and does not inherit a developer's broad personal permissions.
D:Replica scaling follows the target utilization and keeps application capacity within tested bounds. It would not establish the success condition for Cloud Run execution identity attachment. A more direct response is to recognize that the service accesses only approved data and does not inherit a developer's broad personal permissions.
Question 481
An internal-only administration endpoint is publicly accessible because IAM authentication alone was confused with network ingress control. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
- Inspect Eventarc trigger source, region, filters, destination service, and trigger identity permissions.
- Inspect revision history, current traffic percentages, error rates, and verified rollback candidates.
- Inspect Pod labels, Service selectors, Service type, ingress configuration, and security boundary requirements.
Explanation
Correct Answer
A:Inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. A focused follow-up is to apply the intended ingress mode and test calls from approved internal and unapproved external locations.
Incorrect Answers
B:Inspect Eventarc trigger source, region, filters, destination service, and trigger identity permissions. Eventarc event routing requires compatible source filters, destination connectivity, and authorized trigger identity. To examine the reported mechanism, the team instead needs to inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
C:Inspect revision history, current traffic percentages, error rates, and verified rollback candidates. Cloud Run rollbacks manipulate traffic allocation among existing revisions rather than rewriting the contents of a released revision. To examine the reported mechanism, the team instead needs to inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
D:Inspect Pod labels, Service selectors, Service type, ingress configuration, and security boundary requirements. A Deployment manages Pods, a Service provides stable routing to selected Pods, and ingress determines supported external HTTP entry. To examine the reported mechanism, the team instead needs to inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
Question 482
An internal-only administration endpoint is publicly accessible because IAM authentication alone was confused with network ingress control. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public.
- Configure supported HPA metrics and replica bounds with meaningful CPU requests or other validated measurements.
- Set resource requests for scheduling needs and limits for safe containment based on observed workload usage.
- Use an appropriate Kubernetes Service and controlled ingress or load-balancer configuration for the required audience.
Explanation
Correct Answer
A:Set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. Before rollout, inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
Incorrect Answers
B:Configure supported HPA metrics and replica bounds with meaningful CPU requests or other validated measurements. For this case, ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. It cannot substitute for the required control: set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public.
C:Set resource requests for scheduling needs and limits for safe containment based on observed workload usage. This design addresses GKE resource requests and limits, where Kubernetes requests influence scheduling and resource guarantees, while limits bound usage and can cause throttling or out-of-memory termination. It cannot substitute for the required control: set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public.
D:Use an appropriate Kubernetes Service and controlled ingress or load-balancer configuration for the required audience. This design addresses GKE Service and ingress exposure, where a Deployment manages Pods, a Service provides stable routing to selected Pods, and ingress determines supported external HTTP entry. It cannot substitute for the required control: set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public.
Question 483
An internal-only administration endpoint is publicly accessible because IAM authentication alone was confused with network ingress control. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic.
- Apply the intended ingress mode and test calls from approved internal and unapproved external locations.
- Bind the correct Kubernetes identity and scoped storage permissions, and verify API calls in a fresh Pod.
- Deploy a test revision from the approved source and examine the build logs and resolved container digest.
Explanation
Correct Answer
B:Apply the intended ingress mode and test calls from approved internal and unapproved external locations. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. Validate the change by checking that only authorized network paths can reach the service, with authentication still enforced where required.
Incorrect Answers
A:Deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic. This action changes a different concern, Cloud Run environment configuration revisions. It addresses a different dependency from cloud run ingress restriction.
C:Bind the correct Kubernetes identity and scoped storage permissions, and verify API calls in a fresh Pod. This action changes a different concern, GKE pod identity without key files. It addresses a different dependency from cloud run ingress restriction.
D:Deploy a test revision from the approved source and examine the build logs and resolved container digest. This action changes a different concern, Cloud Run source deployment path. It addresses a different dependency from cloud run ingress restriction.
Question 484
An internal-only administration endpoint is publicly accessible because IAM authentication alone was confused with network ingress control. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The workload uses short-lived authorized identity and can access only intended buckets without key material in manifests.
- Authorized push deliveries succeed without exposing the handler publicly or masking errors through silent acknowledgments.
- Both destination classes follow the approved routes and network controls without leaking private endpoints.
- Only authorized network paths can reach the service, with authentication still enforced where required.
Explanation
Correct Answer
D:Only authorized network paths can reach the service, with authentication still enforced where required. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. The original diagnosis should have included this step: inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
Incorrect Answers
A:The workload uses short-lived authorized identity and can access only intended buckets without key material in manifests. That result could support testing of GKE pod identity without key files: GKE workload identity maps Kubernetes principals to Google Cloud permissions without requiring embedded long-lived service account JSON keys. The reported condition is about cloud run ingress restriction, not this adjacent change.
B:Authorized push deliveries succeed without exposing the handler publicly or masking errors through silent acknowledgments. That result could support testing of Pub/Sub push to Cloud Run authentication: Pub/Sub push delivery can use an OIDC token for authenticated Cloud Run invocation; access is not established by topic ownership alone. The reported condition is about cloud run ingress restriction, not this adjacent change.
C:Both destination classes follow the approved routes and network controls without leaking private endpoints. That result could support testing of Cloud Run Direct VPC egress configuration: Cloud Run VPC egress policy changes outbound routing; IAM, firewall and NAT controls still determine actual reachability. The reported condition is about cloud run ingress restriction, not this adjacent change.
Question 485
A public customer API becomes unreachable after ingress is restricted to internal traffic without a supported external path. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect HPA target metrics, resource requests, metrics availability, current versus desired replicas, and scale limits.
- Inspect Pod labels, Service selectors, Service type, ingress configuration, and security boundary requirements.
- Inspect service revision tags, authentication policy, no-traffic settings, and which URL testers invoke.
- Inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
Explanation
Correct Answer
D:Inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. A focused follow-up is to apply the intended ingress mode and test calls from approved internal and unapproved external locations. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect HPA target metrics, resource requests, metrics availability, current versus desired replicas, and scale limits. Horizontal Pod Autoscaler makes replica decisions from observed metrics relative to configured targets, not merely from an arbitrary container count. This is not the decisive inspection for cloud run ingress restriction.
B:Inspect Pod labels, Service selectors, Service type, ingress configuration, and security boundary requirements. A Deployment manages Pods, a Service provides stable routing to selected Pods, and ingress determines supported external HTTP entry. This is not the decisive inspection for cloud run ingress restriction.
C:Inspect service revision tags, authentication policy, no-traffic settings, and which URL testers invoke. Revision tags provide direct revision access for testing; they do not inherently shift regular service URL traffic. This is not the decisive inspection for cloud run ingress restriction.
Question 486
A public customer API becomes unreachable after ingress is restricted to internal traffic without a supported external path. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Route the intended event type through Eventarc to a compatible authenticated Cloud Run destination.
- Rollback by restoring traffic to an immutable previously healthy revision while investigating the new release.
- Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract.
- Set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public.
Explanation
Correct Answer
D:Set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. Before rollout, inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins. A public customer API becomes unreachable after ingress is restricted to internal traffic without a supported external path. The team is choosing a sustainable solution.
Incorrect Answers
A:Route the intended event type through Eventarc to a compatible authenticated Cloud Run destination. This design addresses eventarc-triggered Cloud Run handler, where Eventarc event routing requires compatible source filters, destination connectivity, and authorized trigger identity. That may help elsewhere, but it does not make the change required for cloud run ingress restriction.
B:Rollback by restoring traffic to an immutable previously healthy revision while investigating the new release. This design addresses Cloud Run revision rollback strategy, where Cloud Run rollbacks manipulate traffic allocation among existing revisions rather than rewriting the contents of a released revision. That may help elsewhere, but it does not make the change required for cloud run ingress restriction.
C:Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract. For this case, ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. That may help elsewhere, but it does not make the change required for cloud run ingress restriction.
Question 487
A public customer API becomes unreachable after ingress is restricted to internal traffic without a supported external path. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Assign a tag to the candidate revision and run authenticated regression checks against its tag URL.
- Apply the intended ingress mode and test calls from approved internal and unapproved external locations.
- Configure push authentication and verify a test message reaches the private Cloud Run handler once under normal conditions.
- Bind the approved secret to the service, test rotation semantics, and verify that no secret values enter logs or images.
Explanation
Correct Answer
B:Apply the intended ingress mode and test calls from approved internal and unapproved external locations. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. Validate the change by checking that only authorized network paths can reach the service, with authentication still enforced where required. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Assign a tag to the candidate revision and run authenticated regression checks against its tag URL. This action changes a different concern, tagged Cloud Run revision validation. A more direct response is to apply the intended ingress mode and test calls from approved internal and unapproved external locations.
C:Configure push authentication and verify a test message reaches the private Cloud Run handler once under normal conditions. This action changes a different concern, Pub/Sub push to Cloud Run authentication. A more direct response is to apply the intended ingress mode and test calls from approved internal and unapproved external locations.
D:Bind the approved secret to the service, test rotation semantics, and verify that no secret values enter logs or images. This action changes a different concern, Cloud Run secrets as environment or mounted files. A more direct response is to apply the intended ingress mode and test calls from approved internal and unapproved external locations.
Question 488
A public customer API becomes unreachable after ingress is restricted to internal traffic without a supported external path. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Traffic avoids unready Pods without needless container restarts during normal initialization.
- The service accesses only approved data and does not inherit a developer's broad personal permissions.
- Only authorized network paths can reach the service, with authentication still enforced where required.
- The Pod completes startup and later health failures are still detected without premature restarts.
Explanation
Correct Answer
C:Only authorized network paths can reach the service, with authentication still enforced where required. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. The original diagnosis should have included this step: inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins. A public customer API becomes unreachable after ingress is restricted to internal traffic without a supported external path. The team has tried a correction.
Incorrect Answers
A:Traffic avoids unready Pods without needless container restarts during normal initialization. That result could support testing of GKE readiness versus liveness probes: Readiness removes a Pod from eligible Service endpoints; liveness triggers restarts and therefore needs a different failure definition. The case instead calls for the following: only authorized network paths can reach the service, with authentication still enforced where required.
B:The service accesses only approved data and does not inherit a developer's broad personal permissions. That result could support testing of Cloud Run execution identity attachment: The deployed execution identity controls Google API permissions from a Cloud Run workload; user identities and deployer privileges are separate. The case instead calls for the following: only authorized network paths can reach the service, with authentication still enforced where required.
D:The Pod completes startup and later health failures are still detected without premature restarts. That result could support testing of GKE startup probe for slow initialization: Kubernetes startup probes can suppress normal liveness and readiness checks during initialization, preventing startup time from being mistaken for failure. The case instead calls for the following: only authorized network paths can reach the service, with authentication still enforced where required.
Question 489
A Cloud Run service is deployed as private but a scheduled caller gets permission denied because it sends no valid identity token. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect service revision tags, authentication policy, no-traffic settings, and which URL testers invoke.
- Inspect invocation authentication setting, caller principal, audience in the ID token, and Cloud Run Invoker binding.
- Inspect initialization duration, startup probe settings, existing liveness timing, and Pod event history.
- Inspect request duration, configured timeout, downstream waits, retry behavior, and whether an immediate HTTP response is required.
Explanation
Correct Answer
B:Inspect invocation authentication setting, caller principal, audience in the ID token, and Cloud Run Invoker binding. In this scenario, a Cloud Run service is deployed as private but a scheduled caller gets permission denied because it sends no valid identity token.
Incorrect Answers
A:Inspect service revision tags, authentication policy, no-traffic settings, and which URL testers invoke. Revision tags provide direct revision access for testing; they do not inherently shift regular service URL traffic. It does not isolate the authenticated cloud run invocation issue described.
C:Inspect initialization duration, startup probe settings, existing liveness timing, and Pod event history. Kubernetes startup probes can suppress normal liveness and readiness checks during initialization, preventing startup time from being mistaken for failure. It does not isolate the authenticated cloud run invocation issue described.
D:Inspect request duration, configured timeout, downstream waits, retry behavior, and whether an immediate HTTP response is required. Cloud Run request timeouts bound synchronous request handling; raising a deadline is not a durable background processing strategy. It does not isolate the authenticated cloud run invocation issue described.
Question 490
A Cloud Run service is deployed as private but a scheduled caller gets permission denied because it sends no valid identity token. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Cloud Run source deployment with the appropriate build pipeline and explicitly account for the resulting container artifact.
- Use stable matching selectors and Pod labels so the Kubernetes controller owns the intended replicas.
- Add a startup probe that gives slow applications an explicit bounded initialization window before normal probes run.
- Keep private services authenticated and authorize only the intended caller with a suitable identity token.
Explanation
Correct Answer
D:Keep private services authenticated and authorize only the intended caller with a suitable identity token. In this scenario, a Cloud Run service is deployed as private but a scheduled caller gets permission denied because it sends no valid identity token. Before rollout, inspect invocation authentication setting, caller principal, audience in the ID token, and Cloud Run Invoker binding.
Incorrect Answers
A:Use Cloud Run source deployment with the appropriate build pipeline and explicitly account for the resulting container artifact. For this case, private Cloud Run invocation requires both valid identity evidence and applicable IAM authorization; making it public is not a substitute. It addresses a different dependency from authenticated cloud run invocation.
B:Use stable matching selectors and Pod labels so the Kubernetes controller owns the intended replicas. For this case, private Cloud Run invocation requires both valid identity evidence and applicable IAM authorization; making it public is not a substitute. It addresses a different dependency from authenticated cloud run invocation.
C:Add a startup probe that gives slow applications an explicit bounded initialization window before normal probes run. This design addresses GKE startup probe for slow initialization, where Kubernetes startup probes can suppress normal liveness and readiness checks during initialization, preventing startup time from being mistaken for failure. It addresses a different dependency from authenticated cloud run invocation.