PCSE Practice Question: Configuring Access Within a Cloud Solution Environment
A DevOps team uses GitHub Actions to deploy infrastructure to Google Cloud. They want to avoid storing long-lived service account keys. Which approach should they use to authenticate from GitHub Actions to Google Cloud?
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
✓
Use Workload Identity Federation by configuring a workload identity pool and provider for GitHub.
Workload Identity Federation allows GitHub Actions to exchange GitHub OIDC tokens for Google Cloud service account credentials. This eliminates the need for service account keys. The team must create a workload identity pool and provider in GCP, and configure GitHub Actions to use Google's action with 'workload_identity_provider'. Granting the service account token creator role is not the correct method. Using a Compute Engine instance is not relevant for GitHub Actions.
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 service account token creator role to the GitHub Actions runner.
Why it's wrong here
The token creator role allows creating tokens for a service account, but without a mechanism to prove identity, it still requires a key or other credentials.
- ✗
Download a JSON service account key and store it as a GitHub secret.
Why it's wrong here
This is the traditional approach but involves long-lived keys, which should be avoided per best practices.
- ✓
Use Workload Identity Federation by configuring a workload identity pool and provider for GitHub.
Why this is correct
Workload Identity Federation enables keyless authentication from GitHub Actions to GCP using OIDC tokens.
- ✗
Create a Compute Engine instance with a service account and run GitHub Actions from there.
Why it's wrong here
This is overly complex and not scalable; GitHub Actions is a SaaS service, not running on a GCP VM.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PCSE question from scratch — 960 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.