diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-1.png b/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-1.png new file mode 100755 index 00000000..a43af0e9 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-1.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-2.png b/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-2.png new file mode 100755 index 00000000..50b5229f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-2.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-3.png b/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-3.png new file mode 100755 index 00000000..5fa3ff83 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/assign-roles-3.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/bucket-config.png b/docs/getting-started/getting-started-gcp/apply-quick-action/bucket-config.png new file mode 100755 index 00000000..9c9e5fbf Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/bucket-config.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/bucket-ok.png b/docs/getting-started/getting-started-gcp/apply-quick-action/bucket-ok.png new file mode 100755 index 00000000..4d6717fe Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/bucket-ok.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/choose-bucket-in-alarm.png b/docs/getting-started/getting-started-gcp/apply-quick-action/choose-bucket-in-alarm.png new file mode 100755 index 00000000..e6ee6959 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/choose-bucket-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/find-bucket-in-alarm.png b/docs/getting-started/getting-started-gcp/apply-quick-action/find-bucket-in-alarm.png new file mode 100755 index 00000000..80229a28 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/find-bucket-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/find-quick-actions.png b/docs/getting-started/getting-started-gcp/apply-quick-action/find-quick-actions.png new file mode 100755 index 00000000..5a620a5c Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/find-quick-actions.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/index.md b/docs/getting-started/getting-started-gcp/apply-quick-action/index.md new file mode 100755 index 00000000..4f3b5798 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/apply-quick-action/index.md @@ -0,0 +1,125 @@ +--- +title: Apply a Quick Action +sidebar_label: Apply a Quick Action +--- + + +# Apply a Quick Action + +In this guide we’ll show how you can enable Guardrails to perform [Quick Actions](/guardrails/docs/guides/quick-actions) that fix misconfigurations. A Quick Action empowers an administrator to quickly fix misconfigurations by applying a change directly to an underlying GCP resource. In order to use this feature, Guardrails will need one additional permission. This guide will show you how to change the permissions specific to GCP bucket public access, other Quick Actions will require different permission grants. + +This is the ninth guide in the *Getting started with GCP series*. + +**Prerequisites**: + +- Completion of the previous guides in this series. +- Access to the Guardrails console with administrative privileges. +- Access to a GCP account with administrative privileges to add permissions to the Guardrails service account. + + +## Step 1: Begin role creation + +In the GCP console, select **IAM & Admin**, select **Roles**, and select **Create Role**. + +

role-1

+ +## Step 2: Name the role + +Assign a descriptive name and ID, then select **Add Permissions**. + +

role-2

+ +## Step 3: Find the permission + +In the properties filter, search for `storage.buckets.update`. + +

role-3

+ +## Step 4: Add the permission + +Enable the checkbox next to the permission and select **Add**. + +

role-4

+ +## Step 5: Create the role + +Select **Create**. + +

role-5

+ +## Step 6: Assign the role to your service account + +Select **IAM** and select the pencil icon next to your Guardrails service account. + +

assign-role-1

+ +Choose **Add Another Role**. + +

assign-role-2

+ +Search for and select the custom role you created, then select **Save**. + +

assign-role-3

+ + +## Step 7: Find Quick Actions + +Select **Policies** from the top-level navigation. In the search box, type `quick actions`, then select the **Turbot > Quick Actions > Enabled** policy type. + +

find_quick_actions

+ +## Step 8: Enable Quick Actions + +Choose **Sandbox** as the **Resource**, and then select **Enabled**, and click the green **Create** button. + +

aws-enable-quick-actions

+ +## Step 9: Find a bucket in Alarm + +Use your bookmark to navigate back to the **Controls by State** report and filter on **GCP > Storage > Bucket > Access Control**. + +

find_bucket_in_alarm_for_quick_action

+ +## Step 10: Select a bucket in Alarm + +Select a bucket in `Alarm` state from the list of buckets. + +

select_bucket_in_alarm_for_quick_action

+ +## Step 11: Use a Quick Action + +Select the **Actions** dropdown, and choose **Set Uniform Access Control**. + +

expand-quick-actions-dropdown

+ +## Step 12: Observe the change + +Guardrails reports that the action was successful, and the control goes to the `OK` state. + +

observe-updated-control

+ +## Step 13: Verify it worked + +Open a tab to the GCP console, and navigate to the bucket. Confirm the Guardrails Quick Action has correctly set the bucket's access control property. + +

observe-aws-console-result

+ +## Step 14: Review + +In this guide you increased the permissions scope in GCP, enabled Guardrails Quick Actions, and used a Quick Action to change a bucket's access control property. + +## Next Steps + +In the [next guide](/guardrails/docs/getting-started/getting-started-gcp/enable-enforcement) we’ll set Guardrails to automatically enforce these actions continuously. + +## Progress tracker +- [x] Prepare a GCP Project for Import to Guardrails +- [x] Connect a GCP Project to Guardrails +- [x] Observe GCP Activity +- [x] Enable Your First Guardrails Policy Pack +- [x] Review Project-Wide Governance +- [x] Create a Static Exception to a Guardrails Policy +- [x] Create a Calculated Exception to a Guardrails GCP Policy +- [x] Send an Alert to Email +- [x] **Apply a Quick Action** +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/quick-actions-dropdown.png b/docs/getting-started/getting-started-gcp/apply-quick-action/quick-actions-dropdown.png new file mode 100755 index 00000000..700a0cdb Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/quick-actions-dropdown.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-1.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-1.png new file mode 100755 index 00000000..a9d7bd70 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-1.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-2.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-2.png new file mode 100755 index 00000000..d4c756fb Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-2.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-3.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-3.png new file mode 100755 index 00000000..fa91e172 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-assign-roles-3.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-bucket-config.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-bucket-config.png new file mode 100755 index 00000000..fb320106 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-bucket-config.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-choose-bucket-in-alarm.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-choose-bucket-in-alarm.png new file mode 100755 index 00000000..3a113d32 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-choose-bucket-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-find-bucket-in-alarm.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-find-bucket-in-alarm.png new file mode 100755 index 00000000..b3f2276e Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-find-bucket-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-find-quick-actions.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-find-quick-actions.png new file mode 100755 index 00000000..f1f9f943 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-find-quick-actions.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-iam-permissions.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-iam-permissions.png new file mode 100755 index 00000000..31b7d30a Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-iam-permissions.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-quick-actions-dropdown.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-quick-actions-dropdown.png new file mode 100755 index 00000000..908d138c Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-quick-actions-dropdown.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-1.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-1.png new file mode 100755 index 00000000..5c85c091 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-1.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-2.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-2.png new file mode 100755 index 00000000..80cc0f0c Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-2.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-3.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-3.png new file mode 100755 index 00000000..dc437308 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-3.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-4.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-4.png new file mode 100755 index 00000000..dee3c8c8 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-4.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-5.png b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-5.png new file mode 100755 index 00000000..25cc012d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/raw-role-5.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/role-1.png b/docs/getting-started/getting-started-gcp/apply-quick-action/role-1.png new file mode 100755 index 00000000..311786f3 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/role-1.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/role-2.png b/docs/getting-started/getting-started-gcp/apply-quick-action/role-2.png new file mode 100755 index 00000000..d55ffcac Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/role-2.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/role-3.png b/docs/getting-started/getting-started-gcp/apply-quick-action/role-3.png new file mode 100755 index 00000000..af8b840c Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/role-3.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/role-4.png b/docs/getting-started/getting-started-gcp/apply-quick-action/role-4.png new file mode 100755 index 00000000..f294a2f2 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/role-4.png differ diff --git a/docs/getting-started/getting-started-gcp/apply-quick-action/role-5.png b/docs/getting-started/getting-started-gcp/apply-quick-action/role-5.png new file mode 100755 index 00000000..c217ac25 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/apply-quick-action/role-5.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/add-key-file.png b/docs/getting-started/getting-started-gcp/connect-project/add-key-file.png new file mode 100755 index 00000000..408c0114 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/add-key-file.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/choose-gcp.png b/docs/getting-started/getting-started-gcp/connect-project/choose-gcp.png new file mode 100755 index 00000000..3ad80301 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/choose-gcp.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/choose-sandbox.png b/docs/getting-started/getting-started-gcp/connect-project/choose-sandbox.png new file mode 100755 index 00000000..38cad803 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/choose-sandbox.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/configure-report-filter.png b/docs/getting-started/getting-started-gcp/connect-project/configure-report-filter.png new file mode 100755 index 00000000..a4f8fa04 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/configure-report-filter.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/connect.png b/docs/getting-started/getting-started-gcp/connect-project/connect.png new file mode 100755 index 00000000..db1e099f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/connect.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/gcp-controls-by-state.png b/docs/getting-started/getting-started-gcp/connect-project/gcp-controls-by-state.png new file mode 100755 index 00000000..3de65ccd Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/gcp-controls-by-state.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/gcp-progress-bar.png b/docs/getting-started/getting-started-gcp/connect-project/gcp-progress-bar.png new file mode 100755 index 00000000..242e3ed9 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/gcp-progress-bar.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/index.md b/docs/getting-started/getting-started-gcp/connect-project/index.md new file mode 100755 index 00000000..d53ab928 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/connect-project/index.md @@ -0,0 +1,92 @@ +--- +title: Connect a GCP Project to Guardrails +sidebar_label: Connect a GCP Project +--- + + +# Connect a GCP Project to Guardrails + +In this guide you will connect a GCP account to Guardrails. + +This is the second guide in the *Getting started with GCP* series. + +## Prerequisites + + - Completion of the previous guide: *Prepare an GCP Project for Import to Guardrails*. + + - Access to the Turbot Guardrails console with admin privilege. + +## Step 1: Login to Guardrails + +Login to your Guardrails console and select the **CONNECT** option from the home page. +

locate-top-level-connect

+ +## Step 2: Select GCP + +Select **GCP** from the import options. + +

choose-gcp

+ +## Step 3: Select import location + +Expand the **Parent Resource** dropdown and choose the **Sandbox** folder as the import location. + +

select-import-location

+ +## Step 4: Add key file + +In the previous guide you created and downloaded a JSON-format key file. Locate that file and drag it to the drop target. + +

add-key-file

+ + +## Step 5: Connect + +Select the **Connect** button. + +

select-connect

+ + +## Step 6: Observe progress + +Wait for the progress bar to complete. This process takes a while, and you’ll see the bars fluctuate. The number of resources will grow as Guardrails discovers them. + +

