Recovering Recently Deleted Service Accounts in Google Cloud (GCP)

Subscribers:
52,800
Published on ● Video Link: https://www.youtube.com/watch?v=cY9fmQ2lveA



Duration: 0:00
84 views
1


Let us guide you through learning cybersecury. Join the Cybersecurity Mentorship Program. https://www.skool.com/cybersecuritymentorship/about?ref=36710b2f1f3744039c557605ee7a9dfe

Recovering Recently Deleted Service Accounts in Google Cloud (GCP)

ERROR:
Operation type [start] failed with message "The resource 'RESOURCEID-compute@developer.gserviceaccount.com' of type 'serviceAccount' was not found."

COMMAND:
gcloud iam service-accounts undelete [OAuth2ClientID]

QUERY: (Find any deleted service accounts)
resource.type="service_account"
protoPayload.methodName="google.iam.admin.v1.DeleteServiceAccount"
logName:"cloudaudit.googleapis.com%2Factivity"

Did you accidentally delete a service account in Google Cloud? Don't panic! In this video, we'll guide you through the essential steps to recover recently deleted service accounts, including those crucial for Compute Engine.

We'll cover:

The 30-day recovery window: Understanding the critical timeframe you have to undelete a service account before it's permanently gone.
Leveraging Cloud Logging: How to use the Google Cloud Logs Explorer to pinpoint the deletion event and extract the unique ID needed for recovery. We'll show you the exact queries to find what you're looking for!
Undeleting with the gcloud CLI: A step-by-step walkthrough of using the gcloud beta iam service-accounts undelete command to bring your service account back.
Important considerations: What to do about service account keys, permissions required for recovery, and special notes regarding default service accounts like the Compute Engine default.
Whether it's a critical Compute Engine service account or any other IAM service account, learn how to quickly and efficiently recover your resources. Don't let accidental deletions derail your projects!