Enable BigQuery policy tags
What you need in Google Cloud to enable BigQuery policy tags on your backend, and how to ask Keboola for it.
BigQuery policy tags are available on BYODB BigQuery backends only and are off by default. To enable them, contact Keboola support or your account executive. Repeat this for each backend that needs the feature.
What you need
Section titled “What you need”- Your BigQuery backend and the taxonomy your policy tags live in. We send you a step-by-step guide, or a Terraform module, with your values filled in. A backend uses one taxonomy, in the backend’s BigQuery location, because a policy tag only protects a column in its own taxonomy’s location.
- A test policy tag in that taxonomy. Keboola attaches it to scratch tables to test the setup. Keep it apart from the tags that classify your data.
- One custom role granted on that taxonomy. It holds only
datacatalog.taxonomies.getand is bound for the service account your backend is registered with (the “Keboola Main Service Account” from connecting BigQuery) and for the service accounts in your backend’s folder (principalSet://cloudresourcemanager.googleapis.com/folders/{folder id}/type/ServiceAccount). Projects created later are covered automatically. The role must be a custom role; Keboola refuses a predefined one. It lets Keboola set tags but not read protected data, and it does not let Keboola change your taxonomy’s access policy. See What you grant. - A list of the projects to switch on. Tags are carried over only in projects that have the feature switched on, so you can start with one pilot project and add more later. The backend needs at least one project, because Keboola tests the setup as one of its projects.
- If your taxonomy enforces fine-grained access control, a read grant for each of those projects.
roles/datacatalog.categoryFineGrainedReaderon the taxonomy for each project allowed to see the data (principalSet://cloudresourcemanager.googleapis.com/projects/{project number}/type/ServiceAccount). Without it, cloning or copying a tagged table, pulling it into a branch, creating a table from it, previewing or exporting it, and loading it incrementally all fail in that project withstorage.backend.policyTagAccessDenied. Keboola never grants this role itself. See Fine-grained access.
What Keboola does
Section titled “What Keboola does”Once your grants are in place, Keboola tests the setup end to end, twice: once as the backend’s service account and once as the service account of one project. Each test creates a scratch table, attaches the test tag, reads it back and removes the table. Only then does Keboola enable the backend and switch on the projects you named. If a test fails, Keboola does not enable the backend and tells you what to fix.
To add a project later, ask Keboola to switch it on. If your taxonomy enforces fine-grained access, grant that project the read role first; Keboola warns when it is missing.
Changing the setup later
Section titled “Changing the setup later”- A different taxonomy or role. Ask Keboola. It disables the backend first, records the new values and tests them again.
- Turning it off. Keboola can disable the backend immediately. Nothing changes on your taxonomy; the grants stay until you remove them.
- Removing grants. Keboola does not detect a grant removed after enablement. Copies of protected columns then fail.
Was this page helpful?
Thank you for helping improve Keboola's documentation!