PROFESSIONAL-CLOUD-SECURITY-ENGINEER · Question #207
A service account key has been publicly exposed on multiple public code repositories. After reviewing the logs, you notice that the keys were used to generate short-lived credentials. You need to…
The correct answer is A. Delete the compromised service account. Because the attacker already used the key to generate short-lived credentials (e.g., OAuth 2.0 access tokens), simply disabling (B) or rotating (D) the key does not immediately revoke those already-issued tokens - they remain valid until expiry. Deleting the service account…
Question
Options
- ADelete the compromised service account.
- BDisable the compromised service account key.
- CWait until the service account credentials expire automatically.
- DRotate the compromised service account key.
How the community answered
(18 responses)- A78% (14)
- B11% (2)
- C6% (1)
- D6% (1)
Explanation
Because the attacker already used the key to generate short-lived credentials (e.g., OAuth 2.0 access tokens), simply disabling (B) or rotating (D) the key does not immediately revoke those already-issued tokens - they remain valid until expiry. Deleting the service account entirely causes GCP to immediately invalidate all credentials (including active short-lived tokens) associated with that account, cutting off all unauthorized access at once. Waiting (C) is never acceptable during an active breach. After deletion, you would recreate a new service account with tightly scoped permissions and re-attach it to the affected resources.
Topics
Community Discussion
No community discussion yet for this question.