Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Google Cloud · Associate Data Practitioner

Access control and sharing

Associate Data Practitioner · Lesson 13 of 16 · 1:35:01

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the Google Cloud Associate Data Practitioner exam, on the official exam guide. In this lesson: least privilege with Identity and Access Management, roles for BigQuery and Cloud Storage, access control for buckets (uniform bucket-level access, public access prevention, signed URLs), and sharing data with BigQuery sharing, formerly Analytics Hub. Includes three original practice questions, with Cymbal Energy, a fictional electricity and gas supplier, as the example.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Too much access

More than two hundred people work with data at Cymbal Energy: analysts, engineers, partners, and soon the city's energy office. Today, many of them hold the basic editor role on the whole project, and last month, a bucket of meter files was almost made public. The goal is simple: everyone gets exactly what they need, and nothing more.

Least privilege with IAM

Identity and Access Management decides who can do what on which resource: a principal, like a user, a group, or a service account, receives a role on a resource, like a project, a dataset, or a bucket. A role is a set of permissions, like the permission to read the data of a table. Least privilege means granting the narrowest role, on the smallest resource, preferably to groups rather than to individuals. Basic roles, owner, editor, and viewer, include thousands of permissions across all services, so avoid them in production, and choose predefined roles, or custom roles when none fits.

Roles for BigQuery and Cloud Storage

In BigQuery, Data Viewer reads tables, Data Editor also changes them, and Data Owner also manages access to the dataset. Running a query is a job, so an analyst also needs Job User, or the broader BigQuery User role, on the project that runs it. In Cloud Storage, Storage Object Viewer reads objects, Storage Object Creator only adds new ones, and Storage Object Admin has full control of the objects. Grant these roles on the dataset or the bucket that each person needs, not on the whole project.

Access control for Cloud Storage

Cloud Storage offers two ways to control access. With uniform bucket-level access, only IAM decides, for the whole bucket, and access control lists are turned off: it is the recommended choice, and after ninety consecutive days, it can no longer be turned off. Fine-grained access keeps access control lists on single objects, for the rare cases that need them. A bucket becomes public when a role is granted to all users, and public access prevention blocks that, even by mistake. And to give someone without a Google account temporary access to one object, create a signed URL, which expires after the time you set.

Sharing with BigQuery sharing

Sometimes, data must reach other teams, or other organizations, like the city's energy office. BigQuery sharing, formerly Analytics Hub, lets a publisher create a data exchange, and publish datasets in it as listings. A subscriber gets a linked dataset in their own project, without any copy of the data, so they always see the current version, and the publisher controls who can subscribe. Choose it to share data at scale, across projects and organizations, instead of exporting files, or granting outsiders roles on your own project.

Recap

Let's recap. IAM grants roles, which are sets of permissions, to principals, on resources. Least privilege means the narrowest role, on the smallest resource, and no basic roles in production. In BigQuery, Data Viewer reads, Data Editor changes, Data Owner manages access, and Job User runs queries. In Cloud Storage, uniform bucket-level access lets IAM decide alone, public access prevention blocks public buckets, and signed URLs give temporary access. And BigQuery sharing publishes listings that subscribers read as linked datasets, with no copy.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. An analyst must run queries on the billing dataset, and nothing else: no changes to the data, and no other datasets. Which roles fit?

    • The basic editor role on the project
    • Data Viewer on the dataset, plus Job User
    • BigQuery Data Owner on the dataset
    • BigQuery Admin on the project
    Show the answer

    Data Viewer on the dataset, plus Job User

    Data Viewer on the billing dataset lets the analyst read its tables, and Job User lets them run the queries. “The basic editor role on the project” is a basic role, with thousands of permissions across every service. “BigQuery Data Owner on the dataset” would also let the analyst change the data, and who can access it. And “BigQuery Admin on the project” would give control of all of BigQuery in the project.

  2. A vendor with no Google account must download one invoice file from a private bucket, for the next two hours only. What should the data practitioner create?

    • A Storage Object Viewer grant to all users
    • A bucket with public access prevention off
    • An access control list for the vendor’s email
    • A signed URL that expires in two hours
    Show the answer

    A signed URL that expires in two hours

    A signed URL gives whoever holds the link access to that one object, until it expires. “A Storage Object Viewer grant to all users” would make the whole bucket public, with no time limit. “A bucket with public access prevention off” would only make public access possible, and would grant nothing to the vendor. And “An access control list for the vendor’s email” would still need a Google account, and it fails when access control lists are turned off.

  3. The city’s energy office, in its own Google Cloud organization, needs daily consumption by district, always up to date, without copies to maintain. What fits best?

    • A nightly CSV export sent by email
    • BigQuery Admin on the project for the city
    • A listing in a BigQuery sharing exchange
    • A copy of the dataset in the city’s project
    Show the answer

    A listing in a BigQuery sharing exchange

    A listing in a BigQuery sharing exchange gives the city a linked dataset, always current, with no copy. “A nightly CSV export sent by email” would send files that are out of date the next day. “BigQuery Admin on the project for the city” would give an outside organization control of all of BigQuery in your project. And “A copy of the dataset in the city’s project” would create a copy that someone must keep refreshing.