# Manage frameworks in Assured Workloads

*Applicable only for [Assured Workloads frameworks](https://docs.cloud.google.com/assured-workloads/docs/frameworks-overview.md.txt)*

Assured Workloads frameworks consist of
[cloud controls](https://docs.cloud.google.com/assured-workloads/docs/manage-cloud-controls.md.txt) that help you
meet the security and regulatory requirements for a folder or project in your
cloud environments. Assured Workloads provides many built-in
frameworks, such as data boundaries, but you can also modify existing frameworks
or create your own. To create your own framework, you start by identifying or
creating the cloud controls that align with your business' security and
compliance obligations. Then, you deploy a framework that includes those cloud
controls to the selected folder or project.

This page helps you complete the following steps:

1. Assess which built-in framework best aligns with your regulatory and security
   requirements. You can create your own custom framework, but we recommend
   starting with a built-in framework.

2. Determine which built-in cloud controls map to your business requirements.
   You can
   [create custom cloud controls](https://docs.cloud.google.com/assured-workloads/docs/manage-cloud-controls.md.txt)
   if required.

3. Determine which folder or project to deploy the framework to.

4. Copy an existing framework and modify it to match your requirements. If
   required, you can create a custom framework.

5. Deploy the framework on the selected folder or project.

## Before you begin


To get the permissions that
you need to manage frameworks,

ask your administrator to grant you the
following IAM roles:

- To view available frameworks: [Assured Workloads Viewer](https://docs.cloud.google.com/iam/docs/roles-permissions/assuredworkloads.md.txt#assuredworkloads.viewer) (`roles/assuredworkloads.viewer`) on the organization
- To deploy or modify framework deployment on a new folder or project, or to create or modify a custom framework: [Assured Workloads Administrator](https://docs.cloud.google.com/iam/docs/roles-permissions/assuredworkloads.md.txt#assuredworkloads.admin) (`roles/assuredworkloads.admin`) on the organization
- To deploy or modify a framework deployment on an existing folder:
  - [Assured Workloads Administrator](https://docs.cloud.google.com/iam/docs/roles-permissions/assuredworkloads.md.txt#assuredworkloads.admin) (`roles/assuredworkloads.admin`) on the organization
  - [Folder Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/resourcemanager.md.txt#resourcemanager.folderAdmin) (`roles/resourcemanager.folderAdmin`) on the folder
- To deploy or modify a framework deployment on an existing project:
  - [Assured Workloads Administrator](https://docs.cloud.google.com/iam/docs/roles-permissions/assuredworkloads.md.txt#assuredworkloads.admin) (`roles/assuredworkloads.admin`) on the organization
  - [Project Owner](https://docs.cloud.google.com/iam/docs/roles-overview.md.txt#basic) (`roles/owner`) on the project


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


You might also be able to get
the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

### Cloud control behavior on existing resources

When you deploy a data boundary framework to a new folder or project, all of its
cloud controls take effect immediately because no resources or enabled services
exist in the target resource. However, when you deploy a framework in
**Monitor and prevent** mode to an existing folder or project, some preventive
cloud controls can't take effect on projects where the underlying service is
already enabled.

This behavior occurs because Google Cloud evaluates some cloud controls
only once: when the Compute Engine or App Engine API is first enabled on a
project. As a result, even new resources within existing projects can't be made
retroactively compliant.

The following table lists the cloud controls that behave in this manner:

| Cloud control | Example behavior on existing projects |
|---|---|
| **Disable Compute Instance Data Access APIs** `builtin-disable-compute-instance-data-access` Enforces the [`constraints/compute.disableInstanceDataAccessApis`](https://docs.cloud.google.com/organization-policy/reference/org-policy-constraints.md.txt#constraints/compute.disableInstanceDataAccessApis) organization policy constraint. | If Compute Engine is already enabled in a project before you deploy the framework, existing and newly created VMs in that project still allow serial port output and screenshots without generating a violation. |
| **Set Zonal DNS as Default for Compute Engine** `builtin-gce-zonal-dns-default` Enforces the [`constraints/compute.setNewProjectDefaultToZonalDNSOnly`](https://docs.cloud.google.com/organization-policy/reference/org-policy-constraints.md.txt#constraints/compute.setNewProjectDefaultToZonalDNSOnly) organization policy constraint. | If Compute Engine is already enabled in a project before you deploy the framework, a new VM created later in that project still defaults to global DNS instead of zonal DNS unless you manually update the project metadata. |
| **Prevent Automatic Creation of Default Network** `builtin-prevent-default-network-creation` Enforces the [`constraints/compute.skipDefaultNetworkCreation`](https://docs.cloud.google.com/organization-policy/reference/org-policy-constraints.md.txt#constraints/compute.skipDefaultNetworkCreation) organization policy constraint. | If Compute Engine is already enabled in a project before you deploy the framework, its existing `default` VPC network remains in place without generating a violation, and new VMs can still attach to it unless you manually delete the network. |
| **Prevent Automatic Granting of Editor Role to Default Service Accounts** `builtin-prevent-default-service-accounts-auto-editor` Enforces the [`constraints/iam.automaticIamGrantsForDefaultServiceAccounts`](https://docs.cloud.google.com/organization-policy/reference/org-policy-constraints.md.txt#constraints/iam.automaticIamGrantsForDefaultServiceAccounts) organization policy constraint. | If Compute Engine or App Engine is already enabled in a project before you deploy the framework, the default service account keeps the Editor role without generating a violation. New VMs or apps that use that service account still run with Editor permissions unless you manually revoke the role. |

For all other cloud controls, keep the following behaviors in mind when you
deploy a framework to an existing folder or project:

- **Activation time:** Some preventive cloud controls take up to 24 hours to take effect after you deploy the framework.
- **Non-retroactive enforcement:** Some cloud controls are forward-looking and apply only to resources that you create or update after the control takes effect. Existing resources keep their previous configuration and aren't automatically reconfigured or deleted. If a setting can only be configured when you create a resource, you must recreate non-compliant existing resources to make them compliant.

If you're deploying the **Data Boundary for Impact Level 5 (IL5)** framework in
**Monitor and prevent** mode and your organization hasn't configured an
[organization-level personnel control (OLPC) mode](https://docs.cloud.google.com/assured-workloads/docs/olpc-mode.md.txt),
you must also have the Assured Workloads Administrator (`roles/assuredworkloads.admin`)
role at the organization level to set the OLPC mode.

## View frameworks

To view the configuration for built-in frameworks or other frameworks that
you've already created, follow these steps:

1. In the Google Cloud console, go to the **Frameworks** page.


   [Go to Frameworks](https://console.cloud.google.com/compliance/configure/frameworks)

   <br />

2. If prompted, select your organization.

3. The dashboard shows the available frameworks, their categories and data
   residency locations, a brief description, and the resources that each
   framework has been assigned to.

4. To view details about a specific framework, click the framework name.

5. Optional: To view a resource-centric list of all active framework deployments
   across your folders and projects---including the framework version, data
   residency location, and a summary of findings---click the
   **Assignments** tab.

## Create a framework

After you determine which cloud controls apply to resources within your
organization or a specific folder or project, you can create a framework. You
can create a custom framework or copy an existing framework and modify it. When
you copy a framework, it includes the latest releases of any built-in cloud
controls.

1. In the Google Cloud console, go to the **Frameworks** page.


   [Go to Frameworks](https://console.cloud.google.com/compliance/configure/frameworks)

   <br />

2. If prompted, select your organization.

3. Click **Create custom framework**.

4. Complete one of the following:

   - To use an existing framework, complete the following:

     1. Select **Start from an existing framework**.

     2. Select the framework that you want to copy.

   - To create a custom framework, select **Start new**.

5. Enter a **Display name** , **ID** , and **Description** for your framework.
   Click **Continue**.

6. In the **Select location** step, select a specific region or a multi-region.
   For more information about available regions, see
   [Assured Workloads locations](https://docs.cloud.google.com/assured-workloads/docs/locations.md.txt).
   Click **Continue**.

   If you're copying an existing framework, the list of cloud controls that were
   part of the existing framework displays.
7. To add the cloud controls that you require, complete the following:

   - To add an existing cloud control, click **Add cloud controls** . Select all
     the cloud controls that you require and then click **Add**.

     When you add a control, verify the control type (detective, preventive, or
     audit) of the control. Don't include audit-only controls in a framework
     that you want to use to monitor your environment and detect violations.
     You can't [deploy frameworks](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#deploy-framework) that include audit-only
     controls.
   - To create a custom cloud control, click **Create custom cloud control** .
     For instructions, see
     [Create a custom cloud control](https://docs.cloud.google.com/assured-workloads/docs/manage-cloud-controls.md.txt#create-custom-cloud-control).

8. Click **Continue**.

9. Add any additional parameters that the cloud controls require.

   For example, you can set your locations for Cloud Logging storage
   locations, resource locations, and modify allowed service endpoints.
10. Click **Create**.

## Deploy a framework

Deploy a framework to a folder or project so that you can control and monitor
those resources using the framework's cloud controls. When you deploy a
framework, the following rules apply:

- A single resource---whether a folder or a project---can only have one built-in preventive framework such as a data boundary deployed to it.
- A single resource---whether a folder or a project---can have multiple detective frameworks deployed to it.
- Multiple separate folders or projects can have the same preventive or detective framework deployed to them. However, nesting preventive framework deployments across a parent folder and its child folders or projects isn't supported.
- Custom frameworks can't be deployed to a folder or project that uses the [Data Boundary for Impact Level 5 (IL5)](https://docs.cloud.google.com/assured-workloads/docs/data-boundaries/il5.md.txt) or [Data Boundary for International Traffic in Arms Regulations (ITAR)](https://docs.cloud.google.com/assured-workloads/docs/data-boundaries/itar.md.txt) framework, or to any child resources under that folder. This restriction applies even in detective mode.

If you choose to deploy a framework in preventive mode to a folder or project,
you can't convert the deployment to detective only mode. However, you can
[convert a deployment from monitor to preventive mode](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#convert-mode).

Folders and projects inherit the cloud controls of a framework deployed to a
parent folder through the Google Cloud
[resource hierarchy](https://docs.cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy.md.txt).

When you deploy a workload in the
[`europe` multi-region](https://docs.cloud.google.com/assured-workloads/docs/locations.md.txt#multi-regions), the
deployment must reference its framework and cloud controls in the `eu` location,
such as
`organizations/ORGANIZATION_ID/locations/eu/frameworks/FRAMEWORK_ID`.
The Google Cloud console handles this location mapping automatically, but if
you deploy a framework using the API, you must specify the `eu` location in the
framework and cloud control resource names.

> [!NOTE]
> **Note:** Although a preventive framework typically can be deployed in a few minutes, it might take up to 24 hours for the framework to be fully deployed.

1. In the Google Cloud console, go to the **Frameworks** page.


   [Go to Frameworks](https://console.cloud.google.com/compliance/configure/frameworks)

   <br />

2. If prompted, select your organization.

3. For the framework that you want to deploy, click

   **Actions \> Apply to resources**.

4. Choose one of the following options:

   - To monitor for drift only, choose **Monitor**.

   - To monitor for drift and actively prevent violations, choose
     **Monitor and prevent**.

     > [!NOTE]
     > **Note:** Preventive cloud controls and their underlying organization policies aren't retroactive; they apply only to resources created or modified after you deploy the framework. Applying **Monitor and prevent** mode to an existing folder or project can disrupt existing workloads if they conflict with the new policies. For existing resources, we recommend that you first deploy the framework in **Monitor** mode to assess violations, or deploy **Monitor and prevent** mode to a new folder or project. For more information, see [Cloud control behavior on existing resources](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#existing-resources).

5. Select the resource that you want to deploy the framework to. You can choose
   an existing folder or project. If you chose to actively prevent violations,
   you can create a new folder or project and deploy the framework to it. If the
   framework requires additional details, such as a CMEK project or other
   configuration details, you must provide them.

6. Complete one of the following:

   - If you selected **Monitor**, complete the following:

     1. Verify the information.
     2. Click **Monitor**.
   - If you selected **Monitor and prevent**, complete the following:

     1. Click **Next**. Review the cloud controls and modes.

        If an OLPC banner appears, your organization's [OLPC
        mode](https://docs.cloud.google.com/assured-workloads/docs/olpc-mode) requires configuration or
        restricts the selected built-in framework (for example, when OLPC mode
        is **Not set** for Data Boundary for IL5, or when **Strict IL5** blocks
        non-IL5 frameworks). Click **Choose OLPC mode** or **Update OLPC mode**
        in the banner if you need to update the setting before continuing.
     2. Click **Continue**.

     3. If displayed, verify the additional information that's required for
        some cloud controls.

     4. Click **Next**.

     5. Review your selections and then click **Enforce**.

After you deploy the framework, you can monitor your environment for any drift
from your defined cloud controls. Assured Workloads monitoring reports
instances of drift as *violations* that you can review, filter, and resolve. It
can take approximately six hours after you deploy a framework for any violations
to appear.

### Key Access Justifications enrollment

[Key Access Justifications](https://docs.cloud.google.com/assured-workloads/key-access-justifications/docs/overview.md.txt#onboarding)
is automatically enabled when you deploy specific data boundary frameworks in
**Monitor and prevent** mode with the `builtin-require-cmek` cloud control
enforced in preventive mode:

- **[EU Data Boundary with Access Justifications](https://docs.cloud.google.com/assured-workloads/docs/data-boundaries/eu-data-boundary-access-justifications.md.txt)** or **[Switzerland Data Boundary with Access Justifications](https://docs.cloud.google.com/assured-workloads/docs/data-boundaries/switzerland-data-boundary-access-justifications.md.txt)** : Enrolls your entire organization in Key Access Justifications for [Cloud EKM](https://docs.cloud.google.com/kms/docs/ekm.md.txt#overview) external keys only.
- **[Japan Data Boundary](https://docs.cloud.google.com/assured-workloads/docs/data-boundaries/japan-data-boundary.md.txt)**: Enrolls only the target folder or project in Key Access Justifications for all key types, including Cloud KMS software keys, Cloud HSM keys, and Cloud EKM keys.

Key Access Justifications enrollment occurs only when the `builtin-require-cmek` cloud
control is in preventive mode. Removing the framework assignment or deleting the
target folder or project doesn't unenroll your organization, folder, or project
from Key Access Justifications.

> [!NOTE]
> **Note:** It can take up to 24 hours to enable Key Access Justifications with external key managers after you deploy the framework. Therefore, we recommend that you don't reject key access requests in production environments during this time. There's no delay when using non-external Cloud KMS keys.

## Convert a deployment from monitor to preventive mode

If you deployed a built-in data boundary framework in **Monitor** mode to assess
an existing folder or project, you can convert the deployment to
**Monitor and prevent** mode without recreating the assignment. However, you
can't convert a built-in data boundary framework that was deployed to a folder
or project in **Monitor** mode to **Monitor and prevent** mode if the folder
or project already has a preventive framework.

To convert a deployment from **Monitor** mode to **Monitor and prevent** mode,
complete the following:

1. In the Google Cloud console, go to the **Frameworks** page.


   [Go to Frameworks](https://console.cloud.google.com/compliance/configure/frameworks)

   <br />

2. If prompted, select your organization.

3. Click the framework whose deployment you want to convert.

4. On the **Framework details** page, click
   **Actions \> Manage resource assignments**.

5. In the **Assigned resources** table, click the assignment that you want to
   convert to open its **Resource Assignment Details** page.

6. Click **Enforce Prevention** and follow the prompts to review the cloud
   controls, configure any required parameters, and enforce the framework.

## Edit a custom framework

After you create a custom framework, you can change its name and description,
add or remove cloud controls, and update any parameters. You can only edit
frameworks that you create. You can't edit built-in frameworks.

> [!NOTE]
> **Note:** You can edit a custom framework only when it isn't assigned to any folders or projects. Editing a custom framework doesn't automatically update deployed assignments. If the framework is already deployed, you must first [remove all of its resource assignments](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#remove-resource-assignments), save your edits, and then [redeploy the framework](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#deploy-framework) to those folders or projects.

1. In the Google Cloud console, go to the **Frameworks** page.


   [Go to Frameworks](https://console.cloud.google.com/compliance/configure/frameworks)

   <br />

2. If prompted, select your organization.

3. Click the custom framework that you want to edit.

4. On the **Framework details** page, verify that the framework isn't assigned
   to any folders or projects. If it's assigned to any resources, note the
   assigned resources and then
   [remove all assignments](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#remove-resource-assignments) before continuing.

5. Click **Actions \> Edit**.

6. On the **Edit Framework** page, in the **Update framework details** section,
   change the **Display name** and **Description** as required. Click
   **Continue**.

7. In the **Select location** step, click **Continue**.

8. To change the cloud controls that are included in the framework, complete the
   following:

   - To add an existing cloud control, click **Add cloud controls** . Select all
     the cloud controls that you require and then click **Add**.

   - To create a custom cloud control, click **Create custom cloud control** .
     For instructions, see
     [Create a custom cloud control](https://docs.cloud.google.com/assured-workloads/docs/manage-cloud-controls.md.txt#create-custom-cloud-control).

   - To remove a cloud control, select the cloud control and click **Remove**.

9. Click **Continue**.

10. Add any additional parameters that the cloud controls require.

11. Click **Save**.

12. If you removed resource assignments before editing the framework,
    [redeploy the updated framework](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#deploy-framework) to your folders or
    projects.

## Remove resources from a deployed framework

You can remove the folders or projects that you assigned to a deployed
framework. Removing resources means that the framework no longer generates
violations for that node of your resource hierarchy.

> [!NOTE]
> **Note:** If the framework was deployed in **Monitor and prevent** mode, unassigning the framework doesn't remove the organization policies that were applied to the folder or project. To remove those restrictions, go to the **Organization policies** page in the Google Cloud console and [modify or delete the policies](https://docs.cloud.google.com/resource-manager/docs/organization-policy/creating-managing-policies).

1. In the Google Cloud console, go to the **Frameworks** page.


   [Go to Frameworks](https://console.cloud.google.com/compliance/configure/frameworks)

   <br />

2. If prompted, select your organization.

3. Click the framework that you want to unassign resources from.

4. On the **Framework details** page, click
   **Actions \> Manage resource assignments**.

5. In the **Assigned resources** table, find the resource that you want to
   remove and click
   **Delete assignment**.

6. Review the confirmation message and click **Unassign**.

## Update a framework to a newer release

Google publishes regular updates to its built-in frameworks as services deploy
new features or as new best practices emerge. You can view the releases of
built-in frameworks on the **Frameworks** tab or on the **Framework details**
page.

Google notifies you in the Google Cloud console and release notes when the
following updates occur:

- Built-in cloud controls are added or removed from a framework
- Built-in cloud controls are updated

> [!NOTE]
> **Note:** Update notifications in the Google Cloud console and in-place release updates apply only to built-in frameworks. If you create a custom framework by copying a built-in framework, your custom framework doesn't receive update notifications when Google adds or updates cloud controls in the original built-in framework to align with regulatory changes or control improvements. To prevent your custom framework from becoming out of date and introducing a compliance gap, monitor the [release notes](https://docs.cloud.google.com/assured-workloads/docs/release-notes.md.txt) and manually [edit your custom framework](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#update-custom-framework) to incorporate relevant control updates.

When you update a built-in framework deployment in place, the target folder or
project, deployment location, and existing control parameters remain fixed. If
the update can't be completed, Assured Workloads automatically
restores the previous framework version without disrupting your existing
policies or monitoring.

To update a deployed built-in framework to the latest release, complete the
following:

1. In the Google Cloud console, go to the **Frameworks** page.


   [Go to Frameworks](https://console.cloud.google.com/compliance/configure/frameworks)

   <br />

2. If prompted, select your organization.

3. Click the framework that you want to update.

4. On the **Framework details** page, click
   **Actions \> Manage resource assignments**.

5. In the **Assigned resources** table, locate the assignment that has an update
   available in the **Update status** column and click **Update**.

6. Complete one of the following based on your deployment mode:

   - If the framework is deployed in **Monitor** mode:

     1. In the update panel, review the target resource, location, and existing control parameters.
     2. Configure any parameters required for newly added cloud controls.
     3. Click **Monitor** to apply the update.
   - If the framework is deployed in **Monitor and prevent** mode:

     1. Review the controls table, and configure any parameters required for newly added cloud controls.
     2. Click **Enforce** to apply the update and enforce the updated organization policies.

## Delete a custom framework

Delete a framework when it's no longer required. You can only delete frameworks
that you create; you can't delete built-in frameworks.

> [!NOTE]
> **Note:** You can't recover a framework after you delete it.

1. In the Google Cloud console, go to the **Frameworks** page.


   [Go to Frameworks](https://console.cloud.google.com/compliance/configure/frameworks)

   <br />

2. If prompted, select your organization.

3. Click the custom framework that you want to delete.

4. On the **Framework details** page, verify that the framework isn't assigned
   to a resource. If required,
   [remove the assignments](https://docs.cloud.google.com/assured-workloads/docs/manage-frameworks.md.txt#remove-resource-assignments).

5. Click **Actions \> Delete**.

6. In the confirmation dialog, review the message, enter `DELETE`, and then
   click **Confirm**.

## What's next

- Learn more about [Assured Workloads frameworks](https://docs.cloud.google.com/assured-workloads/docs/frameworks-overview.md.txt).
- Learn how to [manage cloud controls](https://docs.cloud.google.com/assured-workloads/docs/manage-cloud-controls.md.txt).