Permissions
This page lists every role that lowtide’s components hold in your projects, and what each one is for. The console shows the same list, with the exact grant commands, before you grant anything.
When you run Terraform or Helm yourself
Section titled “When you run Terraform or Helm yourself”lowtide holds no IAM role in your project. You apply the Terraform module or the Helm chart with your own credentials (permissions to run the module).
The agent makes outbound HTTPS calls to lowtide Cloud only. It needs a Google Cloud role only for migrations you run from the console (below).
The gateway
Section titled “The gateway”The gateway runs as its own Google service account through Workload Identity, so the install creates no service account keys. Its Kubernetes service account is the only one that can act as it.
| Role | Where | Why |
|---|---|---|
roles/storage.objectAdmin |
The segment bucket only | Write, read and delete message segments. |
roles/cloudsql.client, roles/cloudsql.instanceUser |
The cluster’s Cloud SQL instance only (IAM condition) | Connect to the metadata database with IAM login, through the Cloud SQL Auth Proxy. |
roles/iam.serviceAccountTokenCreator |
Each push service account you list | Sign OIDC tokens for push subscriptions. |
Shadow role lowtideShadows_<cluster> |
Each Pub/Sub project, with Cloud IAM authorization on | Create shadow topics, subscriptions and snapshots. |
roles/pubsub.publisher |
Each Pub/Sub project you migrate from | Copy messages to Pub/Sub while a topic is mirrored. Remove it when the migration is done. |
The shadow role
Section titled “The shadow role”A custom role you create with fixed permissions:
pubsub.topics.createpubsub.subscriptions.createpubsub.topics.attachSubscription- with snapshot shadows on:
pubsub.snapshots.createandpubsub.subscriptions.consume
The role can’t publish, read, update or delete. Shadows stay in Pub/Sub after you delete the resource in lowtide. pubsub.subscriptions.consume on the project would let the gateway pull from subscriptions there. The gateway never does, but if you don’t use snapshots, turn snapshot shadows off with gcp_iam_snapshot_shadows = false.
For BigQuery and Cloud Storage subscriptions, the gateway writes with its own identity, so grant its service account access to the destination. The module’s gateway_service_account output names the account.
| Subscription type | Grant the gateway |
|---|---|
| BigQuery | Write access to the dataset (roles/bigquery.dataEditor, or WRITER) and roles/bigquery.jobUser on the project, because lowtide writes with load jobs by default. |
| Cloud Storage | roles/storage.objectCreator and roles/storage.legacyBucketReader on the bucket. |
The agent, for migrations
Section titled “The agent, for migrations”The console’s Migration page runs each step through the cluster’s agent. The agent has its own service account, lt-<cluster>-ag, through Workload Identity (no keys). It holds no role until you grant one. In each Pub/Sub project you migrate, it needs a custom role, lowtideMigration_<cluster>:
| Permissions | Why |
|---|---|
pubsub.topics.get, pubsub.topics.list, pubsub.topics.getIamPolicy, pubsub.subscriptions.get, pubsub.subscriptions.list, pubsub.snapshots.list |
Assess the project and read the topic you move. |
monitoring.timeSeries.list |
Pub/Sub’s costs, backlogs and publish rates, and the hand-over’s starting point. |
pubsub.topics.detachSubscription, pubsub.subscriptions.update |
Detach a subscription after its hand-over, and keep it from expiring so it keeps its IAM policy. |
The role can’t publish, pull, create or delete. The console shows the commands that create and grant it, and a Check access button that names anything missing. The Terraform module does the same with pubsub_migration_projects. Remove the role once the project’s topics have moved.
To keep the agent from changing anything in lowtide or Pub/Sub, set agent.migration.enabled: false in the Helm chart.
When lowtide sets it up
Section titled “When lowtide sets it up”One service account of lowtide’s, the provisioner, runs Terraform as a job in lowtide’s project. It holds no role in lowtide’s own project, only the roles you grant it in yours. Its email is on the cluster’s Setup tab.
Install project
Section titled “Install project”| Role | Why |
|---|---|
roles/serviceusage.serviceUsageAdmin |
Enable the APIs the installation uses: GKE, Cloud SQL, Compute Engine, Cloud Storage, Service Networking, IAM, fleet and Connect gateway. APIs are never disabled. |
roles/container.admin |
Create the GKE cluster and node pools, then install the lowtide chart and its Kubernetes objects: namespace, Secrets, the database bootstrap Job. |
roles/cloudsql.admin |
Create the Cloud SQL instance for the metadata, its database and users. |
roles/storage.admin |
Create the segment bucket and give the gateway access to it, and keep the Terraform state in a bucket in this project. |
roles/compute.networkAdmin |
Create the VPC, subnet, Cloud Router and NAT, the internal endpoint address, and the private services access range and peering for Cloud SQL. |
roles/compute.storageAdmin |
Delete the disks the cluster keeps after it is destroyed (write-ahead logs, agent state), only when you delete the cluster and confirm it. |
roles/iam.serviceAccountAdmin |
Create the gateway, agent and node service accounts and let their Kubernetes service accounts act as them (Workload Identity). |
roles/iam.serviceAccountUser |
Run the GKE nodes as the node service account. |
roles/gkehub.editor |
Register the cluster in this project’s fleet, so the provisioner can reach it through the Connect gateway without network access to its control plane. |
roles/gkehub.gatewayEditor |
Reach the cluster’s Kubernetes API through the Connect gateway to install and upgrade the chart. |
roles/resourcemanager.projectIamAdmin, with an IAM condition |
Grant the installation’s own service accounts their roles. The condition limits it to these roles: roles/logging.logWriter, roles/monitoring.metricWriter, roles/monitoring.viewer, roles/stackdriver.resourceMetadata.writer, roles/autoscaling.metricsWriter, roles/artifactregistry.reader, roles/cloudsql.client, roles/cloudsql.instanceUser. |
The condition is api.getAttribute("iam.googleapis.com/modifiedGrantsByRole", []).hasOnly([...]). It limits which roles a grant may add or remove. It can’t limit who receives them.
Each Pub/Sub project
Section titled “Each Pub/Sub project”Only roles/resourcemanager.projectIamAdmin, with an IAM condition that lets it grant two roles: the cluster’s shadow role and roles/pubsub.publisher. You create the shadow role yourself, with fixed permissions, so the provisioner can bind it but can’t change what it allows. The provisioner can’t read or publish messages.
Terraform state
Section titled “Terraform state”Kept in a bucket in your install project, <project>-lowtide-tfstate. The bucket is versioned, uses uniform access and blocks public access. It holds the installation’s TLS keys and tokens. When you delete the cluster from the console, the bucket is deleted last.
Removing the provisioner’s access
Section titled “Removing the provisioner’s access”Once the cluster is healthy, run the remove commands on the cluster’s Setup tab. They run gcloud projects remove-iam-policy-binding for each role. The cluster keeps running. To upgrade or delete the cluster from the console later, grant the access again. You can also upgrade with Terraform yourself, from the same module and the state in your bucket.
lowtide support, for Managed in your project
Section titled “lowtide support, for Managed in your project”For clusters lowtide operates, lowtide’s support group has a Privileged Access Manager entitlement on the install project. It can request a grant of up to 4 hours. Your approvers decide on each request, and Cloud Audit Logs record every grant.
| Role | Why |
|---|---|
roles/container.developer |
Inspect and restart the gateway and agent workloads during an incident. |
roles/cloudsql.viewer |
See the state of the metadata instance: failover, maintenance, storage. |
roles/logging.viewer |
Read the gateway and agent logs. |
roles/monitoring.viewer |
Read the cluster’s metrics and alerts. |
For every other option, lowtide’s staff have no access to your project.