- A
Create an OAuth 2.0 client ID for an installed application and use offline access to obtain refresh tokens.
OAuth 2.0 client IDs for installed applications can use refresh tokens that are long-lived.
- B
Set up a Cloud VPN tunnel and use private IP addresses to access Google Cloud services.
Why wrong: This is a network connectivity solution, not a credential mechanism.
- C
Create a service account and use its key to generate short-lived tokens.
Why wrong: This uses the key to get short-lived tokens, but the key itself is long-lived. However, the approach is essentially the same as A. But option A already covers using the key directly. Option C is redundant and not a separate approach.
- D
Create a service account and download its private key for the on-premises application to use.
Service account keys are long-lived credentials.
- E
Use Workload Identity Federation to exchange on-premises credentials for Google Cloud tokens.
Why wrong: Workload Identity Federation provides short-lived tokens.
Quick Answer
The answer is to create a service account and download its private key, or configure an OAuth 2.0 client ID for installed applications with offline access. Both approaches provide long-lived credentials for on-premises access by either using a static private key file or a refresh token that can obtain new access tokens without user interaction. This scenario tests your understanding of how to bridge Google Cloud APIs with non-cloud environments while adhering to the principle of least privilege, a common challenge on the Google Professional Cloud Security Engineer exam. A frequent trap is assuming only service account keys work, but OAuth refresh tokens are equally valid for long-lived, unattended access. Remember the mnemonic "Key or Token, both are unbroken" to recall that either a downloaded private key or a refresh token satisfies the requirement for long-lived credentials in this multi-cloud context.
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. 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. 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 Security Engineer is designing access controls for a multi-cloud environment where workloads on Google Cloud need to access on-premises databases. The company wants to use long-lived credentials. Which TWO options are valid approaches? (Choose TWO.)
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
Create an OAuth 2.0 client ID for an installed application and use offline access to obtain refresh tokens.
Option A is correct because OAuth 2.0 client IDs for installed applications can be configured for offline access, which returns refresh tokens. These refresh tokens are long-lived (typically do not expire unless revoked) and can be used by on-premises applications to obtain new access tokens for accessing Google Cloud APIs without user interaction. This meets the requirement for long-lived credentials in a multi-cloud environment.
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.
- ✓
Create an OAuth 2.0 client ID for an installed application and use offline access to obtain refresh tokens.
Why this is correct
OAuth 2.0 client IDs for installed applications can use refresh tokens that are long-lived.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Set up a Cloud VPN tunnel and use private IP addresses to access Google Cloud services.
Why it's wrong here
This is a network connectivity solution, not a credential mechanism.
- ✗
Create a service account and use its key to generate short-lived tokens.
Why it's wrong here
This uses the key to get short-lived tokens, but the key itself is long-lived. However, the approach is essentially the same as A. But option A already covers using the key directly. Option C is redundant and not a separate approach.
- ✓
Create a service account and download its private key for the on-premises application to use.
Why this is correct
Service account keys are long-lived credentials.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Use Workload Identity Federation to exchange on-premises credentials for Google Cloud tokens.
Why it's wrong here
Workload Identity Federation provides short-lived tokens.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Google Cloud often tests the distinction between long-lived and short-lived credentials, and the trap here is that candidates may confuse Workload Identity Federation (which produces short-lived tokens) with a method for obtaining long-lived credentials, or assume that VPN tunnels solve authentication requirements.
Detailed technical explanation
How to think about this question
OAuth 2.0 refresh tokens for installed applications are issued with a `refresh_token` grant type and can be stored securely on-premises to obtain new access tokens (typically valid for 1 hour) indefinitely. Service account private keys (option D) are also long-lived credentials, but they must be protected as they never expire unless rotated; they are commonly used for server-to-server interactions where the on-premises application authenticates directly as the service account. The key distinction is that both refresh tokens and service account keys persist until explicitly revoked, making them suitable for long-lived access scenarios.
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.
- →
Configuring access within a cloud solution environment — study guide chapter
Learn the concepts, then practise the questions
- →
Configuring access within a cloud solution environment practice questions
Targeted practice on this topic area only
- →
All PCSE questions
500 questions across all exam domains
- →
Google Professional Cloud Security Engineer study guide
Full concept coverage aligned to exam objectives
- →
PCSE practice test guide
How to use practice tests most effectively before exam day
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 network security practice questions
Practise PCSE questions linked to Configuring network security.
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.
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?
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: Create an OAuth 2.0 client ID for an installed application and use offline access to obtain refresh tokens. — Option A is correct because OAuth 2.0 client IDs for installed applications can be configured for offline access, which returns refresh tokens. These refresh tokens are long-lived (typically do not expire unless revoked) and can be used by on-premises applications to obtain new access tokens for accessing Google Cloud APIs without user interaction. This meets the requirement for long-lived credentials in a multi-cloud environment.
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 →
Keep practising
More PCSE practice questions
- Match each IAM role to its typical use case.
- Match each encryption scope to its description.
- Match each CVE or security concept to its description.
- Match each Google Cloud logging/monitoring term to its definition.
- Drag and drop the steps to rotate a customer-managed encryption key (CMEK) in Cloud KMS in the correct order.
- Drag and drop the steps to configure a Cloud NAT for private VM instances in the correct order.
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.