Skip to main content

Under the hood

Architecture on Google Cloud

The services an install runs and what each one does.

This page lists each Google Cloud service an install runs, the access GOAT's service account holds, and what an install never has. Names below use goat for your install's name and your-project for the project it is installed in.

The services​

ServiceWhat the install createsWhat it is for
Cloud RunThe service goat-platformRuns GOAT: the app, the API, and the embed script. One instance stays warm; up to 10 by default.
FirestoreA named database goat-metastore, protected from deletionWhat operators build: datasets' settings, collections, charts, dashboards, tenants, grants, and settings.
BigQueryThe dataset goatGOAT's managed copies of your data.
BigQueryThe dataset goat_telemetry, and a log sink feeding itA record of each chart query, kept 400 days, for usage and cost figures.
Cloud StorageThe bucket goat-uploads-your-projectFiles operators upload. Public access is prevented, and files are kept for as long as their datasets use them.
Identity PlatformEmail and password sign-in with an optional authenticator second factor, and Google sign-in if it is chosen at installSigning in operators.
Secret ManagerThe secret goat-embed-keyringThe keys that sign viewer tokens.
Service accountgoat-platformThe identity GOAT runs as.

What GOAT's service account may do​

AccessOnWhy
Run BigQuery jobs (roles/bigquery.jobUser)The projectEvery chart query and every load.
Read BigQuery metadata (roles/bigquery.metadataViewer)The projectBrowsing datasets, tables, and columns. It reads names, columns, view definitions, and who has access to each table, never table data.
Read and write data (roles/bigquery.dataEditor)The goat dataset onlyManaged copies.
Read data (roles/bigquery.dataViewer)The goat_telemetry dataset onlyUsage and cost figures.
Read and write documents (roles/datastore.user)The goat-metastore database only, by an IAM conditionWhat operators build.
Read and write files (roles/storage.objectAdmin)The uploads bucket onlyUploaded files.
Read the secret (roles/secretmanager.secretAccessor and roles/secretmanager.viewer)The goat-embed-keyring secret onlySigning and checking viewer tokens.
Read and update Identity Platform users (a custom role goat.operatorClaims)The projectSetting each operator's role on their account.
Read data (roles/bigquery.dataViewer), only if a billing export table in the same project is chosen at installThat billing export dataset onlyActual amounts in cost figures.
Manage Data Transfer Service configs (a custom role goat.transferManager), change the goat dataset's settings and access list (a custom role goat.transferDestination), and act as itself (roles/iam.serviceAccountUser on itself)The project; the goat dataset; the service account itselfGranted ahead of scheduled reloads, which GOAT does not offer yet.

Two of these reach further than their purpose, and a security review should weigh them:

  • The Identity Platform role can update any user in the project: their password, email, and claims. So whoever controls GOAT's service account could take over any account that signs in through that Identity Platform, operators included. It cannot create users, read password hashes, or change the sign-in setup.
  • The transfer role reaches every Data Transfer Service config in the project, not only GOAT's.

Your own data​

GOAT's service account gets no access to your own datasets' rows or your buckets' files when GOAT is installed, apart from an optional billing export table. You grant it, one dataset or bucket at a time. See Give GOAT access to your data.

What an install never has​

  • No public access grant on Cloud Run. The service turns off Cloud Run's own invoker check, so its address is reachable, and GOAT's own sign-in, API keys, and viewer tokens decide every request.
  • No automatic updates, and no reporting back to anyone. A new version runs only when whoever runs the install applies it.
  • No GOAT-hosted service in between. Your browsers, your backend, and Google Cloud talk to your install directly.

Encryption with your own key​

An install can use a customer-managed key, chosen when it is installed, for the Firestore database, both BigQuery datasets, the uploads bucket, the token signing secret, and Cloud Run's copy of GOAT's image. It cannot be switched on later by a setting; that is a migration.

Network​

By default the service accepts traffic from anywhere, and GOAT's own checks decide each request. An install can instead accept traffic only through your own load balancer. Sign-in requests to Identity Platform leave the service over its default internet connection.

GOAT documentation

Type to search.