Minimizing IAM Overhead with Public Data Catalog Tags in BigQuery

PDE By islever Editorial Last updated

Designing for a data platform. Designing for security and compliance.

Short answer

C Create the “gdpr” tag template with public visibility so all employees can search tags using existing metadata permissions, and assign bigquery.dataViewer to HR for sensitive tables.

Question

You have a BigQuery dataset named “customers”. All tables will be tagged by using a Data Catalog tag template named “gdpr”. The template contains one mandatory field, “has_sensitive_data”, with a boolean value. All employees must be able to do a simple search and find tables in the dataset that have either true or false in the “has_sensitive_data’ field. However, only the Human Resources (HR) group should be able to see the data inside the tables for which “has_sensitive data” is true. You give the all employees group the bigquery.metadataViewer and bigquery.connectionUser roles on the dataset. You want to minimize configuration overhead. What should you do next?
  1. Create the “gdpr” tag template with private visibility. Assign the bigquery.dataViewer role to the HR group on the tables that contain sensitive data.
  2. Create the “gdpr” tag template with private visibility. Assign the datacatalog.tagTemplateViewer role on this tag to the all employees group, and assign the bigquery.dataViewer role to the HR group on the tables that contain sensitive data.
  3. Create the “gdpr” tag template with public visibility. Assign the bigquery.dataViewer role to the HR group on the tables that contain sensitive data. Correct Answer
  4. Create the “gdpr” tag template with public visibility. Assign the datacatalog.tagTemplateViewer role on this tag to the all employees group, and assign the bigquery.dataViewer role to the HR group on the tables that contain sensitive data.

Key Takeaways

The main trap is assuming that viewing tags always requires the datacatalog.tagTemplateViewer role; however, public tag templates allow users with basic metadata viewer permissions to see tags automatically.

This page explains how to configure public Data Catalog tag templates in BigQuery to allow broad metadata search without extra IAM roles, ensuring minimal configuration overhead.

Common mistake: Many candidates choose Option D, believing they must explicitly grant `datacatalog.tagTemplateViewer` to all employees to enable tag searching. This ignores the behavior of public tag templates, which inherit visibility from the underlying resource's metadata permissions, making the extra role assignment redundant and against the 'minimize overhead' constraint.

Expert Analysis

The core of this question revolves around Data Catalog tag visibility and minimizing IAM configuration overhead. The key constraint is that all employees must search for tag values without additional role assignments beyond the existing bigquery.metadataViewer.

  • Public vs. Private Tag Templates: In Google Cloud Data Catalog, a tag template can be public or private. When a tag template is public, any user who has permission to view the underlying resource's metadata (in this case, via bigquery.metadataViewer) can also view the tags attached to that resource. This allows them to see and search the has_sensitive_data field value. No extra IAM roles are needed for these users to read the tags.
  • Private Tag Templates: If the template were private, users would require the separate roles/datacatalog.tagTemplateViewer role on the specific tag template to view the tags. Since the goal is to minimize configuration overhead, adding this role to "all employees" is unnecessary and violates the principle of least privilege/minimal changes.
  • Access Control for Sensitive Data: The requirement that only HR sees the actual data inside tables tagged as sensitive is handled by granting bigquery.dataViewer specifically to the HR group on those tables. All other employees retain only bigquery.metadataViewer, which allows them to see metadata (including public tags) but not the row-level data.

Option C correctly leverages public tag visibility to allow searching without extra roles, while restricting data access via BigQuery IAM. Option D adds an unnecessary role assignment (datacatalog.tagTemplateViewer). Options A and B use private visibility, which requires extra permissions for employees to view tags, increasing overhead.

Official Reference

https://cloud.google.com/data-catalog/docs/tags-and-tag-templates

This link opens the official vendor documentation in a new tab.

Exam Strategy

When a question asks to 'minimize configuration overhead' or 'avoid extra permissions', look for features that leverage existing permissions. In GCP, check if a setting (like public visibility) removes the need for explicit role grants. Always verify if the base permission mentioned (e.g., metadataViewer) already covers the required action when combined with the correct configuration.

Frequently Asked Questions

Do I need datacatalog.tagTemplateViewer for public tags?

