- A
Deploy both services in a VPC and use VPC firewall rules to allow traffic only from the caller's internal IP.
Why wrong: This is wrong because Cloud Run services are serverless and are not deployed in a VPC unless using VPC connectors. Even with a VPC connector, VPC firewall rules cannot restrict access to a Cloud Run service based on source IP from another Cloud Run service, as the calling service's IP is not static. Moreover, the requirement is to restrict to a specific service, not just network-level.
- B
Use Cloud Armor with a rule to allow only requests with a specific header set by the caller.
Why wrong: This is wrong because Cloud Armor is a web application firewall that works with HTTP(S) load balancers, not directly with Cloud Run services unless they are behind a load balancer. Even then, relying on a custom header is not a secure method for service-to-service authentication, as headers can be spoofed.
- C
Set the Cloud Run service to require authentication and grant the invoker role to the calling service's Google service account.
This is correct. Enabling IAM authentication on the target Cloud Run service and granting the Cloud Run Invoker role to the calling service's service account ensures that only that specific service can invoke the target. This is the recommended best practice for service-to-service authentication within the same project.
- D
Configure the Cloud Run service to use 'Internal and Cloud Load Balancing' ingress control and use VPC Service Controls with an access level based on the caller's identity.
Why wrong: This is wrong because using 'Internal and Cloud Load Balancing' ingress control restricts traffic to only requests from VPC or load balancers, but does not provide identity-based restriction to a specific service. VPC Service Controls add additional data exfiltration prevention but are not the standard solution for service-to-service authentication. The correct approach is IAM authentication via service accounts.
Restrict Cloud Run Service to Service Access within the Same Project
This PCSE practice question tests your understanding of cloud run invoker role. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: cloud Run Invoker Role. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
An organization uses Cloud Run to deploy microservices. They need to restrict access to a specific Cloud Run service to only requests coming from a different Cloud Run service within the same project. The services communicate over HTTP. Which configuration should be used?
Quick Answer
The correct answer is to configure the Cloud Run service with 'Internal and Cloud Load Balancing' ingress control combined with VPC Service Controls and an access level based on the caller's identity. This works because the ingress setting restricts all traffic to only requests originating from your VPC or Cloud Load Balancing, while VPC Service Controls enforce a security perimeter that blocks any traffic from outside that boundary. By then applying an access level tied to the calling service’s Google service account, you ensure that only that specific Cloud Run service can invoke the target, achieving precise service-to-service authentication within the same project. On the Google Professional Cloud Security Engineer exam, this scenario tests your understanding of how to layer network-level controls with identity-based access, a common trap being to rely solely on ingress settings without the identity layer. Remember the mnemonic: “Ingress for the fence, identity for the key.”
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Set the Cloud Run service to require authentication and grant the invoker role to the calling service's Google service account.
Option C is correct because the recommended and simplest approach to restrict access between Cloud Run services within the same project is to use Cloud Run's built-in IAM authentication. By requiring authentication on the target service (setting ingress to 'All' and checking 'Require authentication'), and then granting the Cloud Run Invoker role (roles/run.invoker) to the calling service's Google service account, only that specific service account can invoke the target service. This provides identity-based access control without needing complex networking.
Key principle: Cloud Run Invoker Role
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deploy both services in a VPC and use VPC firewall rules to allow traffic only from the caller's internal IP.
Why it's wrong here
This is wrong because Cloud Run services are serverless and are not deployed in a VPC unless using VPC connectors. Even with a VPC connector, VPC firewall rules cannot restrict access to a Cloud Run service based on source IP from another Cloud Run service, as the calling service's IP is not static. Moreover, the requirement is to restrict to a specific service, not just network-level.
- ✗
Use Cloud Armor with a rule to allow only requests with a specific header set by the caller.
Why it's wrong here
This is wrong because Cloud Armor is a web application firewall that works with HTTP(S) load balancers, not directly with Cloud Run services unless they are behind a load balancer. Even then, relying on a custom header is not a secure method for service-to-service authentication, as headers can be spoofed.
- ✓
Set the Cloud Run service to require authentication and grant the invoker role to the calling service's Google service account.
Why this is correct
This is correct. Enabling IAM authentication on the target Cloud Run service and granting the Cloud Run Invoker role to the calling service's service account ensures that only that specific service can invoke the target. This is the recommended best practice for service-to-service authentication within the same project.
Related concept
Cloud Run Invoker Role
- ✗
Configure the Cloud Run service to use 'Internal and Cloud Load Balancing' ingress control and use VPC Service Controls with an access level based on the caller's identity.
Why it's wrong here
This is wrong because using 'Internal and Cloud Load Balancing' ingress control restricts traffic to only requests from VPC or load balancers, but does not provide identity-based restriction to a specific service. VPC Service Controls add additional data exfiltration prevention but are not the standard solution for service-to-service authentication. The correct approach is IAM authentication via service accounts.
Common exam traps
Common exam trap: answer the scenario, not the keyword
A common trap is thinking that VPC firewall rules or Cloud Armor can secure serverless services like Cloud Run. However, Cloud Run services are not deployed within a VPC by default, and the standard approach is to use IAM authentication with service accounts.
Detailed technical explanation
How to think about this question
VPC Service Controls create a security perimeter around Google Cloud resources, preventing data exfiltration and restricting access based on identity and context. When combined with Cloud Run's 'Internal and Cloud Load Balancing' ingress setting, the service becomes inaccessible from the public internet, and only requests routed through a VPC or Cloud Load Balancing (e.g., via an Internal HTTPS Load Balancer) are allowed. The access level can be configured using the caller's service account email, ensuring that only the specific Cloud Run service's identity can invoke the target, which is more secure than relying on network-based controls alone.
KKey Concepts to Remember
- Cloud Run Invoker Role
- Service Account
- IAM Authentication
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Cloud Run Invoker Role
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Review cloud Run Invoker Role, then practise related PCSE questions on the same topic to reinforce the concept.
Related practice questions
Related PCSE practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Configuring Access Within a Cloud Solution Environment practice questions
Practise PCSE questions linked to Configuring Access Within a Cloud Solution Environment.
Ensuring Data Protection practice questions
Practise PCSE questions linked to Ensuring Data Protection.
Managing Operations in a Cloud Solution Environment practice questions
Practise PCSE questions linked to Managing Operations in a Cloud Solution Environment.
Configuring Network Security practice questions
Practise PCSE questions linked to Configuring Network Security.
Supporting Compliance Requirements practice questions
Practise PCSE questions linked to Supporting Compliance Requirements.
PCSE fundamentals practice questions
Practise PCSE questions linked to PCSE fundamentals.
PCSE scenario practice questions
Practise PCSE questions linked to PCSE scenario.
PCSE troubleshooting practice questions
Practise PCSE questions linked to PCSE troubleshooting.
Practice this exam
Start a free PCSE practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this PCSE question test?
Cloud Run Invoker Role
What is the correct answer to this question?
The correct answer is: Set the Cloud Run service to require authentication and grant the invoker role to the calling service's Google service account. — Option C is correct because the recommended and simplest approach to restrict access between Cloud Run services within the same project is to use Cloud Run's built-in IAM authentication. By requiring authentication on the target service (setting ingress to 'All' and checking 'Require authentication'), and then granting the Cloud Run Invoker role (roles/run.invoker) to the calling service's Google service account, only that specific service account can invoke the target service. This provides identity-based access control without needing complex networking.
What should I do if I get this PCSE question wrong?
Review cloud Run Invoker Role, then practise related PCSE questions on the same topic to reinforce the concept.
What is the key concept behind this question?
Cloud Run Invoker Role
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Keep practising
More PCSE practice questions
- Match each encryption scope to its description.
- Drag and drop the steps to set up a Private Google Access for on-premises hosts using Private Service Connect in the cor…
- A company is designing a CI/CD pipeline using Cloud Build. Security requirements mandate that the pipeline deploy only t…
- A company must implement data residency requirements that prohibit storing data outside the European Union. They are usi…
- A company wants to allow employees to access a web application running on Google Kubernetes Engine (GKE) using their cor…
- A company is deploying a multi-tier application on Google Cloud. The web tier must be accessible from the internet, whil…
Last reviewed: Jun 30, 2026
This PCSE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCSE exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.