Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADAP-545] [Feature] Add support for Authrorized Datasets and dataset-level grants #594

Open
3 tasks done
akerone opened this issue May 11, 2023 · 4 comments
Open
3 tasks done
Labels
feature:grants Issues related to dbt's grants functionality pkg:dbt-bigquery Issue affects dbt-bigquery type:enhancement New feature request

Comments

@akerone
Copy link

akerone commented May 11, 2023

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt-bigquery functionality, rather than a Big Idea better suited to a discussion

Describe the feature

The ability to configure Authorized Datasets in dbt-project.yml, similarly to Authorized Views. For example, a +grant_access_to: where +schema: is also present at the same level could authorize the whole dataset rather than all individual views.

The same goes for direct grants.

Describe alternatives you've considered

dbt currently achieves the same result although, in our opinion, a less user-friendly way. Giving permissions to every separate model becomes hell when it's time to revoke any of them.

Who will this benefit?

Every single BQ admin who's in any way concerned by security. It also indirectly solves dbt-labs/dbt-bigquery#126.

Are you interested in contributing this feature?

No response

Anything else?

No response

@akerone akerone added type:enhancement New feature request triage:product In Product's queue labels May 11, 2023
@github-actions github-actions bot changed the title [Feature] Add support for Authrorized Datasets and dataset-level grants [ADAP-545] [Feature] Add support for Authrorized Datasets and dataset-level grants May 11, 2023
@dbeatty10 dbeatty10 self-assigned this May 11, 2023
@dbeatty10
Copy link
Contributor

Thanks for opening this feature request @akerone !

It sounds like making the revoke process easier is your primary goal?

Did you consider an alternative using grant config inheritance in your dbt_project.yml similar to the following (using BigQuery-specific syntax)?

dbt_project.yml

models:
  project_name_here:
    folder_name_containing_your_dataset_models:
      +grants:
            roles/bigquery.dataViewer: ['user:[email protected]', 'user:[email protected]']

@dbeatty10 dbeatty10 added triage:awaiting-response Awaiting a response from the reporter and removed triage:product In Product's queue labels May 11, 2023
@dbeatty10 dbeatty10 removed their assignment May 11, 2023
@github-actions github-actions bot added triage:product In Product's queue and removed triage:awaiting-response Awaiting a response from the reporter labels Jul 12, 2023
@akerone
Copy link
Author

akerone commented Jul 12, 2023

Hi, sorry for the late response.

Giving read permission directly to the tables is not an option, as we want to grant read access only to the authorized views.

@acovaci
Copy link

acovaci commented Aug 15, 2023

👍🏻 It makes a lot of sense to grant dataset-level permissions (which can even be executed via SQL), and I ran into needing this too.

For example, you have a bunch of tables in your dataset. You want the user to see only specific ones. You need to grant:

  • bigquery.tables.get on the tables
  • bigquery.tables.list on the dataset

Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale Mark an issue or PR as stale, to be closed label Feb 12, 2024
@Fleid Fleid removed the Stale Mark an issue or PR as stale, to be closed label Feb 14, 2024
@dbeatty10 dbeatty10 added the feature:grants Issues related to dbt's grants functionality label Apr 18, 2024
@amychen1776 amychen1776 removed the triage:product In Product's queue label Jul 30, 2024
@mikealfare mikealfare added the pkg:dbt-bigquery Issue affects dbt-bigquery label Jan 14, 2025
@mikealfare mikealfare transferred this issue from dbt-labs/dbt-bigquery Jan 14, 2025
mikealfare pushed a commit that referenced this issue Jan 14, 2025
* Fixes for incremental strategy py model.WIP

* doc string

* Remove extra comment

* Uncomment change schema test

* Update dbt/include/bigquery/macros/materializations/incremental.sql

Add python language exception for time_ingestion_partitioning

Co-authored-by: colin-rogers-dbt <[email protected]>

* Remove tox command flag for test python

* Adding the env vars in integration

* Switch to cluster execution for the python models

* Remove comment and add changie

* Skipping tests since dataproc is unstable. Restoring default to serverless

---------

Co-authored-by: colin-rogers-dbt <[email protected]>
mikealfare pushed a commit that referenced this issue Jan 20, 2025
* Update tox requirement from ~=4.10 to ~=4.11

Updates the requirements on [tox](https://github.com/tox-dev/tox) to permit the latest version.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](tox-dev/tox@4.10.0...4.11.1)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add automated changelog yaml from template for bot PR

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Github Build Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:grants Issues related to dbt's grants functionality pkg:dbt-bigquery Issue affects dbt-bigquery type:enhancement New feature request
Projects
None yet
Development

No branches or pull requests

6 participants