Google Workspace Logs
Panther supports pulling logs directly from Google Workspace
Overview
Panther can fetch Google Workspace (known formerly as G Suite) log events by querying the Google Workspace Reports API. Panther will query the Reports API for new events every 60 seconds.
Google Workspace applications Panther pulls logs for
Panther pulls Google Workspace logs for the following applications:
Access Transparency
Admin
Calendar
Chat
Chrome
Context-Aware Access
Data Studio (Looker Studio)
Drive
GCP
Gmail
Groups
Groups Enterprise
Keep
Login
Meet
Mobile
Rules
SAML
User Accounts
Token
How to onboard Google Workspace logs to Panther
In order for Panther to access the Google Workspace Reports API, you need to create and configure a Google Cloud app, and provide its credentials to Panther.
Prerequisites
To complete the steps below, your Google user must:
Be authorized to read your organization's activity records
If your user does not have this privilege, follow these Google Workspace instructions to create a new role with Reports access and assign the role to your user.
(If you plan to enable pulling Google Workspace user profiles) have read user privileges
Step 1: Create a new Google Workspace source in Panther
In the left sidebar menu of the Panther Console, click Configure > Log Sources.
Click Create New.
Search for “Google Workspace,” then click its tile.
On the slide-out panel, click Start Setup.
On the Configuration page, configure the following field:
Name: Enter a descriptive name for the source e.g.,
My Google Workspace logs.
Click Setup.
Step 2: Create and configure a Google Cloud app
Before setting up a Google Cloud app, you'll need to choose an authentication method. You can use a service account or OAuth —see the top-level tabs below.
Create a new app in Google Cloud:
Log in to your Google Cloud console.
Click + Create project.

Enter a descriptive Project name (e.g.
Panther Integration) and choose a Location.Click Create.
It will take a few seconds to create the project. Once created, you will see a notification on the page.
On the left sidebar menu, click the three lines icon, then Cloud Overview > Dashboard.
If the project you just created is not already selected in the dropdown at the top of the page, open the dropdown and select it.

Enable the Admin SDK API:
In the search bar, enter"Admin SDK API," and select Admin SDK API.
On the Admin SDK API page, click Enable.

You will be redirected to a new screen.
Generate a JSON key file for the service account:
In the IAM & Admin section, click Service Accounts.
On the row of the service account you just created, click Actions, then Manage keys.

Click Add Key > Create new key.

Under Key type, select JSON, then click Create.
A JSON file will be downloaded.
Keep this file in a safe place—it contains the credentials for this service account.
Enable Domain-wide delegation:
On the row of the service account you just created, click Actions, then Manage details.

Click Advanced settings, then copy the Client ID.

Click View Google Workspace Admin Console.
Sign in with an Administrator account.
Click Security → Access and data control → API controls.
Click Manage Domain-wide delegations.
Click Add new.

Fill in the fields:
Client ID: enter the Client ID you copied above.
OAuth scopes (comma-separated, no spaces): enter
https://www.googleapis.com/auth/admin.reports.audit.readonly(Optional) If user profiles are desired, also enter (separated by a comma)
https://www.googleapis.com/auth/admin.directory.user.readonly
Click Authorize.
Finish the source setup in Panther:
Under Provide pulling configuration & JSON Keyfile, upload your JSON key file.

In the Admin User Email field, enter the email address for which you enabled Domain-wide delegation.

On the Enrichment page, if you would like to enable Google Workspace User Profiles, to the right of User Profiles, click the toggle
ON.If you toggled User Profiles
ON, also set a Refresh period (min). This represents the cadence at which Panther will update profile data with what is stored in Google Workspace.
Click Setup. You will be directed to a success screen:

You can optionally enable one or more Detection Packs.
If you have not done so already, click Attach or Infer Schemas to attach one or more schemas to the source.
The Trigger an alert when no events are processed setting defaults to YES. We recommend leaving this enabled, as you will be alerted if data stops flowing from the log source after a certain period of time. The timeframe is configurable, with a default of 24 hours.
On the Credentials page, copy the redirect URL and store it in a secure location. You will need this in the next steps.

Create a new app in Google Cloud:
Log in to your Google Cloud console.
Click + Create project.

Enter a descriptive Project name (e.g.
Panther Integration) and choose a Location.Click Create.
It will take a few seconds to create the project. Once created, you will see a notification on the page.
On the left sidebar menu, click the three lines icon, then Cloud Overview > Dashboard.
If the project you just created is not already selected in the dropdown at the top of the page, open the dropdown and select it.

