1. Resources
  2. Detection rules
  3. Organization Policy Changed in Google Cloud

Organization Policy Changed in Google Cloud detection rules

An attacker changes or deletes an organization policy to lift a guardrail, such as the ban on service account key creation or on external members, before using the capability it blocked.

Platform
Google Cloud
Severity
Medium
Log source
Google Cloud Audit Logs
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
The Organization Policy Administrator role on the target organization, folder or project or on an ancestor.
Impact
A preventive control disappears for every resource below the changed policy, usually as preparation for persistence or wider exposure.
Response
Restore the policy from its reviewed definition, remove Organization Policy Administrator from the identity that changed it, and delete what was created while the constraint was lifted.
Mitigation
Grant Organization Policy Administrator to a small group at organization level only, and manage organization policies as code with reviewed changes.
API methods
google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicygoogle.cloud.orgpolicy.v2.OrgPolicy.UpdatePolicygoogle.cloud.orgpolicy.v2.OrgPolicy.DeletePolicygoogle.cloud.orgpolicy.v2.OrgPolicy.UpdateCustomConstraintgoogle.cloud.orgpolicy.v2.OrgPolicy.DeleteCustomConstraint*SetOrgPolicy*ClearOrgPolicy
Threat groups
None listed in MITRE ATT&CK for this technique

How the attack works

