Deploy access via impersonation
Glean deploys updates to customer-hosted Google Cloud Platform (GCP) deployments through GCP service account impersonation. For each deploy, Glean's deployment pipeline obtains short-lived credentials for the deployer service account in your project.
How it works
Glean's deployment pipeline rolls out weekly releases and maintenance updates to your Glean instance. Each deploy follows this flow:
- Glean's deployment pipeline runs as a Glean-owned service account in Glean's continuous deployment project.
- The pipeline uses chained impersonation through a central, Glean-owned service account to act as the deployer service account in your project.
- The central service account is
glean-deploy-provisioning@glean-deploy-provisioning.iam.gserviceaccount.com. - The deployer service account in your project is
scio-deployer@<customer project>.iam.gserviceaccount.com. - The central service account holds the Service Account Token Creator role (
roles/iam.serviceAccountTokenCreator) on the deployer service account. It has no other roles in your project.
- The central service account is
- GCP issues short-lived access tokens and ID tokens for the deployer service account. Each token expires after one hour.
- The pipeline calls the
deploy_buildservice in your project with the ID token, and uses the access tokens for the remaining deploy steps, such as reading your deployment configuration.
No person takes part in this flow. The impersonation chain ends at Glean's deployment pipeline, not at an individual Glean engineer.
What this means for your security posture
Deploy access through impersonation gives your security team the following guarantees:
- Short-lived credentials — GCP issues new tokens for each deploy, and each token expires after one hour.
- Auditable token issuance — with Data Access audit logs turned on, your GCP audit logs record every token issued for the deployer service account and name the central service account as the caller.
- Narrow grant — the central service account can act only as the deployer service account. Removing one IAM binding in your project revokes it.
Audit log visibility
GCP audit logs record deploy impersonation in two places: the actions the deployer service account takes through impersonation, and the tokens GCP issues to it. Most of these entries are Data Access audit logs, which GCP turns off by default. See Enable Data Access audit logs.
Find actions taken through impersonation
When the deployer service account calls a GCP API through impersonation, the audit log entry for that call lists the impersonation chain in the protoPayload.authenticationInfo.serviceAccountDelegationInfo field. To query for these actions in your project, use the following Cloud Logging filter (assuming the relevant audit logs are turned on):
protoPayload.authenticationInfo.serviceAccountDelegationInfo.firstPartyPrincipal.principalEmail:"glean-deploy-provisioning@glean-deploy-provisioning.iam.gserviceaccount.com"
Find token requests
GCP records each token request for the deployer service account in the audit logs of the IAM Service Account Credentials API (iamcredentials.googleapis.com).
To find these entries, use the following Cloud Logging filter:
protoPayload.serviceName="iamcredentials.googleapis.com"
protoPayload.authenticationInfo.principalEmail="glean-deploy-provisioning@glean-deploy-provisioning.iam.gserviceaccount.com"
Here's what a sample audit log looks like:
{
"logName": "projects/customer-project/logs/cloudaudit.googleapis.com%2Fdata_access",
"protoPayload": {
"@type": "type.googleapis.com/google.cloud.audit.AuditLog",
"status": {},
"authenticationInfo": {
"principalEmail": "glean-deploy-provisioning@glean-deploy-provisioning.iam.gserviceaccount.com",
...
},
"authorizationInfo": [
{
"permission": "iam.serviceAccounts.getAccessToken",
"permissionType": "DATA_READ",
"granted": true,
...
}
],
"methodName": "GenerateAccessToken",
"request": {
"@type": "type.googleapis.com/google.iam.credentials.v1.GenerateAccessTokenRequest",
"name": "projects/-/serviceAccounts/scio-deployer@customer-project.iam.gserviceaccount.com",
"delegates": [
"glean-deploy-provisioning@glean-deploy-provisioning.iam.gserviceaccount.com"
],
"lifetime": "3600s",
...
},
"serviceName": "iamcredentials.googleapis.com",
...
},
...
}
Customer controls
You control the IAM binding that grants the central service account the Service Account Token Creator role on the deployer service account. You can also use VPC Service Controls to make sure only Glean's deployment pipeline can run the impersonation flow. Contact your Glean account representative for the specifics of these controls.
Removing the binding or blocking the impersonation flow can stop Glean from deploying updates and security patches to your environment, and can affect Glean's ability to meet Service Level Agreements (SLAs). Contact your Glean account team before you change access controls that affect Glean service accounts, including any VPC Service Controls changes.
See also
- Elevated access via impersonation — how Glean engineers get time-bound, approved access to your project
- GCP deployment guide — project setup, organization policies, and service accounts for a customer-hosted deployment
- Monitoring service account usage patterns (Google documentation) — track how service accounts in your project are used