In the top search bar, search for "OAuth consent screen," then select the matching result.

On the OAuth consent screen page, click Get Started.
Configure your new Google Cloud app and enable Admin SDK API:
On the OAuth consent screen > Branding page, fill in the following information:
App name: Enter your project name or project ID.
User support email: Select your email address.
Audience: Select
Internal.Developer contact information: Enter your email address.
Leave the other fields blank.
Click Save and continue.
On the Data access > Scopes page, click Add or remove scopes.
In the Manually add scopes section, enter
https://www.googleapis.com/auth/admin.reports.audit.readonly(Optional) if user profiles are desired, also enter
https://www.googleapis.com/auth/admin.directory.user.readonly
Click Add to table and Update.

Click Save.
In the search bar, search for "Admin SDK API," and select Admin SDK API.
On the Admin SDK API page, click Enable.

You will be redirected to a new screen.
Create OAuth credentials for your new Google Cloud app:
In the lefthand navigation menu, click Credentials.
At the top of the page, click +Create Credentials.
Click OAuth client ID.

You will be redirected to a different page.
On the Create OAuth client ID page, in the Application type field, select Web application and type in a friendly Name, e.g.,
Panther.Scroll down to the Authorized redirect URIs section, and click + Add URI.
In the URIs 1 field, paste the redirect URL you copied above, in Step 2.1. This is found in the Panther Console on the log source's Set Credentials page.

Click Create.
A pop up modal will display a Client ID and Client Secret. Using a secure method, make note of the ClientID and Client Secret. You will need to provide them in the Panther Console to pull your reports.
Finish Google Workspace source setup in Panther:
Open the browser window or tab where you began the log source setup in the Panther Console earlier in this documentation.
On the Credentials page, enter the Client ID and Client Secret provided in your Google Cloud console.

If you did not save these values during the previous steps, you can find them in the Google Cloud console under APIs & Services > Credentials > OAuth 2.0 Client IDs.
Click Continue.
On the Enrichment page, if you would like to enable Google Workspace User Profiles, to the right of User Profiles, click the toggle
ON.If you toggled User Profiles
ON, also set a Refresh period (min). This represents the cadence at which Panther will update profile data with what is stored in Google Workspace.
Click Setup.
On the Verification page, click Grant Access.
This will prompt you to authorize the Google Workspace App you created earlier to pull Google Workspace logs from your account.
Click Allow.

A Google prompt is titled "Panther integration app wants to access your Google Account." Below, it says, "This will allow Panther integration app to: View audit reports for your G Suite domain." Below, there are Allow and Cancel buttons. You will be directed back to the Panther Console, where you will see a success screen:

You can optionally enable one or more Detection Packs.
The Trigger an alert when no events are processed setting defaults to YES. We recommend leaving this enabled, as you will be alerted if data stops flowing from the log source after a certain period of time. The timeframe is configurable, with a default of 24 hours.

Panther-managed detections
See Panther-managed rules for Google Workspace in the panther-analysis GitHub repository (in directories prefixed with gsuite_).
Supported log types
Panther pulls data from Google's Reports Activities API which includes admin activity, login activity, token activity, Google Drive activity, and more.
This data gets stored as both GSuite.ActivityEvent and GSuite.Reports log types—while these two schemas contain the same data, it's recommended to use Gsuite.ActivityEvent because it flattens the events, making the fields easier to reference in queries and detections.
While both schemas capture the same data, they store it differently in the data lake. For example, GSuite.Reports may have a slightly smaller number of logs in the data lake because multiple events are wrapped in one payload. In GSuite.ActivityEvent, however, each event becomes a single event in Panther. More information about this behavior can be found in the Knowledge Base article: What is the difference between the Panther log types GSuite.Reports and GSuite.ActivityEvent?
While Google Workspace logs are stored in both the GSuite.ActivityEvent and GSuite.Reports tables in your data lake, the data is only counted once against your ingestion quota.
GSuite.ActivityEvent
Contains the activity events for a specific account and application, such as the Admin console application or the Google Drive application.
Reference: Google Workspace Documentation on Reports API Activities List.
GSuite.Reports
We recommend using GSuite.ActivityEvent instead of GSuite.Reports. While both schemas contain the same data, the structure of GSuite.ActivityEvent is flatter, and therefore easier to reference in queries and detections.
Contains the activity events for a specific account and application, such as the Admin console application or the Google Drive application.
Reference: Google Workspace Documentation on Reports API Activities List.
Last updated
Was this helpful?

