Configuring a cloud source in Scope is a two-step process.
Generating Google Cloud Storage service account credentials in the Google Cloud Console. Please refer to Section 1 – Google Cloud Storage Setup
Setting up the Google Cloud Storage cloud source in the Scope application. Please refer to Section 2 – Scope Setup
To get started, you’ll need to generate the following credentials in the Google Cloud Console –
Open the Google Cloud Console and make sure you are working in the correct project.
From the dashboard, navigate to APIs & Services.

Click on ENABLE APIS AND SERVICES.

In the API library, use the search box and search for Cloud Storage.

From the search results, click on Cloud Storage from the Google Enterprise API.

On the Cloud Storage API details page, click ENABLE.

Open the Google Cloud Platform (GCP) menu and navigate to Cloud Storage -> Buckets.

Click on the CREATE button to start creating a new bucket.

Configure your bucket with the following settings:
gcs-aef220-dee21).
Click CREATE to proceed. A prompt will appear notifying you that public access will be prevented.
Click CONFIRM to proceed unless you have a specific use case that requires public access.

After the bucket is created, copy and save the Bucket Name, as you will need it later for Scope configuration (e.g., gcs-aef220-dee21).

Sign in to the Google Cloud Console as a project editor.
Navigate to IAM & Admin → Roles and select Create Role.
Enter a Title (e.g., Get buckets & objects) and an optional Description for the custom role.
Click Add Permissions.
Filter the list of permissions and add the following:
storage.buckets.getstorage.objects.listClick Add, then click Create.
Navigate to IAM & Admin → Service Accounts.

Click CREATE SERVICE ACCOUNT.

Provide a Service Account Name (this automatically populates the Service Account ID field) and click CREATE AND CONTINUE.
Note: Make sure you are clicking the CREATE AND CONTINUE button and not the more prominent DONE button.

In the role selection section:


To limit the service account to only this bucket, add an IAM condition by clicking ADD IAM CONDITION:

Create IAM Condition - Name your IAM condition and paste the bucket name into the value field. Set the condition as shown:

Click SAVE to apply the condition, then click DONE.

In the Google Cloud Console, navigate to IAM & Admin → Service Accounts.
Go to Service Accounts and Select your service account.

Click Keys -> Add key -> Create new key.

Select JSON, then click Create.
Your new public/private key pair is generated and downloaded to your machine as a JSON file. Save this file as credentials.json in your working directory.
Note: This file is the only copy of this key, so save it in a secure location.

Click Close.
The generated Service Account Key (JSON file) and Bucket Name are to be configured in Scope Setup: Step 1 for initiating the Google Cloud Storage log ingestion.
This section helps users configure the following Google Cloud logs to ingest into the Google Cloud Storage bucket:
Note:
Navigate to IAM & Admin -> Audit Logs.

Set the default configuration and enable the following permissions:
Note: Admin Activity is enabled by default. Data Access logs must be enabled manually.

Billing must be enabled on the project.
The following APIs must be enabled:


Navigate to VPC network -> VPC networks.
Select your VPC.
Click Manage flow logs.
Click Add configuration.

Configure the flow log settings:

Note: Flow logging applies to the entire VPC and requires network activity to generate logs.
Enable the Cloud DNS API.

Navigate to Cloud DNS -> DNS server policies.
Click Create policy.

Configure the DNS logging policy:
dns-logging-policy
Note: DNS logging applies at the VPC level and requires DNS activity to generate logs.
Navigate to VPC network -> Firewall.
Select the firewall rule(s) you want to enable logging for (e.g., default-allow-ssh).
Click Edit.
Enable Logging.
Click Save.

Note: Firewall logging must be enabled per individual firewall rule.
Once the credentials are generated, they must be configured in the Scope application to establish the connection and enable data ingestion from the Google Cloud Storage environment.
In the Scope application, to register a Google Cloud Storage cloud source, navigate to the cloud source registration page –
Log into the Scope application
Select the required Organization from the Organization dropdown
Navigate to the side menu -> Administration
Navigate to the Cloud sources tab
Click on the +Add Source button
In the Add Source pop-up, provide the parameters below.
Input Method Config Tab:
Site: The user defined name for the Google Cloud Storage cloud source.
Bucket Name: The bucket name created in Step 2.
Service Acc Key: Upload the credentials.json file generated in Step 5.
Polling Interval: The polling interval for making periodic API calls to Google Cloud Storage. Select the time interval from the dropdown.
Contact Email: The email address of the person who registers the Google Cloud Storage cloud source in Scope.

Data Provider Tab:
Configure the required data providers by selecting the appropriate checkbox and providing the Directory Path (prefix) for each:
compute.googleapis.com/firewall)dns.googleapis.com/dns_queries)networkmanagement.googleapis.com/vpc_flows)cloudaudit.googleapis.com/system_event, cloudaudit.googleapis.com/activity, cloudaudit.googleapis.com/data_access)
Once the required connection parameters are entered, the Google Cloud Storage cloud source registration is complete in Scope and is ready for ingestion of logs from Google Cloud Storage.