Enterprise Recon 2.4
G Suite
This section covers the following topics:
- Overview
- Licensing
- Requirements
- Configure G Suite Account
- Set up G Suite as Target
- Edit G Suite Target Path
Overview
The instructions here work for setting up the following G Suite products as Targets:
- Google Drive
- Google Tasks
- Google Calendar
- Google Mail
To set up G Suite products as Targets:
To scan a specific path in G Suite, see Edit G Suite Target Path.
Licensing
For Sitewide Licenses, all scanned G Suite Targets consume data from the Sitewide License data allowance limit.
For Non-Sitewide Licenses, G Suite Targets require Client Licenses, and consume data from the Client License data allowance limit.
See Target Licenses for more information.
Requirements
Requirements | Description |
---|---|
Proxy Agent |
|
TCP Allowed Connections | Port 443 |
Configure G Suite Account
Before you add G Suite products as Targets, you must have:
- A G Suite administrator account for the Target G Suite domain.
- The Target must be a G Suite account. Personal Google accounts are not supported.
To configure your G Suite account for scanning:
Select a Project
- Log in to the Google Developers Console.
- Click on Select a project ▼. The Select dialog box opens and displays a list of existing projects.
In the Select dialog box, you can:
- Select an existing project.
- (Recommended) Create a new project.
To select an existing project:
- Click on a project.
- Click OPEN.
To create a new project:
- Click on +.
- In the New Project page, enter your Project name and click Create.
Enable APIs
To scan a specific G Suite product, enable the API for that product in your project.
To enable G Suite APIs:
- Select a Project.
- In the project Dashboard, click + ENABLE APIS AND SERVICES. This displays the API Library.
- Enable the Admin SDK API.
- Under G Suite APIs, click Admin SDK.
- Click ENABLE.
-
Repeat to enable the following APIs:
Target G Suite Product API Library Google Mail Gmail API Google Drive Google Drive API Google Tasks Tasks API Google Calendar Google Calendar API
Create a Service Account
Create a service account for ER2:
- Click on the menu on the upper-left corner of the Google Developers Console.
- Go to IAM & Admin > Service accounts.
- Click + CREATE SERVICE ACCOUNT.
- In the Create service account dialog box, enter the following:
Field Description Service account name Enter a descriptive label. Role Select Project > Owner. Service account ID Enter a name for your service account, or click the refresh button to generate a service account ID.
An example service account ID: service-account-634@project_name-1272.iam.gserviceaccount.com
Furnish a new private key - Select Furnish a new private key.
- Select P12.
Enable G Suite Domain-wide Delegation Select Enable G Suite Domain-wide Delegation. If prompted, enter a product name for the OAuth consent screen and save your OAuth consent screen settings. The product name should describe your project. For example: "ER2". -
Click CREATE. The Service account and key created dialog box displays, and a P12 key is saved to your computer. Keep the P12 key in a secure location.
The dialog box displays the private key's password: notasecret. ER2 does not need you to remember this password. - Click Close.
- Write down the newly created service account's Service account ID and Key ID.
Set up Domain-Wide Delegation
The following is a guide for setting up domain-wide delegation for existing service accounts.
To allow ER2 to access your G Suite domain with the Service Account, you must set up and enable domain-wide delegation for your Service Account.
To set up domain-wide delegation:
- Click on the menu on the upper-left corner of the Google Developers Console.
- Go to API Manager > Credentials.
-
On the Credentials page, under OAuth 2.0 client IDs, go to the entry for your service account and take note of the Client ID.
The Client ID is required when assigning DwD to your Service Account. - Go to the G Suite Admin Console. In the Admin Console, click on Security.
- On the Security page, click Show more.
- Click on Advanced settings to expand it.
- Under Authentication, click Manage API client access.
- In Manage API client access, enter:
- Client Name: Your Service account Client ID (For example, 116877825065678775170).
-
One or More API Scopes: For each G Suite product that you wish to scan, you must apply a different API Scope.
The following is a list of API Scopes required for ER2 to work with each G Suite service:G Suite service API Scope All (required) https://www.googleapis.com/auth/admin.directory.user.readonly Google Mail https://mail.google.com/ Google Drive https://www.googleapis.com/auth/drive.readonly Google Tasks https://www.googleapis.com/auth/tasks.readonly Google Calendar https://www.googleapis.com/auth/calendar.readonly You can apply multiple API Scopes by separating them with commas. For example,https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/drive.readonly
Copying and pasting
Copying and pasting formatted text into Manage API client access may cause it to display an error. Instead, manually enter the API Scopes as shown above. - Click Authorize.
Set up G Suite as Target
- Configure G Suite Account.
- From the New Scan page, Add Targets.
- In the Select Target Type dialog box, click on G Suite and select one of the following G Suite products:
- Google Drive
- Google Tasks
- Google Calendar
- Google Mail
-
Fill in the following fields:
Field Description G Suite Domain Enter the G Suite domain you want to scan in the G Suite Domain field.
If your G Suite administrator email is admin@example.com, your G Suite domain is example.com.For more information on how to scan specific mailboxes or accounts, see Edit G Suite Target Path.
New Credential Label Enter a descriptive label for the credential set. New Username Enter your G Suite administrator account email address.
Use the same administrator account used to Enable APIs and Set up Domain-Wide Delegation.New Password Enter your Service account ID, e.g. service-account-name-14@adventurer-140703.iam.gserviceaccount.com. Private Key Upload the P12 key associated with your Service account ID. Agent to act as a proxy host Select a Proxy Agent host with direct Internet access. - Click Test. If ER2 can connect to the Target, the button changes to a Commit button.
- Click Commit to add the Target.
Edit G Suite Target Path
- Set up G Suite as Target.
- In the Select Locations section, select the G Suite Target location and click Edit.
-
In the Edit G Suite Location dialog box, enter a (case sensitive) Path to scan. Use the following syntax:
Path Syntax User account <user_name> Folder in user account <user_name/folder_name> To scan the user mailbox at user_name@example.com, enter user_name. To scan the "Inbox" folder in the user mailbox user_name@example.com, enter user_name/inbox; to scan the "Sent Mail" folder, enter user_name/sent. - Click Test and then Commit to save the path to the Target location.