gcp_progress_bar

+ + +## Step 7: View Controls by state + +Select **Reports** from the top navigation menu. Type `controls` into the **Search reports…** field to show only reports with the word "controls" in their name. Select the **Controls by State** report from the list. + +

search-for-controls-reports

+ +## Step 8: Configure report filter + +Select the **Type** dropdown from the filters bar. Then enable the check box next to **GCP** to limit the report to only show GCP controls. +

set-type-filter

+ +## Step 9: Review Controls + +Review the status of your controls for GCP.  `Alarm`, `OK`, `Skipped`, and `TBD` are all common and normal states to see in your project.  If you see controls in `Error` or `Invalid` states, those must be cleared before moving further into these guides.   + +Bookmark the **Controls by State** report, you’ll need it in subsequent guides. + +

gcp-controls-by-state

+ +## Next Steps + +You've now successfully connected your GCP project to Guardrails. + +In the [next guide](/guardrails/docs/getting-started/getting-started-gcp/observe-gcp-activity) we’ll see how Guardrails watches your project and reacts to resource changes. + +## Progress tracker +- [x] Prepare a GCP Project for Import to Guardrails +- [x] **Connect a GCP Project to Guardrails** +- [ ] Observe GCP Activity +- [ ] Enable Your First Guardrails Policy Pack +- [ ] Review Project-Wide Governance +- [ ] Create a Static Exception to a Guardrails Policy +- [ ] Create a Calculated Exception to a Guardrails GCP Policy +- [ ] Send an Alert to Email +- [ ] Apply a Quick Action +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/connect-project/locate-top-level-connect.png b/docs/getting-started/getting-started-gcp/connect-project/locate-top-level-connect.png new file mode 100755 index 00000000..ad1c0834 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/locate-top-level-connect.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-add-key-file.png b/docs/getting-started/getting-started-gcp/connect-project/raw-add-key-file.png new file mode 100755 index 00000000..9594cabc Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-add-key-file.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-choose-gcp.png b/docs/getting-started/getting-started-gcp/connect-project/raw-choose-gcp.png new file mode 100755 index 00000000..694f45ee Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-choose-gcp.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-choose-sandbox.png b/docs/getting-started/getting-started-gcp/connect-project/raw-choose-sandbox.png new file mode 100755 index 00000000..9caa3d57 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-choose-sandbox.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-configure-report-filter.png b/docs/getting-started/getting-started-gcp/connect-project/raw-configure-report-filter.png new file mode 100755 index 00000000..23ba9ee1 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-configure-report-filter.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-connect.png b/docs/getting-started/getting-started-gcp/connect-project/raw-connect.png new file mode 100755 index 00000000..f3a47680 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-connect.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-controls-by-state.png b/docs/getting-started/getting-started-gcp/connect-project/raw-controls-by-state.png new file mode 100755 index 00000000..387ae30d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-controls-by-state.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-gcp-controls-by-state.png b/docs/getting-started/getting-started-gcp/connect-project/raw-gcp-controls-by-state.png new file mode 100755 index 00000000..282be795 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-gcp-controls-by-state.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-gcp-progress-bar.png b/docs/getting-started/getting-started-gcp/connect-project/raw-gcp-progress-bar.png new file mode 100755 index 00000000..f6fdd53f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-gcp-progress-bar.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/raw-select-import-location.png b/docs/getting-started/getting-started-gcp/connect-project/raw-select-import-location.png new file mode 100755 index 00000000..5bcf6ccd Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/raw-select-import-location.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/search-for-controls-reports.png b/docs/getting-started/getting-started-gcp/connect-project/search-for-controls-reports.png new file mode 100755 index 00000000..8a13b8c5 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/search-for-controls-reports.png differ diff --git a/docs/getting-started/getting-started-gcp/connect-project/select-import-location.pnga b/docs/getting-started/getting-started-gcp/connect-project/select-import-location.pnga new file mode 100755 index 00000000..a0118c33 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/connect-project/select-import-location.pnga differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/choose-test-resource.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/choose-test-resource.png new file mode 100755 index 00000000..c2a1de6e Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/choose-test-resource.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/enable-calculated-mode.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/enable-calculated-mode.png new file mode 100755 index 00000000..aafc4126 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/enable-calculated-mode.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/index.md b/docs/getting-started/getting-started-gcp/create-calculated-exception/index.md new file mode 100755 index 00000000..9beec8e6 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/create-calculated-exception/index.md @@ -0,0 +1,137 @@ +--- +title: Create a Calculated Exception to a Guardrails GCP Policy +sidebar_label: Create a Calculated Exception +--- + +# Create a Calculated Exception to a Guardrails GCP Policy + +In this guide you'll learn how to make dynamic policy exceptions based on resource tags. These [Calculated Policies](/guardrails/docs/reference/glossary#calculated-policy) enable you to implement business logic when designing your governance controls. + +Some typical examples of how to use calculated polices are: + +- Dynamic tagging of resources based on resource metadata. +- Creating policy exceptions for different classes of resources. +- Taking enforcement action for based on resource tags. + +This guide will walk you through a simple calculated policy based on resource tags. + +This is the seventh guide in the *Getting started with GCP* series. + +**Prerequisites** + +- Completion of the previous guides in this series. +- Access to the Guardrails console with administrative privileges. +- Access to the GCP console with permissions to label GCP buckets. + +## Step 1: Open the Policy Pack + +Choose **Policies** from the top navigation bar. Select the **Enforce Uniform Access is Enabled for GCP Storage Buckets** Policy Pack from the list on the right. + +

view-policy-packs

+ + +## Step 2: Modify the policy setting + +The bucket's access control is currently statically set to `Check: Uniform`. Use the pencil icon on the right side of the policy setting to edit the policy. + +

view-policy-pack

+ +## Step 3: Enable calculated mode + +Select the blue **Enable calculated mode** link. + +

enable-calculated-mode

+ +## Step 4: Launch calculated policy builder + +Select **Launch calculated policy builder**. + +

launch-calculated-policy-builder

+ + +## Step 5: Choose test resource + +Calculated policies work across all resources in scope of the policy setting. While building a calc policy it is useful to test the business logic against real resources in your environment. For this guide you will find and select one of the previously-created test buckets by searching in the **Test Resource** field. + +

choose test resource

+ +## Step 6: Build query + +In the **Query Input** field we will use **Select Snippet** to prepopulate our [GraphQL](/guardrails/docs/reference/glossary#graphql) query. Choose **Get bucket** from the dropdown. + +

snippet-dropdown-open

+ +## Step 7: View query result + +Guardrails inserts a GraphQL query for bucket tags into the **Input** pane, and then runs the query against the selected test resource. The result, in the **Output** pane, shows there are no tags on the bucket. + +

snippet-active

+ +## Step 8: Add the Jinja2 template + +Our business logic is created in the `Template` section, using [Nunjucks syntax](https://mozilla.github.io/nunjucks/templating.html). + +Copy this template code: + +```nunjucks +{% if $.bucket.turbot.tags.environment == "development" %} +'Skip' +{% else %} +'Check: Uniform' +{% endif %} +``` + +And paste it into the template pane. + +

template-active

+ +Guardrails evaluates the template in the context of the chosen **Test Resource**. The template output, `Check: Uniform`, is the calculated policy value that will govern any bucket’s **GCP > Storage > Bucket > Access Control** policy if the bucket is labeled with `environment:development`. Only these labeled buckets will be required to have uniform access enabled. Others will be skipped, whether or not they enable uniform access. + +The result confirms that `Check: Uniform` is valid for this policy type. Why? Because the test bucket does not have a tag `{ "environment": "development" }`. + +Select **Update** + +## Step 9: Save the calculated policy to the policy pack + +Select **Update**. + +

update-policy-setting

+ +## Step 10: Observe controls for bucket access control + +Navigate back to the **Controls by State** report and set the **Type** filter to **GCP > Storage > Bucket > Access Control**. Buckets with uniform access enabled will be in the `OK` state. Find a bucket in the `Alarm` state to modify, and note its name. + +

revisit-controls-by-state

+ +## Step 11: Label the bucket + +Open the GCP console in another tab, navigate to the bucket identified in the previous step, and assign the tag `environment:development` to it. + +

label-bucket

+ + +## Step 12: Observe the effect + +Return to the **Controls by State** report in the previous browser tab. Observe that Guardrails notices the change, reevaluates the resource, runs the calculated policy, and changes the status from `Alarm` to `Skipped`. + +

labeled-bucket-now-skipped

