Configuring Google Workspace Connectors
This connector allows Stellar Cyber to collect data from external sources and add the records to the data lake.
Integrating Google Workspace with Stellar Cyber provides real-time visibility into security events and alerts across cloud and on-premise environments, enabling organizations to effectively monitor and respond to security incidents. Stellar Cyber's advanced security analytics and machine learning algorithms provide real-time threat detection and response capabilities, while also providing advanced identity and access management capabilities to manage user access and security policies.
You must have one connector for every Google Workspace account to be monitored.
This connector is improved to use less memory. Under certain scenarios if there is an error reaching the third-party API, some duplicate messages may be sent.
Stellar Cyber connectors with the Collect function (collectors) may skip collecting some data when the ingestion volume is large, which potentially can lead to data loss. This can happen when the processing capacity of the collector is exceeded.
Connector Overview: Google Workspace
Capabilities
-
Collect: Yes
-
Respond: No
-
Native Alerts Mapped: Yes
-
Runs on: DP
-
Interval: Configurable
Collected Data
Content Type |
Index |
Locating Records |
---|---|---|
Admin Alert Calendar Chat Drive Gplus Groups Login Mobile Rules SAML Token |
Linux AWS Events (Cloudtrail)
|
Domain
N/A
Response Actions
N/A
Third Party Native Alert Integration Details
The Gmail Phishing, Google Identity, and User Changes events are mapped.
For details, see Integration of Third Party Native Alerts.
Required Credentials
-
API Scopes and Service Account Key File
Let us know if you find the above overview useful.
Adding a Google Workspace Connector
To add a Google Workspace connector:
- Enable the Google Admin SDK
- Create a Google service account
- Create an API key
- Add the client ID with OAuth scopes
- Add the connector in Stellar Cyber
- Test the connector
- Verify ingestion
Enabling the Google Admin SDK
Before you create a service account, you must enable the Admin SDK:
Use our example as a guideline, as you might be using a different software version.
-
Click to display the menu.
-
Choose APIs & Services > Library. The API Library page appears.
-
Search for admin sdk. The Admin SDK page should be at the top of the results.
-
Click Admin SDK. The Admin SDK page appears.
-
Click Enable. The SDK is enabled.
-
Search again, this time for alert center api. and enable that.
Creating a Google Service Account
With the SDK enabled, you can create a service account:
-
Navigate back to the main menu of https://console.cloud.google.com.
-
Click to display the navigation pane.
-
Choose IAM & Admin > Service Accounts. The service accounts appear.
-
Click Create Service Account. The Service account details page appears.
-
Enter a name for the account.
-
Enter a description.
-
Click Create.
-
Optionally, grant permissions.
-
Click Continue.
-
Optionally, grant access.
-
Click Done. The account is created and displayed on the Service account details page.
-
Copy the Oath2 Client ID You will use this as the Client ID when adding API scopes in the Stellar Cyber connector.
Creating an API Key
With a service account, you can now create an API key:
-
Click to display the menu.
-
Choose IAM & Admin > Service Accounts. The service accounts appear.
-
Select the service account you created.
-
Click for that account.
-
Select Manage keys from the menu. The Keys screen appears.
-
Click the Add Key menu and select Create new key.
-
Select JSON.
-
Click Create. The JSON file is downloaded. Keep this file safe, as you cannot recover the key if this file is lost. You will upload this file to Stellar Cyber when configuring the connector.
-
Click Close.
-
Exit the Keys screen and return to the Service Account Details page.
-
Click for the account again, and select Manage Details.
-
The Service Account details screen appears.
-
Make note of the Unique ID. You will use this as the Client Name when adding the service account to Google Workspace.
Adding the Client ID with OAuth Scopes
To add the Client ID with OAuth scopes:
- Go to https://admin.google.com/ac/home.
- Click to display the menu.
-
Choose Security > API Controls > Domain-wide Delegation. The API clients appear.
-
Click Add New. The Add a new client ID screen appears.
- Enter the Unique ID that you copied earlier from the service account as the Client ID.
-
Enter the OAuth scopes to be used with the Stellar Cyber connector.
-
For Alert reports, include this scope:
https://www.googleapis.com/auth/apps.alerts
-
For Application reports, include this scope:
https://www.googleapis.com/auth/admin.reports.audit.readonly
(The application types are listed in the Stellar Cyber connector configuration dialog.)
- Click Authorize.
You now have an authorized Client ID with OAuth scopes.
Adding the Connector in Stellar Cyber
With the Google service account set up and the API key ready, you can add a Google Workspace connector in Stellar Cyber:
-
Log in to Stellar Cyber.
-
Click System | Integration | Connectors. The Connector Overview appears.
-
Click Create. The General tab of the Add Connector screen appears. The information on this tab cannot be changed after you add the connector.
The asterisk (*) indicates a required field.
-
Choose SaaS from the Category drop-down.
-
Choose Google Workspace (Gsuite) from the Type drop-down.
-
For this connector, the supported Function is Collect, which is enabled already.
-
Enter a Name.
Notes:- This field does not accept multibyte characters.
- It is recommended that you follow a naming convention such as tenantname-connectortype.
-
Choose a Tenant Name. The Interflow records created by this connector include this tenant name.
-
Choose the device on which to run the connector.
-
(Optional) When the Function is Collect, you can apply Log Filters. For information, see Managing Log Filters.
-
Click Next. The Configuration tab appears.
The asterisk (*) indicates a required field.
-
Enter the Admin Email for the account administrator (not the email created by Google for the service account).
-
For API Scopes, enter the OAuth scopes you added in Adding the Client ID with OAuth Scopes. Stellar Cyber provides the following scopes by default:
-
For Alert reports, include this scope:
https://www.googleapis.com/auth/apps.alerts
The alert scope is required if you would like Stellar Cyber to integrate the Gmail Phishing alert to the XDR Kill Chain.
-
For Application reports, include this scope:
https://www.googleapis.com/auth/admin.reports.audit.readonly
Separate additional scopes with commas.
-
-
Upload the Service Account Key File, which is the API file you downloaded in Creating an API Key.
-
Choose the Interval (min). This is how often the logs are collected.
-
Enter the Query Delay (min).
-
Choose the App you want to collect by selecting them from the drop-down menu.
Content Type
(App Name)Report type
Required Scope Admin
Admin Console activities of all of your account's administrator activity
https://www.googleapis.com/auth/admin.reports.audit.readonly Alert
Google Alert Center reports
https://www.googleapis.com/auth/apps.alerts Calendar
Google Calendar application's activity audit reports
Chat Chat activity audit reports
Drive Google Drive application's activity reports
Gplus Google+ / Currents application activity reports
Groups
Google Groups audit reports
Login
Login audit events
Mobile
Device audit events
Rules
Reports for rule related events
SAML
SAML audit reports
Token OATH Token Audit events
-
Click Next. The final confirmation tab appears.
-
Click Submit.
To pull data, a connector must be added to a Data Analyzer profile if it is running on the Data Processor.
The new connector is immediately active. It does not collect any historical logs.
Testing the Connector
When you add (or edit) a connector, we recommend that you run a test to validate the connectivity parameters you entered. (The test validates only the authentication / connectivity; it does not validate data flow).
For connectors running on a sensor, Stellar Cyber recommends that you allow 30-60 seconds for new or modified configuration details to be propagated to the sensor before performing a test.
-
Click System | Integrations | Connectors. The Connector Overview appears.
-
Locate the connector that you added, or modified, or that you want to test.
-
Click Test at the right side of that row. The test runs immediately.
Note that you may run only one test at a time.
Stellar Cyber conducts a basic connectivity test for the connector and reports a success or failure result. A successful test indicates that you entered all of the connector information correctly.
To aid troubleshooting your connector, the dialog remains open until you explicitly close it by using the X button. If the test fails, you can select the button from the same row to review and correct issues.
The connector status is updated every five (5) minutes. A successful test clears the connector status, but if issues persist, the status reverts to failed after a minute.
Repeat the test as needed.
If the test fails, the common HTTP status error codes are as follows:
HTTP Error Code | HTTP Standard Error Name | Explanation | Recommendation |
---|---|---|---|
400 | Bad Request | This error occurs when there is an error in the connector configuration. |
Did you configure the connector correctly? |
401 | Unauthorized |
This error occurs when an authentication credential is invalid or when a user does not have sufficient privileges to access a specific API. |
Did you enter your credentials correctly? Are your credentials expired? Are your credentials entitled or licensed for that specific resource? |
403 | Forbidden | This error occurs when the permission or scope is not correct in a valid credential. |
Did you enter your credentials correctly? Do you have the required role or permissions for that credential? |
404 | Not Found | This error occurs when a URL path does not resolve to an entity. | Did you enter your API URL correctly? |
429 | Too Many Requests |
This error occurs when the API server receives too much traffic or if a user’s license or entitlement quota is exceeded. |
The server or user license/quota will eventually recover. The connector will periodically retry the query. If this occurs unexpectedly or too often, work with your API provider to investigate the server limits, user licensing, or quotas. |
For a full list of codes, refer to HTTP response status codes.
An error displays If you use an email address that doesn't have privileges to add the connector, or if you created the service account but it is not yet authorized.
Verifying Ingestion
To verify ingestion:
-
Click Investigate | Threat Hunting. The Interflow Search tab appears.
-
Change the Indices to Linux Events or AWS Events. The table immediately updates to show ingested Interflow records.