Using Google Cloud as the identity provider
When you use Google Cloud as the identity provider, Fabricate's service account impersonates the service account.
Complete the Fabricate configuration
After you provide the service account email, to complete the configuration:

In the Service Account Description field, provide the description for the service account. The description is in the format
fabricate:<workspace identifier>, and is provided in the instructions at the bottom of the panel. Copy this value to use in the GCP configuration.In the Fabricate's Service Account Email field, provide the email address of the account that impersonates the service account. Copy this value to use in the GCP configuration.
Allow Fabricate to impersonate the service account
Next, in GCP, enable Fabricate to impersonate the service account.
Grant the Fabricate access to the service account
Click ☰ → IAM & Admin → Service Accounts, then click the service account email address for the service account.
Open the Permissions tab, then click Grant access.
In the New principals field, paste the Fabricate service account email address that you copied from Fabricate.
Click Select a role, type
Service Account Token Creator, then select it. This role allows Fabricate to impersonate the account.Click + Add another role, type
Service Account Viewer, then select it. This role allows Fabricate to read the description.Click Save.
Bind the service account to your workspace
On the service account, open the Details tab.
In the Description field, add the service account description text that you copied from Fabricate (
fabricate:<workspace id>). This ensures that no other workspace can impersonate this service account. The identifier can appear anywhere in the text. A single service account can list several workspaces, for examplefabricate:<id one>, fabricate:<id two>. However, Google limits the description to 256 bytes.Click Save changes.
Establishing a Fabricate identity on a self-hosted instance
Fabricate needs its own Google identity.
To establish a Google identity, first, In Google Cloud:
In the project that will own Fabricate's identity, enable the IAM API and the IAM Service Account Credentials API.
Create a service account there, for example
fabricate@my-project.iam.gserviceaccount.com.
After you complete that configuration, based on where Fabricate is hosted, complete one of the following options.
Attached service account (GCP → GCP)
Use this option if self-hosted Fabricate runs in Google Cloud:
Attach the service account to the VM (or node pool, or use Workload Identity on GKE) with the
cloud-platformaccess scope.Leave
FABRICATE_GCP_IMPERSONATOR_KEYunset. Fabricate reads the account's email from the metadata server.Optionally, if the dialog does not display it, set
FABRICATE_GCP_IMPERSONATOR_EMAILto the account's email address.Restart Fabricate.
External account (AWS → GCP)
Use this option if self-hosted Fabricate runs in AWS Cloud:
In IAM & Admin → Workload Identity Federation, click Create pool.
Add an AWS provider with the AWS account identifier that runs Fabricate.
On the service account, grant the pool's principal for the instance's IAM role Workload Identity User.
Generate the config with
gcloud iam workload-identity-pools create-cred-config ... --aws.Paste its JSON into
FABRICATE_GCP_IMPERSONATOR_KEY.Set
FABRICATE_GCP_IMPERSONATOR_EMAILto the service account's email address.Restart Fabricate.
Service account JSON key (any cloud provider → GCP)
Optionally, you can use this option with any other cloud providers not listed above:
In IAM & Admin → Service Accounts, open the service account.
Choose Keys → Add key → Create new key → JSON.
For the web and worker containers, set the entire file content as a single-line quoted value of the environment variable
FABRICATE_GCP_IMPERSONATOR_KEY:FABRICATE_GCP_IMPERSONATOR_KEY='{"type":"service_account","project_id":"...","private_key":"-----BEGIN PRIVATE KEY-----\n...","client_email":"fabricate@my-project.iam.gserviceaccount.com",...}'Restart Fabricate.
Last updated
Was this helpful?