+ +## Step 13: Review + +In this guide you created your first calculated policy and tested it using the control that governs bucket access control. + +## Next Steps + +In the [next guide](/guardrails/docs/getting-started/getting-started-gcp/send-alert-to-email) we’ll see how to subscribe to these status alerts via email, Slack, or MS Teams. + +## Progress tracker +- [x] Prepare a GCP Project for Import to Guardrails +- [x] Connect a GCP Project to Guardrails +- [x] Observe GCP Activity +- [x] Enable Your First Guardrails Policy Pack +- [x] Review Project-Wide Governance +- [x] Create a Static Exception to a Guardrails Policy +- [x] **Create a Calculated Exception to a Guardrails GCP Policy** +- [ ] Send an Alert to Email +- [ ] Apply a Quick Action +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/label-the-bucket.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/label-the-bucket.png new file mode 100755 index 00000000..297aca70 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/label-the-bucket.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/labeled-bucket-now-skipped.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/labeled-bucket-now-skipped.png new file mode 100755 index 00000000..b17c4d04 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/labeled-bucket-now-skipped.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/launch-builder.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/launch-builder.png new file mode 100755 index 00000000..e27c447f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/launch-builder.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/open-snippet-dropdown.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/open-snippet-dropdown.png new file mode 100755 index 00000000..fe396cb1 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/open-snippet-dropdown.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-choose-test-resource.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-choose-test-resource.png new file mode 100755 index 00000000..bf9a4464 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-choose-test-resource.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-enable-calculated-mode.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-enable-calculated-mode.png new file mode 100755 index 00000000..c11dbe30 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-enable-calculated-mode.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-labeled-bucket-now-skipped.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-labeled-bucket-now-skipped.png new file mode 100755 index 00000000..b712bf38 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-labeled-bucket-now-skipped.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-labeled-bucket.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-labeled-bucket.png new file mode 100755 index 00000000..1f0d35b9 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-labeled-bucket.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-launch-builder.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-launch-builder.png new file mode 100755 index 00000000..83e7460e Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-launch-builder.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-open-snippet-dropdown.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-open-snippet-dropdown.png new file mode 100755 index 00000000..89eb6927 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-open-snippet-dropdown.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-policy-setting.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-policy-setting.png new file mode 100755 index 00000000..e4c4647c Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-policy-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-revisit-controls-by-state.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-revisit-controls-by-state.png new file mode 100755 index 00000000..51cb2b18 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-revisit-controls-by-state.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-snippet-active.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-snippet-active.png new file mode 100755 index 00000000..ebc33008 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-snippet-active.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-template-active.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-template-active.png new file mode 100755 index 00000000..30856dae Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-template-active.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-update-setting.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-update-setting.png new file mode 100755 index 00000000..ce6b7123 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-update-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-view-policy-pack.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-view-policy-pack.png new file mode 100755 index 00000000..ec157924 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-view-policy-pack.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-view-policy-packs.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-view-policy-packs.png new file mode 100755 index 00000000..db817db9 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/raw-view-policy-packs.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/revisit-controls-by-state.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/revisit-controls-by-state.png new file mode 100755 index 00000000..85a83070 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/revisit-controls-by-state.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/snippet-active.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/snippet-active.png new file mode 100755 index 00000000..733e9d76 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/snippet-active.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/template-active.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/template-active.png new file mode 100755 index 00000000..6c6e9f06 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/template-active.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/update-setting.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/update-setting.png new file mode 100755 index 00000000..6b79ca8d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/update-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/view-policy-pack.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/view-policy-pack.png new file mode 100755 index 00000000..966ddc34 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/view-policy-pack.png differ diff --git a/docs/getting-started/getting-started-gcp/create-calculated-exception/view-policy-packs.png b/docs/getting-started/getting-started-gcp/create-calculated-exception/view-policy-packs.png new file mode 100755 index 00000000..70558900 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-calculated-exception/view-policy-packs.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/choose-bucket.png b/docs/getting-started/getting-started-gcp/create-static-exception/choose-bucket.png new file mode 100755 index 00000000..2d9423a9 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/choose-bucket.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/confirm-setting.png b/docs/getting-started/getting-started-gcp/create-static-exception/confirm-setting.png new file mode 100755 index 00000000..6bbbbe0b Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/confirm-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/create-policy-setting.png b/docs/getting-started/getting-started-gcp/create-static-exception/create-policy-setting.png new file mode 100755 index 00000000..5bd7774d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/create-policy-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/filter-2.png b/docs/getting-started/getting-started-gcp/create-static-exception/filter-2.png new file mode 100755 index 00000000..940925a3 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/filter-2.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/filter-3.png b/docs/getting-started/getting-started-gcp/create-static-exception/filter-3.png new file mode 100755 index 00000000..ea0b2881 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/filter-3.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/index.md b/docs/getting-started/getting-started-gcp/create-static-exception/index.md new file mode 100755 index 00000000..d6efad48 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/create-static-exception/index.md @@ -0,0 +1,107 @@ +--- +title: Create a Static Exception to a Guardrails Policy +sidebar_label: Create a Policy Exception +--- + +# Create a Static Exception to a Guardrails GCP Policy + +In this guide you’ll learn how to exempt a specific resource from a project-wide policy + +This is the sixth guide in the *Getting started with GCP* series. + +**Prerequisites** + +- Completion of the previous guides in this series. + +- Access to the Guardrails console with administrative privileges. + +## Step 1: Open the Controls by State report + +Navigate to the **Controls by State** report, expand the **Type** dropdown, +and search for `gcp storage bucket access control`. + +

filter 1

+ +## Step 2: Set the Type filter + +Enable the checkbox next to **GCP > Storage > Bucket > Access Control** to filter by **Type**. + +

filter 2

+ +## Step 3: Set the State filter + +You can also filter by **State**. Expand that dropdown, and enable the checkbox next to **Alarm**. + +

filter 3

+ + +## Step 4: Choose a bucket + +Pick a control, here `guardrails_example_bucket_01`, and select its linked name. + +

choose-bucket

+ + +## Step 5: View resource details + +Because we were viewing the **Controls by State** report, our action landed us on the **Control Details** page. We can switch to the **Resource Detail** view by using the blue **Resource** link next to the sub-tab bar. + +

open-bucket-control

+ +## Step 6: Open the new policy dialog + +Now that you are are viewing the **Resource Detail** for the selected bucket, you can create an exception for this resource. To do that you will create a new policy setting. Select the **Policies** sub-tab and click the green **New Policy Setting** button. + +

switch-to-policies

+ + +## Step 7: Select the policy type + +In the **Search policy types...** input box, type `gcp storage bucket access control`, and enable the checkbox next to **GCP > Storage > Bucket > Access Control**. + +

find policy setting

+ +## Step 8: Create the policy exception + +Choose the **Skip** setting, and select **Create**. + +

create-policy-setting

+ +## Step 9: Confirm the setting + +This bucket is now exempt from the requirement to enable uniform access. + +

confirm setting

+ + +## Step 10: View in context + +Select the **Hierarchy** tab. The project-level policy specifies **Check: Uniform**. You’ve overridden that with an exception that exempts this particular bucket from that policy. + +

view-hierarchy

+ +## Step 11: Review bucket activity + +Select the **Activity** tab and observe the history. When you created the bucket-level policy setting to make an exception for this bucket, the control reevaluated and set the status to `Skipped`. + +

review-activity

+ +## Step 12: Review + +In this guide you created a resource-level exception for the control that governs bucket access control. + +## Next Steps + +In the [next guide](/guardrails/docs/getting-started/getting-started-gcp/create-calculated-exception) we’ll see how to dynamically calculate an exception based on a resource tag. + +## Progress tracker +- [x] Prepare a GCP Project for Import to Guardrails +- [x] Connect a GCP Project to Guardrails +- [x] Observe GCP Activity +- [x] Enable Your First Guardrails Policy Pack +- [x] Review Project-Wide Governance +- [x] **Create a Static Exception to a Guardrails Policy** +- [ ] Create a Calculated Exception to a Guardrails GCP Policy +- [ ] Send an Alert to Email +- [ ] Apply a Quick Action +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/open-bucket-control.png b/docs/getting-started/getting-started-gcp/create-static-exception/open-bucket-control.png new file mode 100755 index 00000000..8037a133 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/open-bucket-control.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/policies-sub-tab.png b/docs/getting-started/getting-started-gcp/create-static-exception/policies-sub-tab.png new file mode 100755 index 00000000..ac45fc0a Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/policies-sub-tab.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/raw-choose-bucket.png b/docs/getting-started/getting-started-gcp/create-static-exception/raw-choose-bucket.png new file mode 100755 index 00000000..f69a52aa Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/raw-choose-bucket.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/raw-create-policy-setting.png b/docs/getting-started/getting-started-gcp/create-static-exception/raw-create-policy-setting.png new file mode 100755 index 00000000..92b0ccc7 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/raw-create-policy-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/raw-open-bucket-control.png b/docs/getting-started/getting-started-gcp/create-static-exception/raw-open-bucket-control.png new file mode 100755 index 00000000..472c39a1 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/raw-open-bucket-control.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/raw-policies-sub-tab.png b/docs/getting-started/getting-started-gcp/create-static-exception/raw-policies-sub-tab.png new file mode 100755 index 00000000..c5a12e18 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/raw-policies-sub-tab.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/raw-review-activity.png b/docs/getting-started/getting-started-gcp/create-static-exception/raw-review-activity.png new file mode 100755 index 00000000..d3c1f7c0 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/raw-review-activity.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/raw-select-policy-type.png b/docs/getting-started/getting-started-gcp/create-static-exception/raw-select-policy-type.png new file mode 100755 index 00000000..aa065c2b Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/raw-select-policy-type.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/raw-switch-to-policies-tab.png b/docs/getting-started/getting-started-gcp/create-static-exception/raw-switch-to-policies-tab.png new file mode 100755 index 00000000..73e5a05d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/raw-switch-to-policies-tab.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/raw-view-hierarchy.png b/docs/getting-started/getting-started-gcp/create-static-exception/raw-view-hierarchy.png new file mode 100755 index 00000000..ca7edd84 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/raw-view-hierarchy.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/review-activity.png b/docs/getting-started/getting-started-gcp/create-static-exception/review-activity.png new file mode 100755 index 00000000..b175c06b Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/review-activity.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/select-policy-type.png b/docs/getting-started/getting-started-gcp/create-static-exception/select-policy-type.png new file mode 100755 index 00000000..48a04f8a Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/select-policy-type.png differ diff --git a/docs/getting-started/getting-started-gcp/create-static-exception/view-hierarchy.png b/docs/getting-started/getting-started-gcp/create-static-exception/view-hierarchy.png new file mode 100755 index 00000000..10264ac0 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/create-static-exception/view-hierarchy.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/all-ok-or-skipped.png b/docs/getting-started/getting-started-gcp/enable-enforcement/all-ok-or-skipped.png new file mode 100755 index 00000000..dab7ee9b Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/all-ok-or-skipped.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/choose-setting.png b/docs/getting-started/getting-started-gcp/enable-enforcement/choose-setting.png new file mode 100755 index 00000000..2c7cf1a0 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/choose-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/edit-policy-setting.png b/docs/getting-started/getting-started-gcp/enable-enforcement/edit-policy-setting.png new file mode 100755 index 00000000..81204e75 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/edit-policy-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/index.md b/docs/getting-started/getting-started-gcp/enable-enforcement/index.md new file mode 100755 index 00000000..f4dbd864 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/enable-enforcement/index.md @@ -0,0 +1,80 @@ +--- +title: Enable Automatic Enforcement +sidebar_label: Enable Automatic Enforcement +--- + + + + +# Enable Automatic Enforcement + +In this guide we’ll show how you can enable Guardrails to act autonomously. For large cloud footprints, it is often desirable to have Guardrails take automated actions based on your organization's compliance and security posture. Guardrails' controls can take a number of different automated enforcement actions, including deleting resources, changing the configuration of a resource, and tagging a resource. + +This is the last guide in the *Getting started with GCP series*. + +**Prerequisites**: + +- Completion of the previous guides in this series. +- Access to the Guardrails console with administrative privileges. + +> [!NOTE] +> In the [previous guide](/guardrails/docs/getting-started/getting-started-gcp/apply-quick-action) we showed how to add the single permission that enables you to take a **Quick Action** on GCP bucket access control. This guide also requires that permission. + + + +## Step 1: Open the Policy Pack + +In the guide titled [Enable your First Policy Pack](/guardrails/docs/getting-started/getting-started-gcp/enable-policy-pack) you enabled `Enforce Uniform Access Is Enabled for GCP Storage Buckets`. Select **Policies** from the top-level navigation bar, then choose that Policy Pack from the list. + +

