Event Information
-
Event meaning and impact
google.iam.admin.v1.DisableServiceAccountindicates a service account has been disabled via IAM Admin API (or equivalent console/CLI action).- All access tokens and credentials for that service account will fail for new requests; existing long‑lived connections may break depending on service.
- This is often part of incident response, key rotation, or decommissioning workflows.
-
Operational and security considerations
- Correlate with actor and method: check
protoPayload.authenticationInfo.principalEmail,requestMetadata.callerIp, andresourceNameto validate it was an authorized change. - Review workloads using this service account (GCE, GKE, Cloud Run, CI/CD, etc.) to avoid unintended outages; if unintentional, re‑enable with
EnableServiceAccountand rotate credentials. - Monitor for follow‑up errors (e.g.,
PERMISSION_DENIED,SERVICE_ACCOUNT_DISABLED) in logs of dependent services.
- Correlate with actor and method: check
-
Compliance and governance (e.g., ISO 27001, SOC 2, PCI, HIPAA)
- Treat this event as a privileged identity lifecycle change; ensure it is logged in Cloud Audit Logs and retained per your evidence requirements.
- Verify that disabling was performed by a role with least privilege (e.g.,
roles/iam.serviceAccountAdmin) and, if required, associated with a change ticket or approval record. - Include alerts on
DisableServiceAccountin your SIEM to detect suspicious or mass disable actions that could indicate misuse or an ongoing security incident.
Examples
-
Active workload or application identity disabled (outage + privilege confusion)
- Example: A production GKE cluster or Cloud Run service uses a service account for Datastore and Pub/Sub; disabling it breaks token issuance, causing 5xx errors and failed background jobs, violating availability requirements in SOC 2/ISO 27001.
- Mitigation: Implement change control + break-glass accounts; monitor
DisableServiceAccountvia Cloud Audit Logs + SCC and alert on critical workload identities.
-
Security tooling / logging identity disabled (loss of detective controls)
- Example: A service account used by a SIEM forwarder or Cloud Logging export to a central security project is disabled; logs stop flowing, undermining PCI DSS/ISO 27001 logging, monitoring, and incident investigation requirements.
- Mitigation: Tag security-critical service accounts; restrict who can disable them; configure log-based alerts for
DisableServiceAccounton security + logging projects.
-
Incident response or key-rotation automation broken (response gaps + stale credentials)
- Example: A service account used by automation to rotate secrets in Secret Manager or revoke IAM keys is disabled; credentials remain active longer than policy allows, increasing exposure and violating CIS/GCP Benchmarks and NIST key-management controls.
- Mitigation: Separate automation identities with strong RBAC; require approvals for disabling; periodically verify that security automations can authenticate and run.
Remediation
Using Console
-
Immediately re‑enable or replace the disabled service account (restore availability & controls)
- In Console: go to IAM & Admin → Service Accounts → (project) → locate the account (filter by email / label), click the three‑dot menu → Enable.
- If “Enable” is not available (e.g., deleted beyond recovery window), create a new service account with least privilege, reattach it to:
- GKE: update Workload Identity / node SA / imagePullSecrets in
Deployment/StatefulSetspecs. - Cloud Run: edit service, set Security → Service account, redeploy.
- Logging/SIEM exporters: edit log sink / Pub/Sub subscriber / forwarding agent configuration to use the new identity.
- GKE: update Workload Identity / node SA / imagePullSecrets in
- Validate: confirm requests succeed (no 5xx), logs/export flows resume, and automation (IR/key‑rotation) jobs authenticate and complete.
-
Harden controls to prevent accidental/unauthorized DisableServiceAccount (SOC2/ISO/PCI/NIST alignment)
- Restrict who can disable SAs:
- In Console: IAM & Admin → IAM, remove broad roles like Owner/Editor; grant Service Account Admin (roles/iam.serviceAccountAdmin) only to a small change‑control group; for security/logging/automation SAs, use Deny Policies (Preview/GA):
- IAM & Admin → Deny policies → Create policy, target project/folder, add rule:
- Condition: resource is a critical service account (use
resource.nameor labels). - Deny principals: all except a security break‑glass group.
- Permissions:
iam.serviceAccounts.disable.
- Condition: resource is a critical service account (use
- IAM & Admin → Deny policies → Create policy, target project/folder, add rule:
- In Console: IAM & Admin → IAM, remove broad roles like Owner/Editor; grant Service Account Admin (roles/iam.serviceAccountAdmin) only to a small change‑control group; for security/logging/automation SAs, use Deny Policies (Preview/GA):
- Tag critical SAs (workloads, logging, IR/rotation):
- In Service Accounts → (SA) → Edit, add label like
critical=workload,critical=logging,critical=ir-automation; document them in your asset inventory / CMDB for SOC 2 / ISO 27001 Annex A.5 & A.8.
- In Service Accounts → (SA) → Edit, add label like
- Implement change control: require tickets/approvals for any SA lifecycle change; tie this to your CAB and evidence for SOC 2 CC9 / ISO 27001 A.8 & A.12.
- Restrict who can disable SAs:
-
Monitor and test: log‑based alerts on DisableServiceAccount + periodic SA health checks
- Create log‑based alert on
DisableServiceAccount(Cloud Audit Logs → Logging):- Go to Logging → Logs Explorer and use:
- Click Create alert, scope to org/folder/project; set Notification channels (email, SMS, webhook, PagerDuty).
- For security/logging projects, refine filter to critical SAs (by email or label) and set severity to CRITICAL to meet PCI DSS / ISO 27001 logging & monitoring requirements.
- Go to Logging → Logs Explorer and use:
- In Security Command Center (if enabled): create custom module / detector on the same log pattern and wire to incident response workflows (playbooks, SOAR).
- Schedule periodic “can‑I‑auth” tests (e.g., Cloud Scheduler → Cloud Run/Functions) that:
- Use each security / logging / key‑rotation SA to perform a minimal action (
secrets.versions.access,logging.sinks.get, etc.). - Fail and alert if tokens cannot be issued or calls fail with
PERMISSION_DENIEDorSERVICE_ACCOUNT_DISABLED, providing evidence for CIS/GCP Benchmarks and NIST key‑management/IR controls.
- Use each security / logging / key‑rotation SA to perform a minimal action (
- Create log‑based alert on
Using CLI
-
Prevent & detect risky
DisableServiceAccountoperations (all scenarios)- Enforce change control (e.g., via tickets) and least privilege: create a custom IAM role without
iam.serviceAccounts.disableand only grant the Service Account Admin role (roles/iam.serviceAccountAdmin) to a small break-glass/admin group. - Create an org/folder log-based metric on
DisableServiceAccountand alert (SOC 2, ISO 27001, PCI): - Periodically enumerate disabled service accounts and review against change records (CIS / NIST CM):
- Enforce change control (e.g., via tickets) and least privilege: create a custom IAM role without
-
Protect production workload & security/logging identities (availability + detective controls)
- Tag critical SAs via description/labels and use IAM Conditions to restrict who can disable them (SOC 2/ISO A.12/A.16):
- For security/logging SAs, verify export pipelines regularly (PCI DSS / ISO logging):
- If a critical SA was disabled, re-enable, then do a post-incident review:
- Tag critical SAs via description/labels and use IAM Conditions to restrict who can disable them (SOC 2/ISO A.12/A.16):
-
Validate incident-response / key-rotation automation & implement health checks
- Separate automation SAs (key rotation, IR) from app SAs and grant minimal roles aligned with CIS/NIST key management; keep a dedicated break-glass SA stored offline.
- Implement scheduled authentication checks for automation SAs (e.g., Cloud Scheduler + Cloud Function) to detect disabled/broken automation:
- After re-enabling automation SAs, immediately run manual key/secret rotations to close gaps:
Using Python
-
Detect & alert on
DisableServiceAccount(critical workloads, logging, IR automation) -
Protect & classify critical service accounts (workload, logging, IR/rotation)
- IAM hardening (via console/Terraform/Deployment Manager):
- Create a custom role without
iam.serviceAccounts.disable/iam.serviceAccounts.updateand use it for routine operators. - Limit
roles/iam.serviceAccountAdminto a small CAB/break-glass group only. - For security/logging projects, enforce IAM Conditions on
DisableServiceAccountoperations (where possible) and align with SOC 2 / ISO 27001 change-control policies.
- Create a custom role without
- IAM hardening (via console/Terraform/Deployment Manager):
-
Continuity checks & break-glass for workloads, logging, and automation
- Maintain a dedicated “break-glass” project + SA with tightly controlled access and pre-approved process to re-enable or re-key disabled SAs to restore production workloads, SIEM/log forwarding, and IR automation within RTO/RPO requirements.
- Periodically (e.g., monthly) test:
- Workload service accounts can call Datastore/Pub/Sub;
- Logging/SIEM SAs are exporting logs;
- Secret Manager / key-rotation automation can still authenticate and rotate secrets (evidence for SOC 2 / ISO 27001 / PCI DSS / CIS controls).

