Question 127 of 500

Quick Answer

The answer is to grant the Cloud Scheduler’s service account the role `roles/cloudfunctions.invoker` on the Cloud Function. This is correct because removing the `allUsers` binding and setting ingress to internal traffic only eliminates unauthenticated access, but Cloud Scheduler’s service account still needs explicit authorization to invoke the function; the `roles/cloudscheduler.serviceAgent` role only allows the scheduler to trigger jobs, not to invoke downstream targets. On the Google Professional Cloud Security Engineer exam, this scenario tests your understanding that Cloud Scheduler acts as an authenticated caller requiring its own invoker permission on the function, separate from the scheduler’s own agent role. A common trap is assuming the scheduler’s service agent role automatically grants invocation rights, or that internal-only ingress alone suffices. Remember the mnemonic: “Scheduler schedules, Invoker invokes—each needs its own role.”

PCSE Practice Question: Configuring access within a cloud solution environment

This PCSE practice question tests your understanding of configuring access within a cloud solution environment. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. 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.

A company uses Cloud Functions with a service account that has the role 'roles/cloudfunctions.invoker' to allow unauthenticated invocation. They want to change this so that only authenticated requests from a specific Cloud Scheduler job can invoke the function. The Cloud Scheduler job runs in the same project and uses a service account with the role 'roles/cloudscheduler.serviceAgent'. The security engineer updates the Cloud Function's ingress settings to 'Allow internal traffic only' and removes the 'allUsers' invoker binding. However, the Cloud Scheduler job now fails with a 403 error. What should the engineer do to fix this?

Question 1mediummultiple choice
Full question →

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

Grant the Cloud Scheduler's service account the role 'roles/cloudfunctions.invoker' on the Cloud Function.

A is correct because the Cloud Scheduler job uses a service account to authenticate its requests. By default, Cloud Scheduler does not automatically have permission to invoke a Cloud Function. Granting the Cloud Scheduler's service account the 'roles/cloudfunctions.invoker' role on the Cloud Function explicitly authorizes that identity to invoke the function, even when the function's ingress is set to 'Allow internal traffic only' and the 'allUsers' binding is removed.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Grant the Cloud Scheduler's service account the role 'roles/cloudfunctions.invoker' on the Cloud Function.

    Why this is correct

    This grants the specific service account permission to invoke the function.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Add 'allAuthenticatedUsers' as an invoker to the Cloud Function.

    Why it's wrong here

    This would allow any authenticated Google account, not just the scheduler.

  • Change the ingress setting to 'Allow all traffic'.

    Why it's wrong here

    This would open the function to the internet, which is not desired.

  • Set the Cloud Function's ingress setting to 'Allow internal traffic only' and ensure the Cloud Scheduler job's region is the same as the function's region.

    Why it's wrong here

    Region alignment is not the issue; the invoker permission is missing.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the misconception that internal traffic settings alone control access, when in fact IAM permissions are always required for authenticated invocation, and 'Allow internal traffic only' only restricts network-level access, not IAM authorization.

Detailed technical explanation

How to think about this question

Cloud Functions uses IAM to control invocation, and the 'roles/cloudfunctions.invoker' role grants the 'cloudfunctions.functions.invoke' permission. When a Cloud Scheduler job triggers a function via HTTP, it sends an OAuth 2.0 token signed by the scheduler's service account. The Cloud Function validates this token and checks if the service account has the invoke permission. Even with 'Allow internal traffic only', the function still requires explicit IAM authorization for the calling identity.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

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

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

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.

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?

Configuring access within a cloud solution environment — This question tests Configuring access within a cloud solution environment — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Grant the Cloud Scheduler's service account the role 'roles/cloudfunctions.invoker' on the Cloud Function. — A is correct because the Cloud Scheduler job uses a service account to authenticate its requests. By default, Cloud Scheduler does not automatically have permission to invoke a Cloud Function. Granting the Cloud Scheduler's service account the 'roles/cloudfunctions.invoker' role on the Cloud Function explicitly authorizes that identity to invoke the function, even when the function's ingress is set to 'Allow internal traffic only' and the 'allUsers' binding is removed.

What should I do if I get this PCSE question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

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.

Loading comments…

Sign in to join the discussion.

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.