locate-policy-pack

+ +## Step 2: Edit the policy setting + +Select the pencil icon next to the calculated policy you created [earlier](/guardrails/docs/getting-started/getting-started-gcp/create-calculated-exception). + +

view-policy-setting

+ +## Step 3: Disable calculated mode + + +Select **Disable calculated mode** to return to standard policy mode. + +

edit-policy-setting

+ + +## Step 4: Enable enforcement + +Choose **Enforce: Uniform** and select **Update**. + +

gcp-update-policy-setting

+ +## Step 5: Observe Guardrails in action + +Use your bookmark to navigate back to **Controls by State** report, and use the **Type** filter to choose **GCP > Storage > Bucket > Access Control**. In a few minutes all of your buckets in this account are now either `OK` or `Skipped`. + +Try setting access control on a bucket back to fine-grained. It won’t stay that way for long! + +

enforcement-happened

+ +## Step 6: Review + +In this guide series you learned the basics of importing GCP accounts into Guardrails, enabling Policy Packs, creating exceptions and notifications, and even more mischief. + +## Next Steps + +This Getting Started series just scratches the surface of what you can do with Guardrails. Try installing more [policy packs](https://hub.guardrails.com) into your workspace, and run through this series again to explore the breadth and variety of what Guardrails can do. + +## Progress tracker + +**Congratulations! You did it!** + +- [x] Prepare a GCP Project for Import to Guardrails +- [x] Connect a GCP Project to Guardrails +- [x] Observe GCP Activity +- [x] Enable Your First Guardrails Policy Pack +- [x] Review Project-Wide Governance +- [x] Create a Static Exception to a Guardrails Policy +- [x] Create a Calculated Exception to a Guardrails GCP Policy +- [x] Send an Alert to Email +- [x] Apply a Quick Action +- [x] **Enable Automatic Enforcement** diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/locate-policy-pack.png b/docs/getting-started/getting-started-gcp/enable-enforcement/locate-policy-pack.png new file mode 100755 index 00000000..c66aab40 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/locate-policy-pack.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/raw-choose-setting.png b/docs/getting-started/getting-started-gcp/enable-enforcement/raw-choose-setting.png new file mode 100755 index 00000000..10b68c2f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/raw-choose-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/raw-edit-policy-setting.png b/docs/getting-started/getting-started-gcp/enable-enforcement/raw-edit-policy-setting.png new file mode 100755 index 00000000..0ec06c6a Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/raw-edit-policy-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/raw-locate-policy-pack.png b/docs/getting-started/getting-started-gcp/enable-enforcement/raw-locate-policy-pack.png new file mode 100755 index 00000000..969ca346 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/raw-locate-policy-pack.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/raw-view-policy-setting.png b/docs/getting-started/getting-started-gcp/enable-enforcement/raw-view-policy-setting.png new file mode 100755 index 00000000..732aeaaa Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/raw-view-policy-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-enforcement/view-policy-setting.png b/docs/getting-started/getting-started-gcp/enable-enforcement/view-policy-setting.png new file mode 100755 index 00000000..22362f89 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-enforcement/view-policy-setting.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/attach-1.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/attach-1.png new file mode 100755 index 00000000..66c706a0 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/attach-1.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/attach-2.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/attach-2.png new file mode 100755 index 00000000..5b8b380f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/attach-2.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/bucket-in-alarm.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/bucket-in-alarm.png new file mode 100755 index 00000000..f7ae1b0e Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/bucket-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/filter-bucket-access-control.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/filter-bucket-access-control.png new file mode 100755 index 00000000..4d0a99ed Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/filter-bucket-access-control.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/find-bucket.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/find-bucket.png new file mode 100755 index 00000000..a981567f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/find-bucket.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/index.md b/docs/getting-started/getting-started-gcp/enable-policy-pack/index.md new file mode 100755 index 00000000..ed3975c6 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/enable-policy-pack/index.md @@ -0,0 +1,97 @@ +--- +title: Enable Your First Guardrails Policy Pack +sidebar_label: Enable Policy Pack +--- + + +# Enable your First Policy Pack + +In this guide, you will learn how to attach a Guardrails [Policy Pack](/guardrails/docs/guides/configuring-guardrails/policy-packs) to enable governance controls. + +This is the fourth guide in the *Getting started with GCP* series. + +## Prerequisites + +- Completion of the previous guides in this series. +- Access to the Guardrails console with administrative privileges. +- Access to the GCP console with the ability to create and modify storage buckets. + +## Step 1: Check bucket access control in GCP + +Check the properties of the bucket you created in the previous guide ([Observe GCP activity](/guardrails/docs/getting-started/getting-started-gcp/observe-gcp-activity)). Verify that access control is still set to *Fine-grained* on the test bucket you created. + +

change bucket property

+ +## Step 2: Filter controls + +You bookmarked the **Controls by State** report in [Connect a Project](/guardrails/docs/getting-started/getting-started-gcp/observe-gcp-activity), go there now. From the filter bar open the **Type** dropdown and search for `gcp storage bucket access control`. Select the checkbox next to `GCP > Storage > Bucket > Access Control`. + +

filter bucket access control

+ +## Step 3: Find your bucket + +Search for your bucket by typing its name into the search field. It should be in the `Skipped` state, because Guardrails has not been configured to check bucket access control. + +

find bucket

+ +## Step 4: Navigate to your account + +Control-click on the **Guardrails** logo on the top of the page to open a new homepage browser tab. + +

locate-policy-pack-manage-1

+ +Click on the **Accounts** sub-tab from the homepage and then select your GCP account. + +

locate-policy-pack-manage-2

+ +On the account resource page, select the **Detail** sub-tab. + +

aws-locate-policy-pack-manage-3

+ + +## Step 5: Locate the Policy Pack manager + +Select the **Manage Link** next to **Policy Packs** UI widget. + +

locate-policy-pack-manage-4

+ + +## Step 6: Attach the Policy Pack to your project + +In the **Edit policy pack attachments** dialog box, select **Add**. + +

attach-1

