Back to controls

Ensure Separation of duties is enforced while assigning Service Account related roles to users

It is recommended that the principle of 'Separation of Duties' is enforced while assigning service-account related roles to users.

Category

Controls

Medium

Applies to

Google Cloud

Coverage

null controls, 1 queries

Asset types

1 covered

Overview

It is recommended that the principle of 'Separation of Duties' is enforced while assigning service-account related roles to users.

Rationale

The built-in/predefined IAM role Service Account Admin allows the user/identity to create, delete, and manage service account(s). The built-in/predefined IAM role Service Account User allows the user/identity (with adequate privileges on Compute and App Engine) to assign service account(s) to Apps/Compute Instances. Separation of duties is the concept of ensuring that one individual does not have all necessary permissions to be able to complete a malicious action. In Cloud IAM - service accounts, this could be an action such as using a service account to access resources that user should not normally have access to. Separation of duties is a business control typically used in larger organizations, meant to help avoid security or privacy incidents and errors. It is considered a best practice. No user should have Service Account Admin and Service Account User roles assigned at the same time.

Impact

The removed role should be assigned to a different user based on business needs.

Remediation guidance

From Google Cloud Console

  1. Under IAM & Admin, go to IAM
  2. For any member having both Service Account Admin and Service Account User roles granted/assigned, click the Delete Bin icon to remove either role from the member. Removal of a role should be done based on business requirements.

References

  1. https://cloud.google.com/iam/docs/service-accounts
  2. https://cloud.google.com/iam/docs/understanding-roles
  3. https://cloud.google.com/iam/docs/granting-roles-to-service-accounts

Multiple Remediation Paths

Google Cloud

SERVICE-WIDE (RECOMMENDED when many resources are affected): Enforce Organization Policies at org/folder level so new resources inherit secure defaults.

gcloud org-policies set-policy policy.yaml

ASSET-LEVEL: Use the product-specific remediation steps above for only the impacted project/resources.

PREVENTIVE: Use org policy constraints/custom constraints and enforce checks in deployment pipelines.

References for Service-Wide Patterns

  • GCP Organization Policy overview: https://cloud.google.com/resource-manager/docs/organization-policy/overview
  • GCP Organization policy constraints catalog: https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints
  • gcloud org-policies: https://cloud.google.com/sdk/gcloud/reference/org-policies

Operational Rollout Workflow

Use this sequence to reduce risk and avoid repeated drift.

1. Contain at Service-Wide Scope First (Recommended)

  • Google Cloud: apply organization policy constraints at org/folder scope.
gcloud org-policies set-policy policy.yaml

2. Remediate Existing Affected Assets

  • Execute the control-specific Console/CLI steps documented above for each flagged resource.
  • Prioritize internet-exposed and production assets first.

3. Validate and Prevent Recurrence

  • Re-scan after each remediation batch.
  • Track exceptions with owner and expiry date.
  • Add preventive checks in IaC/CI pipelines.

Query logic

These are the stored checks tied to this control.

Separation of duties is enforced while assigning service account related roles to users

Connectors

Google Cloud

Covered asset types

IAMUser

Expected check: eq []

{
  iamUsers(
    where: {
      AND: [
        {
          hasIAMRole_SOME: {
            name: "roles/iam.serviceAccountAdmin"
          }
        }
        {
          hasIAMRole_SOME: {
            name: "roles/iam.serviceAccountUser"
          }
        }
      ]
    }
  ) {
    ...AssetFragment
  }
}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon