Skip to main content

Create a Google Cloud Service Account and Grant Access

Overview

This topic discusses how to create a service account manually within Google Cloud so the Lacework integration can use it.

Create a Service Account

note

For more information, see Google Cloud documentation about creating and managing service accounts.

Follow these steps to create a service account:

  1. Log in to the Google Cloud Console.

  2. Go to the IAM & Admin page, then click Service Accounts > + Create Service Account.

    gcp_create_service_account.png

  3. In the Service account details step, enter values in the fields, then click Create and Continue.

  4. Skip the optional sections and click Done.

  5. On the Services Accounts page, find the newly created service account, click the menu under Actions, and click Manage keys.

    gcp_manage_keys.png

  6. Click Add Key > Create new key.

  7. Select the JSON key type, then click Create. A JSON key file downloads to your system.

    gcp_create_private_key_sa.png

    note

    After you download the key file, you cannot download it again.

  8. In the Details tab, find the email address of the new service account and copy it to your clipboard.

  9. Click the menu icon located at the top right of the page to exit the Service Accounts page.

(Configuration Only) Create the Lacework Configuration Custom Role

info

This step is required only when creating a Lacework Configuration compliance integration.

  1. Select IAM & Admin > Roles from the cloud console navigation menu. gcp_iam_roles.png

  2. Click the down arrow in the top menu bar for the project.

    gcp_role_picker.png

    The Select from dialog appears.

  3. From the Select from drop-down, select an organization that contains the Google Cloud resources that you want the integration to monitor, or select No Organization if selecting a project that does not reside within an organization.

    gcp_select_from.png

  4. In the Select from dialog, click the All tab to display the list of all entities. Select the organization or project where the custom role will be created, then click Open. gcp_select_all.png

  5. Click Create Role on the top toolbar.

    gcp_toolbar.png

  6. In the Create Role page, enter a title, description, and account identifier. From the Role launch stage drop-down, select General Availability.
    Lacework suggests naming similar to below.

    gcp_create_custom_role.png

  7. Add the required permissions by clicking + Add Permissions.

    gcp_custom_role_permissions.png

  8. Click Create.

Grant the Required Roles to the Service Account

Grant the required roles to the service account created in the previous section:

  1. Select IAM & Admin > IAM from the cloud console navigation menu.

  2. Click the down arrow in the top menu bar for the project.

    gcp_topmenu.png

    The Select from dialog appears.

  3. From the Select from drop-down, select an organization that contains the Google Cloud resources that you want the integration to monitor, or select No Organization if selecting a project that does not reside within an organization.

    gcp_select_from.png

  4. In the Select from dialog, click the All tab to display the list of all entities. Select the organization or project where the IAM roles will be granted, then click Open.

    gcp_select_all.png

  5. Click Add.

    note

    You must have permission to add members to the organization or project IAM policy for the Add button to be active.

    gcp_add_button.png

  6. Add a member and roles to a project or organization. In the New members field, paste the email address of the service account copied in an earlier step.

    gcp_add_members.png

  7. From the Select a role drop-down, select the appropriate roles depending on the integration type.

  8. (Configuration only): Add the custom role created from the Create the Lacework Configuration Custom Role section.

    gcp_select_custom_role.png

  9. Click Save.

Service Account Roles

These are the specific roles required by the service account being used for an integration, depending on the integration type and level.

Configuration Integration

The following roles are required by the service account for a configuration integration:

Role NameRole IDIntegration Level
Organization Viewerroles/resourcemanager.organizationViewerOrganization
Browserroles/browserOrganization and project
Cloud Asset Viewerroles/cloudasset.viewerOrganization and project
Security Reviewerroles/iam.securityReviewerOrganization and project
Custom role for Lacework configuration integrationCustom role with permissions listed in Lacework Configuration Role Permissions.
For instructions on creating the custom role, see Create the Lacework Configuration Custom Role.
Organization and project

Pub/Sub-Based Audit Log Integration

The following roles are required by the service account for a Pub/Sub-based audit log integration:

Role NameRole IDIntegration Level
Browserroles/browserOrganization
Monitoring Viewerroles/monitoring.viewerOrganization and project
Pub/Sub Subscriberroles/pubsub.subscriberOrganization and project

Storage-Based Audit Log Integration

The following roles are required by the service account for a Storage-based audit log integration:

Role NameRole IDIntegration Level
Organization Viewerroles/resourcemanager.organizationViewerOrganization
Storage Object Viewerroles/storage.objectViewerOrganization and project
Pub/Sub Subscriberroles/pubsub.subscriberOrganization and project

Lacework Configuration Role Permissions

In addition to the above Google Cloud roles, Lacework also requires a custom role for the Configuration integration. The permissions required are outlined in the following table:

Role NamePermissionsUsage
Lacework Configuration Rolebigquery.datasets.getRead access to retrieve dataset metadata, such as encryption keys and access permissions.
compute.projects.getRead access to project metadata, such as the resources contained within.
pubsub.topics.getRead access to Pub/Sub topics metadata.
storage.buckets.getRead access to bucket metadata, excluding IAM policies. Can also list or read Pub/Sub notification configurations on a bucket.
compute.sslPolicies.getRead access to SSL policy resources.

Next Steps