+ + +Your Guardrails workspace should have the Policy Pack [Enforce Uniform Access is Enabled for GCP Storage Buckets](https://hub.guardrails.turbot.com/policy-packs/gcp_storage_enforce_uniform_access_on_buckets) pre-installed. + +In the dropdown, select the Policy Pack named `Enforce Uniform Access is Enabled for GCP Storage Buckets`. Then select **Save**. + +

attach-2

+ + +## Step 7: Observe policy effect + +Return to your open browser tab (or bookmark) for the **Controls by State** report. Observe that the control state for your test bucket changes from `Skip` to `Alarm`. It is in the `Alarm` state because you turned off uniform access in [Observe GCP Activity](/guardrails/docs/getting-started/getting-started-gcp/observe-gcp-activity) but the policy requires it. + +

bucket-in-alarm

+ +## Step 8: Review + +In this guide you've attached a Policy Pack to your GCP account to check GCP bucket access control, and observed how the policy affects your bucket's control for Access Control. + +## Next Steps + +In the [next guide](/guardrails/docs/getting-started/getting-started-gcp/review-project-wide) you will create some additional buckets to see how the Policy Pack responds to new resource creation. + +## Progress tracker +- [x] Prepare a GCP Project for Import to Guardrails +- [x] Connect a GCP Project to Guardrails +- [x] Observe GCP Activity +- [x] **Enable Your First Guardrails Policy Pack** +- [ ] Review Project-Wide Governance +- [ ] Create a Static Exception to a Guardrails Policy +- [ ] Create a Calculated Exception to a Guardrails GCP Policy +- [ ] Send an Alert to Email +- [ ] Apply a Quick Action +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-1.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-1.png new file mode 100755 index 00000000..54bb0480 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-1.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-2.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-2.png new file mode 100755 index 00000000..98b214f8 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-2.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-3.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-3.png new file mode 100755 index 00000000..af37a922 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-3.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-4.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-4.png new file mode 100755 index 00000000..98cb9161 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/navigate-4.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-attach-1.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-attach-1.png new file mode 100755 index 00000000..93a7ad6e Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-attach-1.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-attach-2.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-attach-2.png new file mode 100755 index 00000000..f4a06c8b Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-attach-2.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-bucket-in-alarm.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-bucket-in-alarm.png new file mode 100755 index 00000000..5a055ed5 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-bucket-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-find-bucket.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-find-bucket.png new file mode 100755 index 00000000..2bb1c917 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-find-bucket.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-2.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-2.png new file mode 100755 index 00000000..164d3093 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-2.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-3.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-3.png new file mode 100755 index 00000000..a05b378a Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-3.png differ diff --git a/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-4.png b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-4.png new file mode 100755 index 00000000..28c0103f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/enable-policy-pack/raw-navigate-4.png differ diff --git a/docs/getting-started/getting-started-gcp/index.md b/docs/getting-started/getting-started-gcp/index.md new file mode 100755 index 00000000..679d2964 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/index.md @@ -0,0 +1,21 @@ +--- +title: Getting Started with GCP +sidebar_label: Getting Started with GCP +--- + +# Getting Started with GCP + +This series of guides provides a curated experience to import your first GCP project and learn how to use Turbot Guardrails. If you are brand-new to Guardrails, we highly recommend that you walk through the guides in order and follow each step. Once you are familar with the concepts presented here, you can then focus in on a specific use case important to your organization. You can browse our library of use case examples on [The Guardrails Hub](https://hub.guardrails.turbot.com/) + +| Guide | Description +| - | - | +| [Prepare a Project](getting-started/getting-started-gcp/prepare-project) | Prepare a GCP project for import into Guardrails. | +| [Connect a Project](getting-started/getting-started-gcp/connect-project) | Import a GCP project. | +| [Observe Resource Activity](getting-started/getting-started-gcp/observe-gcp-activity) | Monitor GCP [resource](/guardrails/docs/reference/glossary#resource) activities. | +| [Enable a Policy Pack](getting-started/getting-started-gcp/enable-policy-pack) | Attach a [Policy Pack](/guardrails/docs/concepts/policy-packs) to enforce security and compliance. | +| [Review Project-Wide Activity](getting-started/getting-started-gcp/review-project-wide) | Observe the effect of a Policy Pack across your project. | +| [Create a Static Exception](getting-started/getting-started-gcp/create-static-exception) | Create a static policy exception for a specific resource. | +| [Create a Calculated Exception](getting-started/getting-started-gcp/create-calculated-exception) | Create a [Calculated Policy](/guardrails/docs/reference/glossary#calculated-policy) that use [CMDB](/guardrails/docs/reference/glossary#cmdb) data, a [GraphQL](/guardrails/docs/reference/glossary#graphql) query, and a Nunjucks template to dynamically generate resource-specific policy values. | +| [Send Alerts](getting-started/getting-started-gcp/send-alert-to-email) | Set up Guardrails [notifications](/guardrails/docs/reference/glossary#notifications) to send real-time alerts about events that occur in your cloud infrastructure. | +| [Apply a Quick Action](getting-started/getting-started-gcp/apply-quick-action) | Enable users to initiate specific, one-time [Control](/guardrails/docs/reference/glossary#control) enforcements directly from the Guardrails UI. | +| [Enable Enforcement](getting-started/getting-started-gcp/enable-enforcement) | Enable enforcement in Guardrails to ensure automatic remediation of policy violations. | \ No newline at end of file diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/change-bucket-property.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/change-bucket-property.png new file mode 100755 index 00000000..ac23de29 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/change-bucket-property.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/change-detected.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/change-detected.png new file mode 100755 index 00000000..70bdb4af Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/change-detected.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/create-bucket-1.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/create-bucket-1.png new file mode 100755 index 00000000..039fac02 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/create-bucket-1.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/create-bucket-2.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/create-bucket-2.png new file mode 100755 index 00000000..ddea692d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/create-bucket-2.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/diff-the-change.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/diff-the-change.png new file mode 100755 index 00000000..e8420d26 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/diff-the-change.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-1.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-1.png new file mode 100755 index 00000000..967b4c49 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-1.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-2.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-2.png new file mode 100755 index 00000000..0e44b00c Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-2.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-3.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-3.png new file mode 100755 index 00000000..161e56de Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/filter-3.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/index.md b/docs/getting-started/getting-started-gcp/observe-gcp-activity/index.md new file mode 100755 index 00000000..794b413c --- /dev/null +++ b/docs/getting-started/getting-started-gcp/observe-gcp-activity/index.md @@ -0,0 +1,100 @@ +--- +title: Observe GCP Activity +sidebar_label: Observe Resource Activity +--- + + +# Observe GCP Resource Activity + +In this guide you will learn how Guardrails detects and reacts to events in your GCP account. You will manually create and modify a GCP bucket in your account and explore how to view that activity in the Guardrails console. + +This is the third guide in the *Getting started with GCP* series. + +## Prerequisites + +- Completion of the previous guides in this series. + +- Access to the Guardrails console with administrative privileges. + +- Console access to a GCP project the ability to create and modify S3 buckets. + +> [!NOTE] +> We will use the bucket name `guardrails_bucket_example_01` in this guide. + +## Step 1: Prepare to create a GCP bucket + +In the GCP console, navigate to **Cloud Storage**, select **Buckets**, and select **Create**. + +

create-bucket-1

+ +## Step 2: Create the bucket + +Give your bucket a name that is easy to remember, accept all the defaults, and choose **Create**. + +

gcp-resource-type-dropdown

+ +## Step 3: Resource Activities report + +Select **Reports** from the top navigation bar. Search for the word "resource" and select **Resource Activities**. + +

aws_search_resource_activities

+ +## Step 4: Filter by type + +From the filter bar, expand the **Resource Type** dropdown. + +

aws-resource-type-dropdown

+ +Set the filter to **GCP > Storage > Bucket**. You can do this by typing `gcp storage bucket` into the search box, as shown here. When you see `GCP > Storage > Bucket` appear in the list, select the checkbox next to it. + +

filter-1

+ +## Step 5: Select the filter + +Enable the checkbox to limit the report to only GCP buckets. +

filter-2

+ +## Step 5: Observe activity + +You can scope the resource activity report to a specific bucket by searching for the name of your bucket. To do this, type its name into the search field. Guardrails will show all notifications related to the bucket. In the screen below, the `RESOURCE CREATED` activity represents Guardrails discovery of the bucket and `RESOURCE UPDATED` indicates that Guardrails has updated the CMDB entry with additional details about the bucket. + +

see notifications

+ +## Step 6: Change a bucket property + +Now visit your bucket in the GCP console, and switch access control from the default, *Uniform*, to *Fine-grained*. + +

change bucket property

+ +## Step 7: Observe events + +Switch back to the Guardrails console browser tab. Guardrails' event processing system will soon detect the change, and a new `RESOURCE UPDATED` notification will appear in the list. Select that new notification from the Activities list. + +

change detected

+ +## Step 8: Audit resource change + +On the notifications detail page, you can see metadata about the change and even audit the changes in configuration between the previous known state and the observed change. Scroll down in the **DIFF** section to observe the changes that Guardrails has recorded. + + +

diff-the-change

+ +## Step 9: Review + +In this guide you changed the access control property of a GCP bucket and observed how Guardrails recorded the change. + +## Next Steps + +Next we'll explore [how to enable a  policy pack](/guardrails/docs/getting-started/getting-started-gcp/enable-policy-pack) that requires buckets to enable uniform access. + +## Progress tracker +- [x] Prepare a GCP Project for Import to Guardrails +- [x] Connect a GCP Project to Guardrails +- [x] **Observe GCP Activity** +- [ ] Enable Your First Guardrails Policy Pack +- [ ] Review Project-Wide Governance +- [ ] Create a Static Exception to a Guardrails Policy +- [ ] Create a Calculated Exception to a Guardrails GCP Policy +- [ ] Send an Alert to Email +- [ ] Apply a Quick Action +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-bucket-created.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-bucket-created.png new file mode 100755 index 00000000..57c2e1b2 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-bucket-created.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-change-bucket-property.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-change-bucket-property.png new file mode 100755 index 00000000..949da7ba Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-change-bucket-property.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-change-detected.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-change-detected.png new file mode 100755 index 00000000..e83c48ee Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-change-detected.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-create-bucket-1.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-create-bucket-1.png new file mode 100755 index 00000000..a27f56d3 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-create-bucket-1.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-create-bucket-2.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-create-bucket-2.png new file mode 100755 index 00000000..6efc319d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-create-bucket-2.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-diff-the-change.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-diff-the-change.png new file mode 100755 index 00000000..881b6182 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-diff-the-change.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-1.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-1.png new file mode 100755 index 00000000..94fa486d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-1.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-2.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-2.png new file mode 100755 index 00000000..6e38d31b Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-2.png differ diff --git a/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-3.png b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-3.png new file mode 100755 index 00000000..61fc10e5 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/observe-gcp-activity/raw-filter-3.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/credentials-1.png b/docs/getting-started/getting-started-gcp/prepare-project/credentials-1.png new file mode 100755 index 00000000..f885baa0 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/credentials-1.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/credentials-2.png b/docs/getting-started/getting-started-gcp/prepare-project/credentials-2.png new file mode 100755 index 00000000..9eb95279 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/credentials-2.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/credentials-3.png b/docs/getting-started/getting-started-gcp/prepare-project/credentials-3.png new file mode 100755 index 00000000..c9f882e2 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/credentials-3.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/enable-apis.png b/docs/getting-started/getting-started-gcp/prepare-project/enable-apis.png new file mode 100755 index 00000000..1f750bde Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/enable-apis.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/finish-service-account.png b/docs/getting-started/getting-started-gcp/prepare-project/finish-service-account.png new file mode 100755 index 00000000..11ba2f0a Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/finish-service-account.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/index.md b/docs/getting-started/getting-started-gcp/prepare-project/index.md new file mode 100755 index 00000000..bea07ea9 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/prepare-project/index.md @@ -0,0 +1,108 @@ +--- +title: Prepare a GCP Project for Import to Guardrails +sidebar_label: Prepare a GCP Project +--- + + +# Prepare a GCP project for import to Guardrails + +In this guide you will prepare a GCP project for import into Guardrails using the least-privileged roles — and minimal set of enabled APIs — necessary for the task. + +This is the first guide in the *Getting started with GCP* series. + +**Prerequisites** + +- Access to the Turbot Guardrails console with admin privilege. + +- A GCP project to import into Guardrails, with GCP admin privileges. + +## Step 1: Locate IAM & Admin > Service Accounts + +Log in to the Google Cloud console, select the project Guardrails will connect to, navigate to **IAM & Admin** and select **Service Accounts**. + +

service-account-1

+ +## Step 2: Begin creating a service account + +Select **Create Service Account** +

service-account-2

+ +## Step 3: Name the account + +Name the account according to the pattern `{service-account-name}@{project_id}.iam.gserviceaccount.com`, add a description, and select **Create and Continue**. + +

service-account-3

+ +## Step 4: Grant Viewer role + + +Click in **Select a role** to activate the filter, enter the search term `viewer`, and select **Viewer**. + +

viewer-role

+ + + +## Step 5: Also grant Logging Admin and Pub/Sub Admin + +Use **Add Another Role** to do the same for **Logging Admin** and **Pub/Sub Admin**. Then select **Continue**. +

other-roles

+ + +## Step 6: Finish creating the service account + +Select **Done**. +

finish-service-account

+ +## Step 7: Locate key manager + +Select the vertical ellipsis (**⋮**) next to your new service account and choose **Manage keys**. + +

credentials-1

+ +## Step 8: Add key + +Select **Add Key**, and choose **Create new key**. + +

credentials-1

+ +## Step 9: Create key + +Keep the **JSON** default, and select **Create**. The key file will be saved to your downloads folder with a name like `YOUR_PROJECT-fd9ce4f0e38b`. + +

credentials-1

+ +## Step 10: Enable APIs + +You will to enable these APIs: + +- Cloud Resource Manager +- Cloud Pub/Sub +- Cloud Logging + +Navigate to **APIS & services** and review the list of enabled APIs. If any of the above are not include, then: + +- Choose **Enable APIs and Services** +- Search for the API by name +- Choose **Enable** + +

credentials-1

+ +## Step 11: Review + +In this guide you've learned how to prepare the least-privileged credentials — and enable the minimal set of APIs — needed to import your project into Guardrails. + +## Next Steps + +In the [next guide](/guardrails/docs/getting-started/getting-started-gcp/connect-project) you will use those credentials to import a GCP project into Guardrails. + +## Progress tracker +- [x] **Prepare a GCP Project for Import to Guardrails** +- [ ] Connect a GCP Project to Guardrails +- [ ] Observe GCP Activity +- [ ] Enable Your First Guardrails Policy Pack +- [ ] Review Project-Wide Governance +- [ ] Create a Static Exception to a Guardrails Policy +- [ ] Create a Calculated Exception to a Guardrails GCP Policy +- [ ] Send an Alert to Email +- [ ] Apply a Quick Action +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/prepare-project/other-roles.png b/docs/getting-started/getting-started-gcp/prepare-project/other-roles.png new file mode 100755 index 00000000..c1cb7948 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/other-roles.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-1.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-1.png new file mode 100755 index 00000000..d83b2bdb Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-1.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-2.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-2.png new file mode 100755 index 00000000..8d92fa23 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-2.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-3.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-3.png new file mode 100755 index 00000000..fb05b283 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-credentials-3.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-enable-apis.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-enable-apis.png new file mode 100755 index 00000000..aceaf76a Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-enable-apis.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-finish-service-account.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-finish-service-account.png new file mode 100755 index 00000000..45ef235f Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-finish-service-account.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-other-roles.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-other-roles.png new file mode 100755 index 00000000..0695c3d3 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-other-roles.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-1.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-1.png new file mode 100755 index 00000000..1012fbb7 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-1.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-2.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-2.png new file mode 100755 index 00000000..97bb1bd2 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-2.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-3.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-3.png new file mode 100755 index 00000000..21d18a1d Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-service-account-3.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/raw-viewer-role.png b/docs/getting-started/getting-started-gcp/prepare-project/raw-viewer-role.png new file mode 100755 index 00000000..7800ecb0 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/raw-viewer-role.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/service-account-1.png b/docs/getting-started/getting-started-gcp/prepare-project/service-account-1.png new file mode 100755 index 00000000..5df32d45 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/service-account-1.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/service-account-2.png b/docs/getting-started/getting-started-gcp/prepare-project/service-account-2.png new file mode 100755 index 00000000..72517e77 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/service-account-2.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/service-account-3.png b/docs/getting-started/getting-started-gcp/prepare-project/service-account-3.png new file mode 100755 index 00000000..a3846365 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/service-account-3.png differ diff --git a/docs/getting-started/getting-started-gcp/prepare-project/viewer-role.png b/docs/getting-started/getting-started-gcp/prepare-project/viewer-role.png new file mode 100755 index 00000000..ccb2ff69 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/prepare-project/viewer-role.png differ diff --git a/docs/getting-started/getting-started-gcp/review-project-wide/filter-1.png b/docs/getting-started/getting-started-gcp/review-project-wide/filter-1.png new file mode 100755 index 00000000..3b9ebbf7 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/review-project-wide/filter-1.png differ diff --git a/docs/getting-started/getting-started-gcp/review-project-wide/filter-2.png b/docs/getting-started/getting-started-gcp/review-project-wide/filter-2.png new file mode 100755 index 00000000..d646a5fb Binary files /dev/null and b/docs/getting-started/getting-started-gcp/review-project-wide/filter-2.png differ diff --git a/docs/getting-started/getting-started-gcp/review-project-wide/index.md b/docs/getting-started/getting-started-gcp/review-project-wide/index.md new file mode 100755 index 00000000..aaad5503 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/review-project-wide/index.md @@ -0,0 +1,69 @@ +--- +title: Review Project-Wide Governance +sidebar_label: Project-Wide Governance +--- + + +# Review Project-Wide Bucket Access Control + +In this guide you’ll see how a single Policy Pack can govern all resources across a project. + +This is the fifth guide in the *Getting started with GCP* series. + +## Prerequisites + +- Completion of the previous guides in this series. + +- Access to the Guardrails console with administrative privileges. + + +## Step 1: Open the Controls by State report + +Navigate back to the **Controls by State** report (or use your saved bookmark), expand the **Type** dropdown, and search for `gcp storage bucket access control`. Enable the checkbox next to **GCP > Strorage > Bucket > Access Control** to set the filter. + +

filter-1

+ +## Step 2: Filter on controls for bucket access control + +Your test bucket is in the `Alarm` (red) state: out of policy. Other buckets in the project, if created with the default uniform access, are in the `OK` (green) state: in policy. + +

filter-2

+ +## Step 3: Create test GCP buckets + +Return to the GCP console and (as you did in the **Observe Resource Activity** guide) create three new buckets with access control set to *Fine-grained*. For the example, we will create the following new buckets: + +- guardrails_bucket_example_02 +- guardrails_bucket_example_03 +- guardrails_bucket_example_04 + +Keep your names similar and consistent so you can easily filter and see all your test buckets together. + +## Step 4: View newly created buckets + +As you create the new buckets, Guardrails detects them and evaluates their configuration relative to your policies. By changing our search string we can see all buckets at the same time. + +

new-buckets-in-alarm

+ +The new buckets are in the `Alarm` state because, as with the first one, you set access control to *Fine-grained*. The current policy requires all buckets to have uniform access enabled. + +## Step 5: Review + +In this guide you created three new GCP buckets and observed how the Policy Pack added at the project level evaluates their governance status. + + +## Next Steps + +In the [next guide](/guardrails/docs/getting-started/getting-started-gcp/create-static-exception) we’ll learn how to create an exception so that a bucket can be exempt from the access control requirement. + +## Progress tracker +- [x] Prepare a GCP Project for Import to Guardrails +- [x] Connect a GCP Project to Guardrails +- [x] Observe GCP Activity +- [x] Enable Your First Guardrails Policy Pack +- [x] **Review Project-Wide Governance** +- [ ] Create a Static Exception to a Guardrails Policy +- [ ] Create a Calculated Exception to a Guardrails GCP Policy +- [ ] Send an Alert to Email +- [ ] Apply a Quick Action +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/review-project-wide/new-buckets-in-alarm.png b/docs/getting-started/getting-started-gcp/review-project-wide/new-buckets-in-alarm.png new file mode 100755 index 00000000..9fb6c169 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/review-project-wide/new-buckets-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/review-project-wide/raw-filter-1.png b/docs/getting-started/getting-started-gcp/review-project-wide/raw-filter-1.png new file mode 100755 index 00000000..26360aed Binary files /dev/null and b/docs/getting-started/getting-started-gcp/review-project-wide/raw-filter-1.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/bucket-in-alarm.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/bucket-in-alarm.png new file mode 100755 index 00000000..96769631 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/bucket-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/create-notification-rule.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/create-notification-rule.png new file mode 100755 index 00000000..49b80cb3 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/create-notification-rule.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/enable-notifications.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/enable-notifications.png new file mode 100755 index 00000000..b1a72d99 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/enable-notifications.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/find-skipped-bucket.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/find-skipped-bucket.png new file mode 100755 index 00000000..bb4a836b Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/find-skipped-bucket.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/index.md b/docs/getting-started/getting-started-gcp/send-alert-to-email/index.md new file mode 100755 index 00000000..ba930408 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/send-alert-to-email/index.md @@ -0,0 +1,115 @@ +--- +title: Send an Alert to Email +sidebar_label: Send an Alert to Email +--- + +# Send an Alert to Email + +In this guide you'll learn how to enable Guardrails notifications and configure the notification rules to send email notifications. Similar configuration options exist to send notifications to Slack or Teams channels, and to generic webhooks. Our [launch week announcement blog post](/guardrails/blog/2023/10/guardrails-notifications) includes a demo of notifications in action. + +This is the eighth guide in the *Getting started with GCP series*. + +**Prerequisites**: + +- Completion of the previous guides in this series. +- Access to the Guardrails console with administrative privileges. + + +## Step 1: Create policy setting + +To enable notifications for your workspace, select **Policies** in the top navigation bar, and then search for `turbot notifications`. Select the **Turbot > Notifications** policy type. + +

search-notifications-policy-type

+ +Select the **New Policy Setting** button. + +

view-turbot-notifications-policy-type

+ +## Step 2: Choose level + +Select the **Turbot** root node as the resource. + +> [!NOTE] +> Notifications polices may only be created at the root level (aka Turbot level) of the resource hierarchy. + +

choose-turbot-root

+ +## Step 3: Choose setting + +Choose the **Enabled** setting. Then select **Create**. + +

enable-notifications

+ +## Step 4: List notifications policies + +Navigate back to the list of Notification policies by clicking on the word `Notifications` in the `Turbot > Notifications` breadcrumb. + +

notifications-enabled

+ +## Step 5: Select Rules policy + +Select the **Rule-Based Routing** policy type from the list of policies. + +

rule-based-routing

+ +## Step 6: View the policy + +Select **New Policy Setting**. + +

rule-based-routing

+ +## Step 7: Create notification rule + +Again choose **Turbot** as the **Resource**. Copy and paste this rule, using one or more email addresses you want to notify. + +```yaml +- rules: NOTIFY $.control.state:alarm $.control.state:alarm $.controlType.uri:'tmod:@turbot/gcp-storage#/control/types/bucketAccessControl' + emails: + - you@yourcompany.com +``` + +The rule will send an alert to the configured email address when any control enters the `Alarm` state for bucket access control. + +Select **Create**. + +

create-rule

+ +## Step 8: Find the bucket skipped by your calculated policy + +At the end of [Create a calculated exception](/guardrails/getting-started/getting-started-gcp/create_calculated_exception), your test bucket – the one you tagged with `environment:development` – was in a `Skipped` state for access control. To verify, revisit **Controls by State**, choose the **Type** as **GCP > Storage > Bucket > Access Control**, and search for the bucket. + +

find-skipped-bucket

+ +## Step 9: Trigger the notification + +Now, in the GCP console, change the label `environment:development` to `environment:production`. The calculated policy setting, which had evaluated to `Skip`, now evaluates to `Check: Uniform`. And because you left the bucket’s access control in the fine-grained state, the bucket’s control for access control now transitions to `Alarm`.   + +

observe-unlabeled-bucket-in-alarm

+ + +## Step 10: Check your email + +The alarm reported in the Guardrails console also appears in your inbox. You can alternatively configure Guardrails to send alerts to [Slack]([guardrails/docs/guides/notifications/templates#example-slack-template](https://turbot.com/guardrails/docs/guides/notifications/templates#example-slack-template)) or [MS Teams](/guardrails/docs/guides/notifications/templates#example-ms-teams-template). + +

view-email-notification

+ +## Step 11: Review + +In this guide you configured a simple notification rule and triggered a notification event. + + +## Next Steps + +In the [next guide](/guardrails/docs/getting-started/getting-started-aws/apply-quick-action) you’ll learn how to configure for [Quick Actions]([/guardrails/docs/guides/quick-actions](https://turbot.com/guardrails/docs/guides/quick-actions#enabling-quick-actions)) so you can, for example, directly enable uniform access on a bucket that’s now in the `Alarm` state and make it green. + +## Progress tracker +- [x] Prepare a GCP Project for Import to Guardrails +- [x] Connect a GCP Project to Guardrails +- [x] Observe GCP Activity +- [x] Enable Your First Guardrails Policy Pack +- [x] Review Project-Wide Governance +- [x] Create a Static Exception to a Guardrails Policy +- [x] Create a Calculated Exception to a Guardrails GCP Policy +- [x] **Send an Alert to Email** +- [ ] Apply a Quick Action +- [ ] Enable Automatic Enforcement diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/locate-rule-based-routing.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/locate-rule-based-routing.png new file mode 100755 index 00000000..fce8be8e Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/locate-rule-based-routing.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/notifications-enabled.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/notifications-enabled.png new file mode 100755 index 00000000..54699d75 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/notifications-enabled.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-bucket-in-alarm.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-bucket-in-alarm.png new file mode 100755 index 00000000..7242c00e Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-bucket-in-alarm.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-create-notification-rule.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-create-notification-rule.png new file mode 100755 index 00000000..62af86fa Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-create-notification-rule.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-find-skipped-bucket.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-find-skipped-bucket.png new file mode 100755 index 00000000..9b472150 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-find-skipped-bucket.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-search-notifications-policy-type.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-search-notifications-policy-type.png new file mode 100755 index 00000000..bc8d6f2a Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/raw-search-notifications-policy-type.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/search-notifications-policy-type.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/search-notifications-policy-type.png new file mode 100755 index 00000000..edf44597 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/search-notifications-policy-type.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/view-email-notification.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/view-email-notification.png new file mode 100755 index 00000000..dbc4e52c Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/view-email-notification.png differ diff --git a/docs/getting-started/getting-started-gcp/send-alert-to-email/view-turbot-notifications-policy-type.png b/docs/getting-started/getting-started-gcp/send-alert-to-email/view-turbot-notifications-policy-type.png new file mode 100755 index 00000000..513bd045 Binary files /dev/null and b/docs/getting-started/getting-started-gcp/send-alert-to-email/view-turbot-notifications-policy-type.png differ diff --git a/docs/getting-started/getting-started-gcp/sidebar.json b/docs/getting-started/getting-started-gcp/sidebar.json new file mode 100755 index 00000000..118726b0 --- /dev/null +++ b/docs/getting-started/getting-started-gcp/sidebar.json @@ -0,0 +1,580 @@ +[ + { + "type": "category", + "link": "/", + "id": "index", + "items": [] + }, + { + "type": "category", + "id": "getting-started", + "link": "getting-started", + "items": [ + { + "type": "category", + "id": "7-minute-labs", + "link": "getting-started/7-minute-labs", + "items": [ + "getting-started/7-minute-labs/set-policy", + "getting-started/7-minute-labs/calc-policy", + "getting-started/7-minute-labs/cli", + "getting-started/7-minute-labs/graphql", + "getting-started/7-minute-labs/terraform" + ] + }, + { + "type": "category", + "id": "getting-started-aws", + "link": "getting-started/getting-started-aws", + "items": [ + "getting-started/getting-started-aws/prepare-account", + "getting-started/getting-started-aws/connect-an-account", + "getting-started/getting-started-aws/observe-aws-activity", + "getting-started/getting-started-aws/enable-policy-pack", + "getting-started/getting-started-aws/review-account-wide", + "getting-started/getting-started-aws/create-static-exception", + "getting-started/getting-started-aws/create-calculated-exception", + "getting-started/getting-started-aws/send-alert-to-email", + "getting-started/getting-started-aws/apply-quick-action", + "getting-started/getting-started-aws/enable-enforcement" + ] + }, + { + "type": "category", + "id": "getting-started-gcp", + "link": "getting-started/getting-started-gcp", + "items": [ + "getting-started/getting-started-gcp/prepare-project", + "getting-started/getting-started-gcp/connect-project", + "getting-started/getting-started-gcp/observe-gcp-activity", + "getting-started/getting-started-gcp/enable-policy-pack", + "getting-started/getting-started-gcp/review-project-wide", + "getting-started/getting-started-gcp/create-static-exception", + "getting-started/getting-started-gcp/create-calculated-exception", + "getting-started/getting-started-gcp/send-alert-to-email", + "getting-started/getting-started-gcp/apply-quick-action", + "getting-started/getting-started-gcp/enable-enforcement" + ] + }, + { + "type": "category", + "id": "your-guardrails-org", + "link": "getting-started/your-guardrails-org", + "items": [ + { + "type": "category", + "id": "user", + "link": "getting-started/your-guardrails-org/user", + "items": [ + "getting-started/your-guardrails-org/user/sign-up", + "getting-started/your-guardrails-org/user/profile" + ] + }, + { + "type": "category", + "id": "organizations", + "link": "getting-started/your-guardrails-org/organizations", + "items": [ + "getting-started/your-guardrails-org/organizations/setup", + "getting-started/your-guardrails-org/organizations/team", + "getting-started/your-guardrails-org/organizations/profile" + ] + } + ] + }, + "getting-started/terraform-for-everything", + "getting-started/faq" + ] + }, + { + "type": "category", + "id": "concepts", + "link": "concepts", + "items": [ + "concepts/activities", + "concepts/controls", + { + "type": "category", + "id": "guardrails", + "link": "concepts/guardrails", + "items": [ + "concepts/guardrails/access-logging", + "concepts/guardrails/active", + "concepts/guardrails/approved", + "concepts/guardrails/audit-logging", + "concepts/guardrails/budget", + "concepts/guardrails/cmdb", + "concepts/guardrails/discovery", + "concepts/guardrails/encryption-at-rest", + "concepts/guardrails/encryption-in-transit", + "concepts/guardrails/public-access", + "concepts/guardrails/scheduling", + "concepts/guardrails/configured", + { + "type": "category", + "id": "guardrails/tagging", + "link": "concepts/guardrails/tagging", + "items": [ + "concepts/guardrails/tagging/dynamic-tags", + "concepts/guardrails/tagging/require-keys", + "concepts/guardrails/tagging/tag-casing", + "concepts/guardrails/tagging/tagging-helpers" + ] + }, + "concepts/guardrails/trusted-access", + "concepts/guardrails/usage" + ] + }, + { + "type": "category", + "id": "iam", + "link": "concepts/iam", + "items": [ + "concepts/iam/authentication", + "concepts/iam/identity", + "concepts/iam/permissions" + ] + }, + { + "type": "category", + "id": "policies", + "link": "concepts/policies", + "items": [ + "concepts/policies/hierarchy", + "concepts/policies/types-categories", + "concepts/policies/values-settings", + "concepts/policies/taxonomy", + "concepts/policies/calculated-faq" + ] + }, + "concepts/policy-packs", + "concepts/processes", + { + "type": "category", + "id": "resources", + "link": "concepts/resources", + "items": [ + "concepts/resources/hierarchy", + "concepts/resources/types-categories", + "concepts/resources/discovery" + ] + } + ] + }, + { + "type": "category", + "id": "guides", + "link": "guides", + "items": [ + { + "type": "category", + "id": "aws", + "link": "guides/aws", + "items": [ + { + "type": "category", + "id": "import-aws-account", + "link": "guides/aws/import-aws-account", + "items": ["guides/aws/import-aws-account/gov-cloud"] + }, + { + "type": "category", + "id": "event-handlers", + "link": "guides/aws/event-handlers", + "items": ["guides/aws/event-handlers/poller"] + }, + "guides/aws/services", + { + "type": "category", + "id": "permissions", + "link": "guides/aws/permissions", + "items": ["guides/aws/permissions/user-mode"] + }, + "guides/aws/security-hub", + "guides/aws/decommission" + ] + }, + { + "type": "category", + "id": "azure", + "link": "guides/azure", + "items": [ + { + "type": "category", + "id": "import", + "link": "guides/azure/import", + "items": [ + "guides/azure/import/tenant", + "guides/azure/import/active-directory", + "guides/azure/import/management-group", + "guides/azure/import/subscription" + ] + }, + { + "type": "category", + "id": "real-time-events", + "link": "guides/azure/real-time-events", + "items": [ + "guides/azure/real-time-events/ad-event-pollers", + "guides/azure/real-time-events/event-pollers", + "guides/azure/real-time-events/mgmt-event-pollers", + "guides/azure/real-time-events/event-handlers" + ] + }, + "guides/azure/services", + "guides/azure/permissions", + "guides/azure/decommission" + ] + }, + { + "type": "category", + "id": "gcp", + "link": "guides/gcp", + "items": [ + { + "type": "category", + "id": "import", + "link": "guides/gcp/import-gcp-project", + "items": ["guides/gcp/import-gcp-project/service-accounts"] + }, + "guides/gcp/services", + "guides/gcp/permissions", + "guides/gcp/decommission", + { + "type": "category", + "id": "real-time-events", + "link": "guides/gcp/real-time-events", + "items": ["guides/gcp/real-time-events/event-pollers"] + } + ] + }, + { + "type": "category", + "id": "kubernetes", + "link": "guides/kubernetes", + "items": [ + "guides/kubernetes/import-kubernetes-cluster", + "guides/kubernetes/configure-queries", + "guides/kubernetes/decommission" + ] + }, + { + "type": "category", + "id": "servicenow", + "link": "guides/servicenow", + "items": [ + "guides/servicenow/import-servicenow-instance", + "guides/servicenow/servicenow-to-guardrails-sync", + "guides/servicenow/guardrails-to-servicenow-sync" + ] + }, + { + "type": "category", + "id": "configuring-guardrails", + "link": "guides/configuring-guardrails", + "items": [ + "guides/configuring-guardrails/install-mod", + "guides/configuring-guardrails/update-mod", + "guides/configuring-guardrails/uninstall-mod", + "guides/configuring-guardrails/auto-mod-update", + "guides/configuring-guardrails/mod-lambda-cleanup", + "guides/configuring-guardrails/account-imports", + { + "type": "category", + "id": "directories", + "link": "guides/configuring-guardrails/directories", + "items": [ + "guides/configuring-guardrails/directories/aws-sso", + "guides/configuring-guardrails/directories/azure-ad", + "guides/configuring-guardrails/directories/google", + "guides/configuring-guardrails/directories/okta", + "guides/configuring-guardrails/directories/onelogin", + "guides/configuring-guardrails/directories/ldap-ldaps", + "guides/configuring-guardrails/directories/local", + "guides/configuring-guardrails/directories/pingid" + ] + }, + "guides/configuring-guardrails/ebs-volume-conversion", + "guides/configuring-guardrails/files", + { + "type": "category", + "id": "firehose", + "link": "guides/configuring-guardrails/firehose", + "items": ["guides/configuring-guardrails/firehose/pipelines"] + }, + { + "type": "category", + "id": "managing-policies", + "link": "guides/configuring-guardrails/managing-policies", + "items": [ + "guides/configuring-guardrails/managing-policies/config-examples", + "guides/configuring-guardrails/managing-policies/OCL", + "guides/configuring-guardrails/managing-policies/YAML" + ] + }, + "guides/configuring-guardrails/network-stack", + "guides/configuring-guardrails/policy-packs", + "guides/configuring-guardrails/regions", + { + "type": "category", + "id": "guides/configuring-guardrails/working-with-folders", + "link": "guides/configuring-guardrails/working-with-folders", + "items": [ + "guides/configuring-guardrails/working-with-folders/create", + "guides/configuring-guardrails/working-with-folders/delete", + "guides/configuring-guardrails/working-with-folders/renaming" + ] + }, + "guides/configuring-guardrails/change-window" + ] + }, + { + "type": "category", + "id": "using-guardrails", + "link": "guides/using-guardrails", + "items": [ + { + "type": "category", + "id": "console", + "link": "guides/using-guardrails/console", + "items": [ + "guides/using-guardrails/console/reports", + "guides/using-guardrails/console/detail-pages" + ] + }, + "guides/using-guardrails/graphql", + { + "type": "category", + "id": "iam", + "link": "guides/using-guardrails/iam", + "items": [ + "guides/using-guardrails/iam/administrators", + "guides/using-guardrails/iam/user-mgt", + "guides/using-guardrails/iam/access-keys", + "guides/using-guardrails/iam/permission-assignment", + "guides/using-guardrails/iam/advanced" + ] + }, + + { + "type": "category", + "id": "notifications", + "link": "guides/using-guardrails/notifications", + "items": [ + "guides/using-guardrails/notifications/filter-rules", + "guides/using-guardrails/notifications/templates" + ] + }, + "guides/using-guardrails/nunjucks", + "guides/using-guardrails/quick-actions", + "guides/using-guardrails/searching-filtering" + ] + }, + { + "type": "category", + "id": "hosting-guardrails", + "link": "guides/hosting-guardrails", + "items": [ + "guides/hosting-guardrails/architecture", + { + "type": "category", + "id": "installation", + "link": "guides/hosting-guardrails/installation", + "items": [ + { + "type": "category", + "id": "pre-installation", + "link": "guides/hosting-guardrails/installation/pre-installation", + "items": [ + "guides/hosting-guardrails/installation/pre-installation/checklist", + "guides/hosting-guardrails/installation/pre-installation/networking", + "guides/hosting-guardrails/installation/pre-installation/service-catalog", + "guides/hosting-guardrails/installation/pre-installation/import-portfolio", + "guides/hosting-guardrails/installation/pre-installation/external-role", + "guides/hosting-guardrails/installation/pre-installation/admin-permissions", + "guides/hosting-guardrails/installation/pre-installation/cost-estimate" + ] + }, + { + "type": "category", + "id": "install-tef", + "link": "guides/hosting-guardrails/installation/install-tef", + "items": [ + "guides/hosting-guardrails/installation/install-tef/install-tef-into-new-vpc", + "guides/hosting-guardrails/installation/install-tef/install-tef-into-existing-vpc" + ] + }, + "guides/hosting-guardrails/installation/install-ted", + "guides/hosting-guardrails/installation/install-te", + "guides/hosting-guardrails/installation/workspace-manager", + "guides/hosting-guardrails/installation/workspace-login", + { + "type": "category", + "id": "post-installation", + "link": "guides/hosting-guardrails/installation/post-installation", + "items": [ + "guides/hosting-guardrails/installation/post-installation/create-ted-critical-alarms", + "guides/hosting-guardrails/installation/post-installation/create-te-critical-alarms" + ] + }, + "guides/hosting-guardrails/installation/delete-te" + ] + }, + { + "type": "category", + "id": "updating-stacks", + "link": "guides/hosting-guardrails/updating-stacks", + "items": [ + "guides/hosting-guardrails/updating-stacks/update-tef", + "guides/hosting-guardrails/updating-stacks/update-ted", + "guides/hosting-guardrails/updating-stacks/update-workspace", + "guides/hosting-guardrails/updating-stacks/domain-update", + "guides/hosting-guardrails/updating-stacks/general-purpose-gp3" + ] + }, + "guides/hosting-guardrails/FAQ", + { + "type": "category", + "id": "troubleshooting", + "link": "guides/hosting-guardrails/troubleshooting", + "items": [ + "guides/hosting-guardrails/troubleshooting/service-catalog-out-of-sync", + "guides/hosting-guardrails/troubleshooting/database-instance-not-in-available-state", + "guides/hosting-guardrails/troubleshooting/enable-verbose-logging", + "guides/hosting-guardrails/troubleshooting/peer-mod-dependency-error", + "guides/hosting-guardrails/troubleshooting/pause-events" + ] + }, + { + "type": "category", + "id": "monitoring", + "link": "guides/hosting-guardrails/monitoring", + "items": [ + "guides/hosting-guardrails/monitoring/investigate-event-flood", + "guides/hosting-guardrails/monitoring/diagnose-control-error", + "guides/hosting-guardrails/monitoring/workspace-health-check", + "guides/hosting-guardrails/monitoring/monitoring-alarms" + ] + }, + { + "type": "category", + "id": "disaster-recovery", + "link": "guides/hosting-guardrails/disaster-recovery", + "items": [ + "guides/hosting-guardrails/disaster-recovery/restore", + "guides/hosting-guardrails/disaster-recovery/dr-testing", + "guides/hosting-guardrails/disaster-recovery/database-upgrade-storage-optimization" + ] + } + ] + }, + { + "type": "category", + "id": "troubleshooting", + "link": "guides/troubleshooting", + "items": [ + "guides/troubleshooting/troubleshooting-event-handlers-aws-console", + "guides/troubleshooting/troubleshooting-event-handlers-guardrails-console" + ] + } + ] + }, + { + "type": "category", + "id": "faq", + "link": "faq", + "items": [ + "faq/aws-faq", + "faq/azure-faq", + "faq/gcp-faq", + "faq/terraform-faq", + "faq/general-faq", + { + "type": "category", + "id": "faq/workspace-faq", + "link": "faq/workspace-faq", + "items": ["faq/workspace-faq/key_rotation"] + }, + "faq/guardrails-and-aws-scps" + ] + }, + { + "type": "category", + "id": "reference", + "link": "reference", + "items": [ + { + "type": "category", + "id": "reference/cli", + "link": "reference/cli", + "items": [ + "reference/cli/installation", + "reference/cli/updating", + { + "type": "category", + "id": "reference/cli/commands", + "link": "reference/cli/commands", + "items": [ + "reference/cli/commands/aws", + "reference/cli/commands/completion", + "reference/cli/commands/compose", + "reference/cli/commands/configure", + "reference/cli/commands/download", + "reference/cli/commands/file", + "reference/cli/commands/graphql", + "reference/cli/commands/inspect", + "reference/cli/commands/install", + "reference/cli/commands/login", + "reference/cli/commands/pack", + "reference/cli/commands/publish", + "reference/cli/commands/registry", + "reference/cli/commands/template", + "reference/cli/commands/test", + "reference/cli/commands/up", + "reference/cli/commands/vcr", + "reference/cli/commands/workspace" + ] + } + ] + }, + "reference/guardrails-samples-repo", + { + "type": "category", + "id": "reference/terraform", + "link": "reference/terraform", + "items": ["reference/terraform/setup"] + }, + { + "type": "category", + "id": "reference/filter", + "link": "reference/filter", + "items": [ + "reference/filter/resources", + "reference/filter/policies", + "reference/filter/controls", + "reference/filter/notifications" + ] + }, + "reference/ocl", + { + "type": "category", + "id": "reference/graphql", + "link": "reference/graphql", + "items": [] + }, + "reference/glossary" + ] + }, + { + "type": "external", + "id": "hub-guardrails", + "link": "https://hub.guardrails.turbot.com", + "label": "Hub" + }, + { + "type": "external", + "id": "changelog", + "link": "https://turbot.com/guardrails/changelog", + "label": "Changelog" + } +] diff --git a/docs/sidebar.json b/docs/sidebar.json index 119fa332..118726b0 100644 --- a/docs/sidebar.json +++ b/docs/sidebar.json @@ -39,6 +39,23 @@ "getting-started/getting-started-aws/enable-enforcement" ] }, + { + "type": "category", + "id": "getting-started-gcp", + "link": "getting-started/getting-started-gcp", + "items": [ + "getting-started/getting-started-gcp/prepare-project", + "getting-started/getting-started-gcp/connect-project", + "getting-started/getting-started-gcp/observe-gcp-activity", + "getting-started/getting-started-gcp/enable-policy-pack", + "getting-started/getting-started-gcp/review-project-wide", + "getting-started/getting-started-gcp/create-static-exception", + "getting-started/getting-started-gcp/create-calculated-exception", + "getting-started/getting-started-gcp/send-alert-to-email", + "getting-started/getting-started-gcp/apply-quick-action", + "getting-started/getting-started-gcp/enable-enforcement" + ] + }, { "type": "category", "id": "your-guardrails-org",