Gmail Connector Setup
Provide necessary API permissions to index Gmail content.
The Google connector enables the indexing of:
Content and updates are streamed as changes are detected and processed in your Google Workspace.
Note: Depending on installation being BYOK, Managed, or otherwise this step may be skipped. Consult with an Atolio Support Engineer for any clarification.
Terraform will need a service account to make changes to your GCP project. We will grant it permissions which will essentially allow it to create, read, and delete all project resources. As such, you should keep the credentials for this account safe and not reuse them. The Terraform scripts create a much more restricted service account for normal operation.
Now the service account is created we can create API keys:
This will create another JSON file with the API key and related information. This file will be needed by your Deployment Engineer (in their deploy/terraform directory).
In order for Terraform to programmatically make modifications, you need to manually enable the Google Cloud Resource Manager API.
The project will use additional APIs, but now that this API is available to Terraform, the Atolio deployment scripts will use Terraform to enable those APIs automatically.
The Google Workspace domain needs to grant permission to the integration’s default service account to perform operations. Unfortunately Terraform can’t automate this, so it has to be performed manually.
Your Deployment Engineer will need to make note of the unique ID for the default App Engine service account and the list of scopes. Be aware that this ID is of the default service account, typically named App Engine default service account. It is not the Service Account you’ve previously created.
And the list of scopes are:
https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.group.readonly,https://www.googleapis.com/auth/calendar.readonly,https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/admin.directory.domain.readonly,https://www.googleapis.com/auth/drive.activity.readonly
We now need to set up Domain-wide Delegation:
google_service_account_id as obtained from your Deployment Engineer.Now Atolio is authorized to retrieve Google Workspace data.
Before the source can be configured, the connector pod must be running in the cluster. Connectors are deployed by enabling them in values-lumen.yaml. See Deploying Connectors for the full details, including how instances work.
connectors:
google:
default:
enabled: true
default is the instance identifier. Treat it as immutable once set, because the instance is part of every resource identifier the connector ingests. Apply the change by upgrading the lumen Helm chart with create-infra.sh (recommended) or helm upgrade as described in the sources overview.
Source configuration is applied with atolioctl using a YAML file. If you have not already installed atolioctl, follow Configuring Sources first. The commands below also need an API token in JWT_TOKEN and the address the feeder server’s gRPC endpoint, both described next.
JWT_TOKEN holds the API token atolioctl uses to authenticate to the feeder. Generate one from the deployment’s Helm values directory, which holds the values-lumen.yaml and values-lumen-templated.yaml files produced by create-infra.sh. The token is signed with the deployment’s jwtSecretKey, and the atolio:*:*:* match pattern grants access across all connectors, instances, and resources:
export JWT_TOKEN=$(atolioctl connector create-jwt --raw --config-dir . "atolio:*:*:*")
--feeder-address is the gRPC address of the feeder server that is used to read and write source configuration through. The standard path is to port-forward the in-cluster service/feeder and point atolioctl at it on localhost:
# Run K8s port forward to feeder as background to re-use same shell
kubectl port-forward -n atolio-svc service/feeder 8889 &
With that port-forward running in current terminal or another, the examples below use --feeder-address :8889. The empty host means localhost, and because the port is not 443 the connection is made in plaintext, which is what the port-forward exposes. If the feeder is instead published on a load balancer, pass that address with port 443, for example --feeder-address feed.search.example.com:443, which connects over TLS.
Source configuration is stored as a single document that covers every configured connector. The supported workflow is to export the current configuration, edit it, then import it back. Always start from a fresh export so you do not overwrite a change made elsewhere.
Export the current configuration to a local file:
atolioctl configure export --jwt-token-sdk ${JWT_TOKEN} --feeder-address :8889 lumen-connectors.yaml
Add a Google entry alongside the connectors already in the file, substituting the values you collected in Step 1:
connectors:
# ...existing connectors left in place...
google:
default:
google:
connector: google
instance: default
source: google
common:
enabled: true
identity-provider: true # This connector is the identity provider
cron-spec: 0 7 * * * # Re-sync users on this schedule
secrets:
service_account_key:
value: "<GOOGLE_SERVICE_ACCOUNT_B64>"
configuration:
parallelism: 0
project-id: "<GOOGLE_PROJECT_ID>"
service-user: "<GOOGLE_SERVICE_USER>"
Exported entries also carry a rendezvous-completed flag and a status block reporting each source’s current state and last validation result. Those fields are managed by Atolio. Leave them untouched on existing entries, and omit them when adding a new entry by hand as shown above.
Import the edited file to write the configuration back into the stack:
atolioctl configure import lumen-connectors.yaml --jwt-token-sdk ${JWT_TOKEN} --feeder-address :8889
Import writes the configuration into the stack after checking that the YAML is well formed. It does not contact Google. The connector validates the credentials and connection itself when it starts and picks up the configuration, and it reads users after that. If something is wrong, the source reports as misconfigured and the connector pod logs the error. See Troubleshooting for the specific messages.
In the exported file, every source lives at connectors.<connector>.<instance>.<source>, so the Google source sits at connectors.google.default.google.
Google Workspace connector configuration.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connector | string | yes | N/A | Parent connector to reference (can be self) |
instance | string | yes | N/A | Multi-state config variable used for certain connectors, often default |
source | string | yes | N/A | Sub-connector reference (can be self), often object key |
common | Common | yes | N/A | Common connector settings. |
secrets | Secrets | yes | N/A | Secret credentials for authentication. |
configuration | Configuration | yes | N/A | Connector-specific configuration. |
Common settings shared across all connectors.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | boolean | yes | N/A | Set to true to run the source. |
identity-provider | boolean | yes | N/A | Set to true so Atolio uses this connector to resolve logins to users. |
cron-spec | string | no | N/A | Cron expression for periodic re-sync of users (e.g., 0 7 * * *). Omit to sync only on demand. |
Sensitive configuration values for authentication.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
service_account_key | SecretValue | yes | N/A | Google service account key in Base64 to authenticate to Google Workspace. |
A reference to a secret value.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
value | string | yes | N/A | The secret value (typically Base64-encoded). |
Google Workspace connector-specific configuration.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
domains | string | no | "" | Comma-separated list of allowed customer domains. If empty, all domains are considered. |
project-id | string | yes | N/A | GCP project ID under which the integration is operating. |
service-user | string | yes | N/A | Email address of an administrator within the Google Workspace account. |
parallelism | integer | yes | 0 | Number of users to process in parallel. Set to 0 for automatic parallelism based on system resources. |
Provide necessary API permissions to index Gmail content.
Provide necessary API permissions to index Google Drive contents.
Provide necessary API permissions to index Google Sites.