In this article, we'll walk you through how to add Google Drive and Gmail as Cloud Content Sources in your Secure & Govern tenant.
Scanning Google Drive covers all content in user and team drives and provides some remediation options for unpermitted sensitive content.
Scanning Gmail covers content in emails and attachments sent to, from, and between mailboxes within your Google Workspace instance. Many regulatory compliance policies apply to email. Furthermore, email is a common medium through which sensitive information is shared and Egnyte can discover the most sensitive discussions happening over email.
Note that the steps for connecting Google Drive and Gmail are almost identical with the exception of the step where domain-wide delegation is configured where a different set of Oauth scopes are required. You can use the same service account for both Gmail and Google Drive - simply ensure you add both sets of Oauth scopes when configuring domain-wide delegation. If you have already set up one source, you can use the same service account with the other source by extending the list of API scopes available to the service account with the required additional scopes.
Prerequisites for Setting Up Google Drive and/or Gmail
- GSuite domain with super-admin privileges
Configure Service Account
- Log in to Google Cloud Console
- If the project does not exist create one choosing some name for the project.
- Go to service accounts management screen IAM & Admin -> Service Accounts. It should display the list of already configured service accounts.
- Create new service account and proceed with the creation wizard
- Choose a name and description for the service account. Select the defaults on the subsequent screens.
- Create a private key for the service account. The key will have to be exported to P12 format and downloaded to the local hard drive.
- Record the service account client id and email in the details view in service accounts list
- Click "Save"
Enable APIs in Google Cloud Console
- Go to APIs & Services -> Enabled APIs to view the summary of currently used APIs
- For Google Drive Classification, ensure that the Google Drive API and Admin SDK are visible and enabled in the list (if not, choose the Enable APIs and Services option to enable them). For Gmail Classification, ensure that the Gmail API and Admin SDK are visible and enabled (if not, choose the Enable APIs and Services option to enable them).
Configure Domain-Wide Delegation
- Go to GSuite Admin console
- Log in as a user with Super Admin role
- (optional) Create a dedicated user for the purpose of Egnyte connection. Alternatively you can use the user account with which you logged in.
- Ensure that the user has Super Admin role. If not assign the required role.
- Go to Dashboard -> Security -> Access and Data Control -> API Controls
- Navigate to Domain-Wide delegation configuration
- Add new API client corresponding to the service account created in the previous steps
- Enable API Scopes - Configure the API client ID and OAuth scopes required by the client. The Client ID is the ID of the service account visible in through View Client ID link. The required scopes are:
- For Google Drive:
- For Gmail:
- For Google Drive:
- As a result, the client should be visible on the list:
Add the Google Drive and/or Gmail Content Source in Egnyte
- In the Secure and Govern Admin Panel, go to Settings -> Content Sources -> Add Cloud Source and select Google Drive or Gmail depending on which source you're adding
- Enter the source configuration. Service account email is the email of the service account configured in the previous steps. It can be obtained by clicking on View Client ID in service accounts list in Google Cloud console.
- Service account user is the GSuite user who has the Super Admin role. It is either the user account by which the GSuite domain is managed or a dedicated account for Egnyte connection.
- File with private key is the private key generated for the service account and saved to the local drive. It has to be saved in P12 format.
- Allow the connector to communicate with Secure and Govern
- When the process is complete you should see the confirmation of successful connection of the source
Remediation Options for Sensitive Content in Emails
When reviewing sensitive content in emails, you have the option to delete emails with unpermitted sensitive content within the email body or attachments. Deleted emails are sent to Trash after which they are purged based Trash purge settings in Gmail. To delete emails with unpermitted sensitive content choose Fix > Delete Sensitive Email Data in the Sensitive Content Details section when a sensitive content location is selected.
Delete Sensitive Email Data from the Sensitive Content View