Organization policies apply constraints to everything under an organization, folder or project, for example iam.disableServiceAccountKeyCreation (no downloadable service account keys), iam.allowedPolicyMemberDomains (only the organization's identities in allow policies) or compute.requireOsLogin. Policies are inherited down the resource hierarchy, and a folder or project can carry its own policy that overrides the inherited one.

An attacker with Organization Policy Administrator rights sets a policy that switches a constraint off for one project or folder, or deletes the policy that enforced it, and then uses what it blocked: creating a service account key, granting a personal account access, or logging in with metadata SSH keys. The Organization Policy API v2 (orgpolicy.googleapis.com) and the v1 methods hosted by Cloud Resource Manager both write Admin Activity entries.

What an attacker needs

  • orgpolicy.policy.set or orgpolicy.policies.create, update or delete (Organization Policy Administrator) on the target resource or an ancestor.

Impact

A preventive control disappears for every resource below the changed policy, usually as preparation for persistence (service account keys, external principals, federation) or wider exposure.

Detection rules

Organization Policy Created, Updated or Deleted in Google Cloud

Detects any organization policy change through the Organization Policy API v2 (policies and custom constraints) or the v1 SetOrgPolicy and ClearOrgPolicy methods hosted by Cloud Resource Manager (Admin Activity audit log). Use it as a baseline signal; the companion rule raises changes to security constraints.

LevelLowStatusExperimentalLog sourceGoogle Cloud Audit Logs
title: Organization Policy Created, Updated or Deleted in Google Cloud
id: 9302e9c2-aad7-4397-a4d0-a875bf60770f
status: experimental
description: >-
  Detects any organization policy change through the Organization Policy API v2
  (policies and custom constraints) or the v1 SetOrgPolicy and ClearOrgPolicy
  methods hosted by Cloud Resource Manager (Admin Activity audit log). Use it as
  a baseline signal; the companion rule raises changes to security constraints.
references:
  - https://docs.cloud.google.com/organization-policy/audit-logging
  - https://docs.cloud.google.com/resource-manager/docs/audit-logging
author: Forestall
date: 2026-11-10
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484
logsource:
  product: gcp
  service: gcp.audit
detection:
  selection_v2:
    protoPayload.serviceName: orgpolicy.googleapis.com
    protoPayload.methodName:
      - google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicy
      - google.cloud.orgpolicy.v2.OrgPolicy.UpdatePolicy
      - google.cloud.orgpolicy.v2.OrgPolicy.DeletePolicy
      - google.cloud.orgpolicy.v2.OrgPolicy.UpdateCustomConstraint
      - google.cloud.orgpolicy.v2.OrgPolicy.DeleteCustomConstraint
  selection_v1:
    protoPayload.serviceName: cloudresourcemanager.googleapis.com
    protoPayload.methodName|endswith:
      - SetOrgPolicy
      - ClearOrgPolicy
  condition: 1 of selection_*
falsepositives:
  - Planned guardrail changes by the cloud platform team or its policy pipeline; exclude the pipeline identity by principalEmail.
level: low

False positives

  • Planned guardrail changes by the cloud platform team or its policy pipeline; exclude the pipeline identity by principalEmail.

Security Organization Policy Constraint Changed in Google Cloud

Detects creation, update or deletion of an organization policy for a constraint that blocks identity persistence or exposure: service account key creation and upload, key expiry, domain restricted sharing, allowed workload identity providers and AWS accounts, OS Login and Cloud Storage public access prevention (legacy and iam.managed.* variants). The constraint is read from the logged request: policy.name (v2 create and update), name (v2 delete), policy.constraint (v1 set) and constraint (v1 clear).

LevelHighStatusExperimentalLog sourceGoogle Cloud Audit Logs
title: Security Organization Policy Constraint Changed in Google Cloud
id: 871020a4-e0ff-4e06-9711-41de9bbfd1bc
status: experimental
description: >-
  Detects creation, update or deletion of an organization policy for a
  constraint that blocks identity persistence or exposure: service account key
  creation and upload, key expiry, domain restricted sharing, allowed workload
  identity providers and AWS accounts, OS Login and Cloud Storage public access
  prevention (legacy and iam.managed.* variants). The constraint is read from
  the logged request: policy.name (v2 create and update), name (v2 delete),
  policy.constraint (v1 set) and constraint (v1 clear).
references:
  - https://docs.cloud.google.com/organization-policy/audit-logging
  - https://docs.cloud.google.com/organization-policy/reference/rest/v2/organizations.policies
  - https://docs.cloud.google.com/resource-manager/reference/rest/v1/Policy
  - https://docs.cloud.google.com/organization-policy/reference/org-policy-constraints
author: Forestall
date: 2026-11-10
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484
logsource:
  product: gcp
  service: gcp.audit
detection:
  api_v2:
    protoPayload.serviceName: orgpolicy.googleapis.com
    protoPayload.methodName:
      - google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicy
      - google.cloud.orgpolicy.v2.OrgPolicy.UpdatePolicy
      - google.cloud.orgpolicy.v2.OrgPolicy.DeletePolicy
  api_v1:
    protoPayload.serviceName: cloudresourcemanager.googleapis.com
    protoPayload.methodName|endswith:
      - SetOrgPolicy
      - ClearOrgPolicy
  constraint_v2_policy:
    protoPayload.request.policy.name|contains:
      - disableServiceAccountKeyCreation
      - disableServiceAccountKeyUpload
      - serviceAccountKeyExpiryHours
      - allowedPolicyMemberDomains
      - allowedPolicyMembers
      - workloadIdentityPoolProviders
      - workloadIdentityPoolAwsAccounts
      - requireOsLogin
      - publicAccessPrevention
  constraint_v2_delete:
    protoPayload.request.name|contains:
      - disableServiceAccountKeyCreation
      - disableServiceAccountKeyUpload
      - serviceAccountKeyExpiryHours
      - allowedPolicyMemberDomains
      - allowedPolicyMembers
      - workloadIdentityPoolProviders
      - workloadIdentityPoolAwsAccounts
      - requireOsLogin
      - publicAccessPrevention
  constraint_v1_policy:
    protoPayload.request.policy.constraint|contains:
      - disableServiceAccountKeyCreation
      - disableServiceAccountKeyUpload
      - serviceAccountKeyExpiryHours
      - allowedPolicyMemberDomains
      - allowedPolicyMembers
      - workloadIdentityPoolProviders
      - workloadIdentityPoolAwsAccounts
      - requireOsLogin
      - publicAccessPrevention
  constraint_v1_clear:
    protoPayload.request.constraint|contains:
      - disableServiceAccountKeyCreation
      - disableServiceAccountKeyUpload
      - serviceAccountKeyExpiryHours
      - allowedPolicyMemberDomains
      - allowedPolicyMembers
      - workloadIdentityPoolProviders
      - workloadIdentityPoolAwsAccounts
      - requireOsLogin
      - publicAccessPrevention
  condition: 1 of api_* and 1 of constraint_*
falsepositives:
  - Changes that tighten a constraint also match; read the new rules in the request. Exclude the policy-as-code pipeline identity by principalEmail.
level: high

False positives

  • Changes that tighten a constraint also match; read the new rules in the request. Exclude the policy-as-code pipeline identity by principalEmail.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Guardrail lifted and the action it blocked carried out in the same place soon after

Detection hypothesisSequence of eventsJoins two logs

An attacker lifts an organization policy constraint in order to do what it blocked. The policy change followed within hours by that action, at the resource where the policy changed or below it, separates an intrusion from routine policy work, and the second event shows what the attacker wanted.

  1. A policy change for one of the constraints below: google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicy, UpdatePolicy or DeletePolicy, or the v1 SetOrgPolicy or ClearOrgPolicy of cloudresourcemanager.googleapis.com. Read the constraint as the security constraint rule does, and note the resource and caller.
  2. Within 24 hours, at that resource or below it: google.iam.admin.v1.CreateServiceAccountKey after iam.disableServiceAccountKeyCreation or its iam.managed form, or google.iam.admin.v1.UploadServiceAccountKey after iam.disableServiceAccountKeyUpload or its iam.managed form.
  3. Or a SetIamPolicy entry whose serviceData.policyDelta.bindingDeltas add a member outside your domains after iam.allowedPolicyMemberDomains or iam.managed.allowedPolicyMembers, or a CreateWorkloadIdentityPoolProvider entry from iam.googleapis.com after iam.workloadIdentityPoolProviders.
  4. Raise the pair, with higher priority when the same identity made both changes or the constraint was put back soon after the action.

Eventsgoogle.cloud.orgpolicy.v2.OrgPolicy.UpdatePolicygoogle.cloud.orgpolicy.v2.OrgPolicy.DeletePolicygoogle.iam.admin.v1.CreateServiceAccountKeygoogle.iam.admin.v1.UploadServiceAccountKeySetIamPolicy

LimitsAn approved exception follows the same sequence, such as a constraint switched off for one project so that a team can create a key, so compare with the exception requests. Matching the resource and everything below it needs the resource hierarchy, for example from Cloud Asset Inventory. Organization Policy logs can redact part of the caller's email, which weakens the same-caller check. The 24 hours are a starting point.

Triage

  • Read the constraint and the new rules in protoPayload.request (policy.spec for v2, booleanPolicy or listPolicy for v1) and the resource the policy applies to.
  • Confirm the change with its owner; a constraint lifted on one project shortly before a key creation or an external grant there is a strong signal.
  • Organization Policy logs can redact parts of the caller's email; correlate with other activity from the same session.

Response

Once the attack is confirmed:

  1. Restore the policy on the organization, folder or project where it was changed or deleted, from the reviewed definition in your policy repository.
  2. Remove Organization Policy Administrator from the identity that made the change, and contain that identity if it was compromised.
  3. List what was created in the affected scope while the constraint was lifted. Depending on the constraint, that means service account keys, bindings for external members, workload identity providers, VMs without OS Login or public access to Cloud Storage.
  4. Remove those by hand. Google documents that a new organization policy is usually not applied retroactively, so restoring the constraint does not delete a key or a binding that already exists.
  5. Check the folders and projects below the changed resource for policies of their own. A folder or project policy overrides the inherited one, so a restored parent policy does not help where a child policy still switches the constraint off.

Mitigation

  • Grant Organization Policy Administrator to a small group at organization level only.
  • Manage organization policies as code with reviewed changes, and treat changes made outside that pipeline as incidents.
  • Use the managed constraints (iam.managed.*) where available and enforce security constraints at the organization node.

Frequently asked questions

Does restoring the organization policy remove what was created while it was lifted?

No. Google documents that the application of a new organization policy is usually not retroactive. A service account key, an external member or a public binding that was created while the constraint was off keeps existing and working after the constraint is back. Find these by hand for the period between the change and the restore.

Why is part of the caller's email missing in the audit entry?

Organization Policy audit logs can redact parts of the caller's email address. To identify the caller, correlate the entry with other audit entries from the same session around the same time.

Does the security constraint rule fire only when a guardrail is lifted?

No. It matches the creation, update or deletion of a policy for one of the listed constraints, and a change that tightens the constraint matches as well. Read the new rules in the logged request (`policy.spec` for the v2 API, `booleanPolicy` or `listPolicy` for v1) to see the direction of the change.

Which sequence of events makes an organization policy change most suspicious?

A constraint lifted on one project or folder, followed shortly by the action it blocked in the same place. Examples are a service account key created after `iam.disableServiceAccountKeyCreation` was switched off, or a personal account granted access after the domain restriction was removed. The policy change is the preparation and the second event is the goal.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.