Permissions

Managing GCP Permissions

Turbot Guardrails provides a rich set of capabilities for managing authentication of users, as well as authorization to GCP services and resources. Guardrails integrates with GCP IAM Identity and Access Management to provide a simple but flexible model for managing access to your GCP projects using native GCP IAM Roles.

Permissions policies are used to customize which levels are available to assign permissions, as well as the set of operations that those levels encompass. Refer to the permissions core concepts documentation for more information.

Enabling GCP permissions

To enable full GCP permissions management through Guardrails with a default configuration, set the GCP > Turbot > Permissions policy to "Enforce: Role Mode":

resource "turbot_policy_setting" "gcp_permissions" {
  resource        = "id of project or parent folder or policy pack"   //highlight-line
  type            = "tmod:@turbot/gcp-iam#/policy/types/permissions"
  value           = "Enforce: Role Mode"
}

Permissions Modes

Guardrails can be configured to operate in one of 2 permissions modes:

Standard Levels

The Permissions > Levels policies configure which standard Guardrails roles/groups/policies will be created. Levels enabled in this policy will appear in the Guardrails console, and can be assigned to a user in the Permissions tab.

This gives you a large degree of control about what rights can be granted in your organization -- You can choose to disable levels that don't apply. Example use cases:

Standard permission levels are:

Project-level permission level policies (GCP/Admin, GCP/Metadata, etc) can be configured in GCP > Permissions > Levels. By default, all levels are enabled.

Permission level policies for each service (GCP/Storage/Admin, GCP/Storage/Metadata, etc.) can be configured in GCP > {service} > Permissions > Levels.

You can use the GCP > Permissions > Levels [Default] policy to configure the default levels for all services. By default, service-level permissions are not enabled.

Modifiers

Permission Level Modifiers provide a simple mechanism to modify the standard permissions policies. Modifiers work with Guardrails' IAM rules engine to modify the access directly in the Guardrails IAM policies.

You can use Modifiers to:

Modifier example use-cases:

Modifiers leverage the existing Guardrails rules engine to modify the default Guardrails policies. They do not generate separate IAM policies.

Modifiers can add, remove, and change permissions for any GCP service to any standard permission level. Modifiers effectively redefine (override) the permission level to which an api operation is defined.

Modifiers are cumulative in the same way that levels are - if you add a permission to the Metadata level, it is also added to ReadOnly, Operator and Admin

Modifier policies exist for both GCP levels and per-service levels

Capability Modifier Policies

Capability Modifier policies allow you to either restrict access to certain sets of actions to Guardrails, or to allow them to admin users as appropriate. Capability modifiers are essentially Modifiers that are pre-defined in Guardrails. These policies are often used to force administration of resources through the Guardrails control plane, and disallow direct access to the underlying GCP APIs from users.

The Capability Modifier Policies are applied after the built-in permissions but before the custom Modifiers:

Custom Levels

Custom Levels provide another mechanism to provide flexibility in managing GCP permissions. Whereas Modifiers and Custom Policies allow you to customize the rights granted to Guardrails built-in permissions levels, Custom Levels allow you to create your own levels that you can use to assign access through the Guardrails console.

Custom Level example use-cases:

The Custom Levels policy allow you to map your existing IAM roles to Guardrails console users to provide them access to GCP. The custom roles will appear in the Guardrails Grant Permissions dialog box. They are named {Provider}/Role/{RoleName}, for example GCP/Role/NetworksAdminRole

Custom levels can be specified via the GCP > Permissions > Levels > Custom Levels [Project] policies.