Courseiva

PCSE Practice Question: Configuring Access Within a Cloud Solution Environment

A DevOps engineer wants to allow a CI/CD pipeline running in GitHub Actions to deploy resources to a Google Cloud project without using long-lived service account keys. What should the engineer implement?

⚠ Common exam trap

The PCSE exam often tests the distinction between using Google Cloud's native CI/CD triggers (like Cloud Build) versus configuring an external identity federation (like Workload Identity Federation) to allow a different CI/CD tool (GitHub Actions) to authenticate securely.

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

Configure Workload Identity Federation between GitHub and the service account.

Workload Identity Federation allows GitHub Actions to exchange OpenID Connect (OIDC) tokens for Google Cloud temporary credentials, eliminating the need for long-lived service account keys. This approach follows Google's security best practices by using short-lived, automatically rotated tokens and avoids the risk of key exposure in repository secrets.

Answer analysis

Option-by-option breakdown

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

  • Use a Cloud Functions HTTP trigger called from GitHub Actions.

    Why it's wrong here

    This still requires authentication for the function call, not solving the key problem.

  • Create a service account and distribute its JSON key to the GitHub repository secrets.

    Why it's wrong here

    Long-lived keys are not recommended; they pose security risks.

  • Enable Cloud Build triggers that watch the GitHub repository.

    Why it's wrong here

    This moves the build to Cloud Build, but does not solve authentication for GitHub Actions.

  • Configure Workload Identity Federation between GitHub and the service account.

    Why this is correct

    This allows keyless authentication using OIDC.

About these practice questions

One of 960 original PCSE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.