No. If a tag template is public, users with permission to view the underlying resource's metadata (like bigquery.metadataViewer) can automatically view and search the tags without needing the tagTemplateViewer role.

How do I restrict data access while allowing metadata search?

Grant broad metadata permissions (e.g., bigquery.metadataViewer) to general users and specific data access roles (e.g., bigquery.dataViewer) only to authorized groups (e.g., HR) on sensitive resources.

More PDE FAQ →

Community Votes

C
63%
D
25%
B
12%

63% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 12 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 12

  1. raaad 👍 19 Answered C
    - The most straightforward solution with minimal configuration overhead. - By creating the "gdpr" tag template with public visibility, you ensure that all employees can search and find tables based on the "has_sensitive_data" field. - Assigning the bigquery.dataViewer role to the HR group on tables with sensitive data ensures that only they can view the actual data in these tables.
  2. scaenruy 👍 4 Answered D
    D. Create the “gdpr” tag template with public visibility. Assign the datacatalog.tagTemplateViewer role on this tag to the all employees group, and assign the bigquery.dataViewer role to the HR group on the tables that contain sensitive data.
  3. tibuenoc 👍 4 Answered B
    If you working with PII, We can't granted public access. So Private Visibility for the Tag Template its the best option. Check it https://cloud.google.com/data-catalog/docs/tags-and-tag-templates
  4. d11379b 👍 2 Answered C
    While D works well, it is not obligated to give all employees the role of tagTemplateViewer, as it will give them the view permission for tag templates as well as the tags created by the template. However, Tags are a type of business metadata. Adding tags to a data entry helps provide meaningful context to anyone who needs to use the asset.And public tags provide less strict access control for searching and viewing the tag as compared to private tags. Any user who has the required view permissions for a data entry can view all the public tags associated with it. View permissions for public tags are only required when you perform a search in Data Catalog using the tag: syntax or when you view an unattached tag template.
  5. ML6 👍 2
    Wouldn't employees still need the roles/datacatalog.tagTemplateViewer role to view private AND public tags? To get the permissions that you need to view public and private tags on Bigtable resources, ask your administrator to grant you the following IAM roles: - roles/datacatalog.tagTemplateViewer - roles/bigtable.viewer Source: https://cloud.google.com/bigtable/docs/manage-data-assets-using-data-catalog#permissions-view-tags
Show 7 more comments
  1. meh_33 👍 2 Answered C
    This Guy Raasd is mostly correct with explanation thanks mate.
  2. JyoGCP 👍 2 Answered C
    I'll go with raaad's answer
  3. carbonscave 👍 1 Answered C
    Why C is the right move The Power of Public Visibility: In Google Cloud Data Catalog, when you set a tag template to public visibility, anyone who already has permission to view the underlying resource's metadata (which the all employees group has via the bigquery.metadataViewer role) can automatically view and search the tags attached to it. This completely eliminates the need to manage separate Data Catalog IAM roles for the entire company, perfectly satisfying the "minimize configuration overhead" requirement. Separating Metadata from Data: Being able to search a tag (metadata) does not grant you access to read the actual rows in the table. Because the all employees group only has metadataViewer, they can see the table exists and search its GDPR tags, but they will be blocked if they try to run a SELECT *. Targeted Data Access: By explicitly granting bigquery.dataViewer only to the HR group on the specific tables marked as sensitive, you securely restrict the actual data visibility exactly as required.
  4. ML6 👍 1
    Ignore the last reply. The correct answer would be C. Tags = Custom metadata fields that you can attach to a data entry to provide context. Tag templates = Reusable structures that you can use to rapidly create new tags. In short, the employees do not need a tagTemplateViewer role because it pertains to the tag templates, not the tags themselves.
  5. NickForDiscussions 👍 1 Answered D
    "All employees must be able to do a simple search and find tables in the dataset that have either true or false in the “has_sensitive_data’ field." To be able to search for values in the tags you need the role roles/datacatalog.tagTemplateViewer. Meaning option D is correct.
  6. iooj 👍 1
    A - employees cannot use the tag B - increases the configuration overhead C - exactly what we need D - unnecessary role assignment, the tag template is already visibile
  7. d11379b 👍 1
    As all employees have the role “ bigquery.metadataViewer” they are already capable to see tags on BigQuery then

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to PDE Study Guide