You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- You'll need to generate a service account JSON key file
28
-
- The service account key file must be uploaded in Elementary
29
-
-**Workload Identity Federation**: Support for Workload Identity Federation with BigQuery service accounts is coming soon
25
+
2.**Authentication** - Either a Google Cloud service account or a Workload Identity Federation setup, with the **Storage Object User** (`roles/storage.objectUser`) role granted on the bucket. See [Authentication methods](#authentication-methods) below for both options.
30
26
27
+
## Authentication methods
28
+
29
+
Elementary supports two authentication methods for GCS. Pick the one that fits your security model:
30
+
31
+
-**Service account** — create a service account, download its JSON key, and upload the key to Elementary. Simplest to set up.
32
+
-**Workload Identity Federation (WIF)** — Elementary authenticates from its AWS role through a federated identity. No long-lived credentials are stored in Elementary.
33
+
34
+
Select a tab below and follow the steps for your chosen method.
35
+
36
+
<Tabs>
37
+
<Tabtitle="Service account">
38
+
1. Go to [Google Cloud Console > IAM & Admin > Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) and create a service account (or select an existing one).
39
+
40
+
2. Grant the service account the **Storage Object User** (`roles/storage.objectUser`) role on your GCS bucket.
41
+
42
+
3. Generate a JSON key for the service account:
43
+
1. Select your service account.
44
+
2. Click the three dots menu and select 'Manage keys'.
45
+
3. Click 'ADD KEY' and select 'Create new key'.
46
+
4. Choose 'JSON' format and click 'CREATE'. The JSON file downloads automatically.
47
+
48
+
4. You will upload this JSON key to Elementary in the connection form below, in the **Service account file** field.
49
+
</Tab>
50
+
<Tabtitle="Workload Identity Federation">
51
+
The WIF setup is identical to the one documented for BigQuery — the only GCS-specific change is the permission you grant to the pool principal. Follow the Workload Identity Federation steps on the [BigQuery connection page](/cloud/integrations/dwh/bigquery) (select the **Workload Identity Federation** tab), with the following change:
52
+
53
+
- In the step where you grant IAM roles to the principalSet, **do not** grant the BigQuery roles. Instead, grant the **Storage Object User** (`roles/storage.objectUser`) role on your GCS bucket. You can do this from the bucket's 'Permissions' tab: 'GRANT ACCESS' → paste the same principalSet → assign `Storage Object User`.
54
+
- You can skip the dataset-level grant step entirely — it is BigQuery-specific.
55
+
56
+
Once you have the downloaded WIF credential configuration file, upload it to Elementary in the connection form below, in the **WIF credential file** field.
57
+
</Tab>
58
+
</Tabs>
31
59
32
60
## Configuring Log Streaming to GCS
33
61
@@ -42,14 +70,8 @@ Before configuring log streaming to GCS, you'll need:
42
70
43
71
4. Enter your GCS configuration:
44
72
-**Bucket Path**: The full GCS bucket path (e.g., `gs://my-logs-bucket`)
45
-
-**Service Account Key File**: Upload your Google Cloud service account JSON key file
46
-
- To generate a service account key file:
47
-
1. Go to [Google Cloud Console > IAM & Admin > Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts)
48
-
2. Select your service account (or create a new one)
49
-
3. Click the three dots menu and select "Manage keys"
50
-
4. Click "ADD KEY" and select "Create new key"
51
-
5. Choose "JSON" format and click "CREATE"
52
-
6. The JSON file will be downloaded automatically
73
+
-**Authentication method**: Use the toggle to select **Service account** or **Workload Identity Federation**, matching the method you set up in [Authentication methods](#authentication-methods) above.
74
+
-**Service account file** (Service account method) or **WIF credential file** (Workload Identity Federation method): Upload the JSON file you prepared.
This guide contains the necessary steps to connect a BigQuery environment to your Elementary account.
6
7
7
-
<CloudServiceAccount />
8
+
## Choose an authentication method
9
+
10
+
Elementary supports two authentication methods for BigQuery. Pick the one that fits your security model:
11
+
12
+
-**Service account** — create a service account, download its JSON key, and upload the key to Elementary. Simplest to set up.
13
+
-**Workload Identity Federation (WIF)** — Elementary authenticates from its AWS role through a federated identity. No long-lived credentials are stored in Elementary.
14
+
15
+
Select a tab below and follow the steps for your chosen method.
16
+
17
+
<Tabs>
18
+
<Tabtitle="Service account">
19
+
<CloudServiceAccount />
20
+
</Tab>
21
+
<Tabtitle="Workload Identity Federation">
22
+
<CloudWIF />
23
+
</Tab>
24
+
</Tabs>
8
25
9
26
<PermissionsAndSecurity />
10
27
11
28
### Fill the connection form
12
29
13
-
Provide the following fields:
30
+
Use the **Authentication method** toggle at the top of the form to select either **Service account** or **Workload Identity Federation**, matching the method you set up above. The credentials upload field changes based on your selection:
31
+
32
+
-**Service account file** (Service account method): the service account JSON key file you downloaded.
33
+
-**WIF credential file** (Workload Identity Federation method): the external account JSON configuration file you downloaded from the identity pool.
34
+
35
+
Then provide the remaining fields:
14
36
15
-
-**Service account file**: The service account file you generated for Elementary. For more information, refer to [Create BigQuery service account](./bigquery#create-bigquery-service-account).
16
37
-**Project**: The name of your BigQuery project.
17
38
-**Elementary dataset**: The name of your Elementary dataset. Usually `[dataset name]_elementary`.
18
39
-**Location**: Use this field to configure the location of BigQuery datasets as per [the BigQuery documentation](https://cloud.google.com/bigquery/docs/locations).
19
-
-**Workload Identity Federation**: Support for Workload Identity Federation with BigQuery service accounts is coming soon
1. In the Cloud Console, go to: IAM & Admin > Workload Identity Federation. Click 'CREATE POOL' (or select an existing pool), give it a name (e.g. `elementary-identity-pool`), and continue.
4
+
5
+
2. On the pool, click 'ADD A PROVIDER' and choose 'AWS'. Set the provider name to `Elementary AWS` and the AWS account ID to `743289191656` (Elementary's AWS account), then continue.
6
+
7
+
<img
8
+
src="/pics/bigquery-wif/add_aws_provider.png"
9
+
alt="Add AWS provider"
10
+
/>
11
+
12
+
3. In the provider's attribute conditions, add the following condition. This is the Elementary role for GCP — only Elementary can authenticate through this provider. Then save the provider:
### Grant BigQuery permissions to the identity pool principal:
24
+
25
+
4. Go to IAM & Admin > IAM and click 'GRANT ACCESS'. In 'New principals', paste the following principalSet. Replace `PROJECT_NUMBER` with your GCP project number and `POOL_NAME` with the pool you created above:
5. Assign the following project-level roles to the principalSet and save. You will grant `BigQuery Data Viewer` at the dataset level in the next step:
32
+
-**BigQuery Job User**
33
+
-**BigQuery Metadata Viewer**
34
+
-**BigQuery Resource Viewer**
35
+
36
+
### Grant principal access to specific datasets:
37
+
38
+
6. In the [BigQuery console](https://console.cloud.google.com/bigquery), find your Elementary dataset in the 'Explorer' tab. Click the three dots next to it > Share > ADD PRINCIPAL. Paste the same principalSet from step 4, select `BigQuery Data Viewer`, and save. If your dbt dataset is in a different project, also grant it `BigQuery Metadata Viewer` and `BigQuery Resource Viewer`.
39
+
40
+
### Download the credential configuration file:
41
+
42
+
7. Back in IAM & Admin > Workload Identity Federation, select your pool and click 'GRANT ACCESS' at the top.
43
+
44
+
8. Choose 'Grant access using federated identities (Recommended)' and click 'DOWNLOAD CONFIG'.
9. In the 'Configure your application' panel, select the provider you created (e.g. `Elementary AWS`) from the Provider dropdown, then click 'DOWNLOAD CONFIG' to download the JSON configuration file.
0 commit comments