Skip to content

Associate Data Practitioner · Domain 4: Data Management · 25% of the exam

Task 4.1: Configure access control and governance.

Least-privilege IAM with basic and predefined roles and permissions for BigQuery and Cloud Storage, bucket access control, and sharing data through BigQuery sharing (Analytics Hub in the guide).

Study it

  • Least privilege with IAM: basic and predefined roles and permissions for BigQuery and Cloud Storage

    Partly covered by: Shared Responsibility & IAM

  • Cloud Storage access: public or private, uniform bucket-level access

    Lesson coming

  • Sharing data with BigQuery sharing (formerly Analytics Hub)

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

An external auditor holds the legacy basic Viewer role on an analytics project so that she can review the history of every user's BigQuery jobs. A review finds she can also read table data. She must keep seeing all users' jobs in the project and must not be able to read table data, now or in datasets created later. What should replace her current access?

  1. AKeep basic Viewer, and remove her from the access settings of each existing dataset
  2. BBigQuery Job User granted on the project
  3. CBigQuery Metadata Viewer granted on the project
  4. DBigQuery Resource Viewer granted on the project
Show the answer and why
  • AKeep basic Viewer, and remove her from the access settings of each existing dataset

    Incorrect

    Basic Viewer lets her list all jobs, but BigQuery grants project viewers the Data Viewer role on every new dataset, so each dataset created later would again be readable.

  • BBigQuery Job User granted on the project

    Incorrect

    Job User grants permission to run jobs, including queries, in the project; it gives no permission to list or get other users' jobs.

  • CBigQuery Metadata Viewer granted on the project

    Incorrect

    Metadata Viewer exposes metadata of datasets and tables; it is not the role that lists and gets every user's jobs in the project.

  • DBigQuery Resource Viewer granted on the project

    Correct

    Resource Viewer includes permission to get, list and list all jobs in the project and to view workloads, without any permission to read table data, so new datasets stay closed to her.

BigQuery advises avoiding basic roles: they grant excessive and uneven access, and project viewers, editors and owners automatically receive data roles on new datasets. Among the predefined project-level roles, BigQuery Resource Viewer carries bigquery.jobs.listAll and gives visibility of jobs and workloads without data access, while Job User only runs jobs.

Question 2 · choose 1

A supplier's service account uploads daily files to a landing bucket. Under least privilege, it must be able to add new objects, but it must not list, read, overwrite or delete anything in the bucket. Which predefined role should it receive on the bucket?

  1. AStorage Object User
  2. BStorage Object Creator
  3. CStorage Object Viewer
  4. DStorage Object Admin
Show the answer and why
  • AStorage Object User

    Incorrect

    Storage Object User allows creating, reading, updating and deleting objects, far more than the supplier needs.

  • BStorage Object Creator

    Correct

    Storage Object Creator allows creating objects and does not give permission to view, delete or overwrite them.

  • CStorage Object Viewer

    Incorrect

    Storage Object Viewer lets the account view and list objects, and it does not allow uploads at all.

  • DStorage Object Admin

    Incorrect

    Storage Object Admin grants full control of objects, including listing, viewing and deleting them.

Cloud Storage predefined roles for objects range from Viewer (read and list) and Creator (create only) to User (create, read, update and delete) and Admin (full control). A write-only drop zone matches Storage Object Creator.

Question 3 · choose 1

A data engineering team must create, load, update and delete tables and views in the `staging` dataset. Under least privilege, the team must not be able to change who has access to the dataset or delete the dataset itself. Which role should it get on the staging dataset?

  1. ABigQuery Data Editor
  2. BBigQuery Data Owner
  3. CBigQuery Data Viewer
  4. DThe legacy basic Editor role on the project
Show the answer and why
  • ABigQuery Data Editor

    Correct

    On a dataset, Data Editor lets principals create, update, get, list and delete its tables and views and read and update table data, without full control of the dataset.

  • BBigQuery Data Owner

    Incorrect

    Data Owner grants all permissions for the dataset and everything in it, which includes managing its access and deleting it.

  • CBigQuery Data Viewer

    Incorrect

    Data Viewer can read metadata and list tables, but it cannot create, load or delete tables.

  • DThe legacy basic Editor role on the project

    Incorrect

    Basic roles are highly permissive; on the project this one applies to every dataset and many other services, far broader than one dataset.

BigQuery's dataset-level predefined roles step up from Data Viewer (read), to Data Editor (manage tables, views and data), to Data Owner (all permissions on the dataset and its resources). Granting the narrowest predefined role on the narrowest resource follows least privilege better than basic project roles.

Question 4 · choose 1

A team turned on uniform bucket-level access for a bucket today, and a partner integration that relied on per-object ACLs has stopped working. The team wants to know whether it can still go back to fine-grained access. What is the rule?

  1. ANo; uniform bucket-level access is permanent as soon as it is turned on
  2. BYes, at any time, because the two models can be toggled freely
  3. CYes, within 90 days; after that uniform bucket-level access becomes permanent
  4. DYes, but only by creating a new bucket and copying the objects into it
Show the answer and why
  • ANo; uniform bucket-level access is permanent as soon as it is turned on

    Incorrect

    There is a window to switch back; the setting only becomes permanent after it ends.

  • BYes, at any time, because the two models can be toggled freely

    Incorrect

    The choice is not open forever: once the switch-back window ends, uniform bucket-level access becomes permanent.

  • CYes, within 90 days; after that uniform bucket-level access becomes permanent

    Correct

    Once you enable uniform bucket-level access, you have 90 days to switch back to fine-grained access before it becomes permanent.

  • DYes, but only by creating a new bucket and copying the objects into it

    Incorrect

    Within the switch-back window the same bucket can return to fine-grained access; a new bucket is not needed.

Cloud Storage offers uniform access (IAM only, recommended) and fine-grained access (IAM plus legacy per-object ACLs). After uniform bucket-level access is enabled, there are 90 days to switch back before it becomes permanent.

Question 5 · choose 1

An analyst created a saved query in BigQuery Studio and has not shared it with anyone. A colleague whose only role on the project is BigQuery User reports that he can see the saved query listed in the Explorer pane. What explains this?

  1. AEvery new saved query is shared with all project members in the Code Editor role
  2. BSaved queries can be listed only by their creator and the people they are shared with
  3. CBigQuery User includes Data Viewer on every dataset, where saved queries are kept
  4. DBigQuery User includes dataform.repositories.list, which lists code assets
Show the answer and why
  • AEvery new saved query is shared with all project members in the Code Editor role

    Incorrect

    A new saved query is not shared with the project; BigQuery grants its creator the Dataform Admin role on it, and other people get access through the roles that are granted to them.

  • BSaved queries can be listed only by their creator and the people they are shared with

    Incorrect

    Listing does not follow sharing: users with the dataform.repositories.list permission can see all code assets in the project, whether or not the assets were shared with them.

  • CBigQuery User includes Data Viewer on every dataset, where saved queries are kept

    Incorrect

    Saved queries are code assets powered by Dataform, not tables in datasets, and BigQuery User does not grant read access to datasets that other people created.

  • DBigQuery User includes dataform.repositories.list, which lists code assets

    Correct

    Visibility of code assets is governed by project-level Dataform permissions; dataform.repositories.list is part of BigQuery User, BigQuery Job User and BigQuery Studio User, so holders see every code asset in the project's Explorer panel.

Predefined roles bundle permissions, sometimes for more than one service. Saved queries, notebooks and other BigQuery Studio code assets are powered by Dataform, so the dataform.repositories.list permission that standard BigQuery roles include lets their holders see every code asset in the project, while what each person can do with an asset follows the roles granted on it.

Question 6 · choose 1

In a sandbox project, analysts must be able to run queries and create their own datasets, and they should fully control the datasets they create, but they must not read the other datasets in the project. Which single predefined role on the project fits?

  1. ABigQuery Data Owner
  2. BBigQuery Admin
  3. CBigQuery Data Viewer
  4. DBigQuery User
Show the answer and why
  • ABigQuery Data Owner

    Incorrect

    Granted on the project, Data Owner gives all permissions on every dataset in it, including datasets other people created.

  • BBigQuery Admin

    Incorrect

    BigQuery Admin manages all BigQuery resources in the project, far more than the analysts need.

  • CBigQuery Data Viewer

    Incorrect

    On the project, Data Viewer lets principals read every dataset, and it does not let them run queries or create datasets.

  • DBigQuery User

    Correct

    On a project, BigQuery User lets principals run jobs, including queries, and create datasets; the creator of a new dataset is granted BigQuery Data Owner on it.

BigQuery User is designed for this pattern: it lets principals run jobs and create datasets in a project, and gives them ownership of the datasets they create, without granting access to data in other datasets.

Question 7 · choose 1

A dataset holds 40 tables. A contractor needs to query exactly one of them, `finance.fx_rates`, and nothing else in the dataset. Where should the BigQuery Data Viewer role be granted for her?

  1. AOn the fx_rates table itself
  2. BOn the finance dataset
  3. COn the project that holds the dataset
  4. DOn the organization node
Show the answer and why
  • AOn the fx_rates table itself

    Correct

    Data Viewer can be granted on a table or view, where it lets the principal read that table's data and metadata without access to the rest of the dataset.

  • BOn the finance dataset

    Incorrect

    On a dataset, Data Viewer covers every table and view in it, which is more than the contractor should see.

  • COn the project that holds the dataset

    Incorrect

    On the project, the role reaches every dataset in it, the broadest of the options.

  • DOn the organization node

    Incorrect

    At the organization level, the role would apply to the data of every project below it.

Many BigQuery predefined roles can be granted at the project, dataset, or table and view level. Least privilege means choosing the lowest level that still meets the need, here a single table.

Question 8 · choose 1

An analyst subscribes her project to a BigQuery sharing listing published by a partner. What appears in her project, and what can she do with it?

  1. AA full copy of the partner's tables that she can update as she likes
  2. BA read-only linked dataset that points to the shared dataset, which she can query
  3. CA scheduled transfer that copies the partner's tables into a new dataset every night
  4. DOwner access to the partner's source dataset in the partner's project
Show the answer and why
  • AA full copy of the partner's tables that she can update as she likes

    Incorrect

    Sharing does not replicate data into the subscriber's project, and the subscriber cannot change the shared data.

  • BA read-only linked dataset that points to the shared dataset, which she can query

    Correct

    Subscribing to a listing creates a linked dataset, a read-only dataset that references the shared dataset without replicating data, so she can query its tables and views.

  • CA scheduled transfer that copies the partner's tables into a new dataset every night

    Incorrect

    No transfer runs; the linked dataset reads the shared data in place, so it is always current.

  • DOwner access to the partner's source dataset in the partner's project

    Incorrect

    The subscriber gets a linked dataset in her own project, not access rights on the publisher's dataset.

In BigQuery sharing (formerly Analytics Hub), publishers list shared datasets in data exchanges. A subscriber gets a linked dataset: a read-only pointer in the subscriber's project that queries the shared data without copying it.

Question 9 · choose 1

An analyst wants to make a single chart image in a bucket publicly readable, leaving every other object private, and public access prevention is not enforced on the bucket. Which role, granted on the bucket, includes the permissions needed to make an individual object public?

  1. AStorage Object Viewer
  2. BStorage Object Admin
  3. CCloud KMS CryptoKey Encrypter/Decrypter
  4. DBigQuery Data Owner
Show the answer and why
  • AStorage Object Viewer

    Incorrect

    Viewer can read and list objects, but it cannot change who has access to them.

  • BStorage Object Admin

    Correct

    The make-data-public page lists Storage Object Admin as the role for making individual objects publicly readable (Storage Admin when you use the console).

  • CCloud KMS CryptoKey Encrypter/Decrypter

    Incorrect

    This role lets a principal use a key to encrypt and decrypt data; it does not change who can read objects.

  • DBigQuery Data Owner

    Incorrect

    BigQuery roles do not apply to objects in Cloud Storage buckets.

Making all objects in a bucket public requires Storage Admin, while making individual objects public requires Storage Object Admin (or Storage Admin in the console). Neither is possible while public access prevention applies to the bucket.

Practice domain 4 →Practice all domains →