Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Security Engineer practice bank has 1,343 more like it. Try 10 free: instant score, no account.
A security operations center (SOC) detects that an attacker compromised a developer's workstation and exfiltrated active gcloud CLI OAuth tokens to an external host to execute unauthorized Google Cloud API requests. The organization uses Cloud Identity federated with an external Identity Provider (IdP) using SAML 2.0 for Single Sign-On (SSO).
The security team needs to achieve the following:
gcloud CLI access and refresh tokens.gcloud CLI.Which set of actions should the security team take?
This configuration attempts to reset account credentials and web cookies, applies a generic 8-hour session length for Google services, and enables OS Login two-factor authentication (2FA) for virtual machine instances.
gcloud CLI.The incident were limited to an unauthorized web login session to Google Workspace tools, and the primary objective was securing Linux VM shell access.
Security teams frequently confuse resetting user sign-in cookies with revoking OAuth tokens; however, OAuth bearer tokens operate independently of browser session cookies.
This option places the user account into a suspended directory state, establishes an API perimeter via VPC Service Controls (VPC SC), and configures the external IdP session duration to be longer than the Google Cloud session length.
The goal was to completely isolate network-level data movement within a project perimeter while locking out departing staff indefinitely.
To prevent silent authentication bypasses during SSO, external identity session timers must always expire prior to or concurrently with the service provider's session timers.
This remediation and hardening strategy combines OAuth token revocation via connected application management with Google Cloud session control and Identity Provider (IdP) session alignment to eliminate compromised credentials and enforce periodic re-authentication.
Alternative measures—such as resetting account passwords or web sign-in cookies—do not invalidate existing OAuth access tokens that an attacker has already copied. Aligning IdP session lengths with Google Cloud re-authentication policies guarantees that session terminations enforce actual user challenges rather than silent automated renewals.
This option executes a local CLI credential revocation command, enforces an Organization Policy restricting IAM membership by domain, and defines a network IP mask in Cloud Identity SSO settings.
gcloud auth revoke only on the local machine clears credentials in the local configuration files; if the attacker has already copied the OAuth tokens to an external host, the attacker's exfiltrated tokens remain fully valid on Google's authorization endpoints.iam.allowedPolicyMemberDomains nor network masks define command-line or console session re-authentication intervals.gcloud auth revoke run locally does not invalidate OAuth tokens across the entire cloud directory if tokens have been exfiltrated.The administrator needed to ensure that external Gmail accounts cannot be granted IAM roles in the organization and wanted to clean up local workstation configurations.
Centralized revocation via the Admin Console or Admin SDK is required during credential compromise incidents because local endpoint remediation cannot guarantee revocation of tokens already moved off-host.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated