Use custom organization policies

This page shows you how to use Organization Policy Service custom constraints to restrict specific operations on the following Google Cloud resources:

  • binaryauthorization.googleapis.com/Policy
  • binaryauthorization.googleapis.com/Attestor

To learn more about Organization Policy, see Custom organization policies.

About organization policies and constraints

The Google Cloud Organization Policy Service gives you centralized, programmatic control over your organization's resources. As the organization policy administrator, you can define an organization policy, which is a set of restrictions called constraints that apply to Google Cloud resources and descendants of those resources in the Google Cloud resource hierarchy. You can enforce organization policies at the organization, folder, or project level.

Organization Policy provides built-in managed constraints for various Google Cloud services. However, if you want more granular, customizable control over the specific fields that are restricted in your organization policies, you can also create custom constraints and use those custom constraints in an organization policy.

Policy inheritance

By default, organization policies are inherited by the descendants of the resources on which you enforce the policy. For example, if you enforce a policy on a folder, Google Cloud enforces the policy on all projects in the folder. To learn more about this behavior and how to change it, refer to Hierarchy evaluation rules.

Benefits

Use custom organization policies to do the following with Binary Authorization policies:

  • Enforce security requirements by mandating user authorization for system image deployment.
  • Ensure that attestation is required for all pod deployments within Binary Authorization policy.
  • Ensure that specific attestors are included in the Binary Authorization policy used for attestation verification.
  • Restrict allowed operations to a defined allowlist pattern within the Binary Authorization policy.

Use custom organization policies to do the following with Binary Authorization attestations:

  • Ensure attestors are created with descriptive metadata to clearly define their purpose.
  • Ensure that the cryptographic key associated with each attestor is generated using a specific, predetermined signature algorithm.

Before you begin

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Install the Google Cloud CLI.

  5. If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.