Skip to content

Add Dataset access support - #1046

Merged
tseaver merged 9 commits into
googleapis:masterfrom
tseaver:bigquery-dataset_acls
Aug 11, 2015
Merged

Add Dataset access support#1046
tseaver merged 9 commits into
googleapis:masterfrom
tseaver:bigquery-dataset_acls

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

Uses #1045 as a base.

  • Adds Dataset.access_grants property.
  • Marshals values to/from that property in Dataset API requests/responses.

@tseavertseaver added the api: bigquery Issues related to the BigQuery API. label Aug 7, 2015
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 7, 2015
@tseavertseaver mentioned this pull request Aug 7, 2015
@dhermes

Copy link
Copy Markdown
Contributor

Is an AccessGrant like an ACL or something different?

Comment threadgcloud/bigquery/dataset.py Outdated

This comment was marked as spam.

This comment was marked as spam.

@dhermes

Copy link
Copy Markdown
Contributor

Is there a standalone ACL API for this like there is for storage?

Comment threadgcloud/bigquery/dataset.py Outdated

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Is an AccessGrant like an ACL or something different?

An AccessGrant instance is a little like a single entity in an ACL. Unlike some ACL systems. this system does not have a notion of a "deny permission" / "allow permission" entry: all the entries are grants of a role (enabling some kind of access) to a principal.

Is there a standalone ACL API for this like there is for storage?

Nope.

Comment threadgcloud/bigquery/dataset.py Outdated

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Rebased after merge of #1045.

The back-end might return a grant with more than one entity_type for a given
role.
See:
#1046 (comment)
@tseaver

Copy link
Copy Markdown
ContributorAuthor

@dhermes Any remaining issues?

@dhermes

Copy link
Copy Markdown
Contributor

@tseaver We still have an unresolved question to @fhoffa. I'm not sure 09c1d14 does the trick.

Also note the failure on Travis

======================================================================FAIL: test__parse_access_grants_w_multiple_entity_types (gcloud.bigquery.test_dataset.TestDataset)
----------------------------------------------------------------------Traceback (mostrecentcalllast):
File"/home/travis/build/GoogleCloudPlatform/gcloud-python/gcloud/bigquery/test_dataset.py", line284, intest__parse_access_grants_w_multiple_entity_typesself._verifyAccessGrants(grants, RESOURCE)
File"/home/travis/build/GoogleCloudPlatform/gcloud-python/gcloud/bigquery/test_dataset.py", line88, in_verifyAccessGrantsself.assertEqual(a_grant.entity_type, r_grant['entity_type'])
AssertionError: 'specialGroup'!='userByEmail'-specialGroup+userByEmail

Is it possible the test is non-deterministic / depends on dictionary order?

@tseaver

Copy link
Copy Markdown
ContributorAuthor

AFAICT, 09c1d14 should handle cases where the back-end returns the hypothetical multiple grant. We can back it out if @fhoffa says it can never happen.

Yes, the failure is likely due to hash randomization. 6720b35 should fix that.

@dhermes

Copy link
Copy Markdown
Contributor

Let's get this in so we can get a BQ release, but I really do not want to drop this question. Calling sorted does not seem to be the right move.

LGTM

@dhermes

Copy link
Copy Markdown
Contributor

#1050 opened to continue this discussion

tseaver added a commit that referenced this pull request Aug 11, 2015
@tseaver
tseaver merged commit 2d017de into googleapis:masterAug 11, 2015
@tseaver
tseaver deleted the bigquery-dataset_acls branch August 11, 2015 18:59
@dhermesdhermes mentioned this pull request Aug 12, 2015
gcf-owl-botBot added a commit that referenced this pull request Jul 9, 2025
This partially reverses PR #1046
Source-Link: googleapis/googleapis@2b00aed
Source-Link: googleapis/googleapis-gen@d9fa2cd
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiZDlmYTJjZDFjNDE5NzFhZmMzNWNjZjk1YWY4YzAxOTA0YTJhMGNiZSJ9
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXF1b3Rhcy8uT3dsQm90LnlhbWwiLCJoIjoiZDlmYTJjZDFjNDE5NzFhZmMzNWNjZjk1YWY4YzAxOTA0YTJhMGNiZSJ9
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiZDlmYTJjZDFjNDE5NzFhZmMzNWNjZjk1YWY4YzAxOTA0YTJhMGNiZSJ9
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVyLy5Pd2xCb3QueWFtbCIsImgiOiJkOWZhMmNkMWM0MTk3MWFmYzM1Y2NmOTVhZjhjMDE5MDRhMmEwY2JlIn0=
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtZmxlZXRlbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6ImQ5ZmEyY2QxYzQxOTcxYWZjMzVjY2Y5NWFmOGMwMTkwNGEyYTBjYmUifQ==
parthea pushed a commit that referenced this pull request Nov 24, 2025
* chore(deps): update all dependencies
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 26, 2025
Co-authored-by: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 26, 2025
🤖 I have created a release *beep* *boop*
---
## [2.7.0](googleapis/google-auth-library-python@v2.6.6...v2.7.0) (2022-06-07)
### Features
* add experimental enterprise cert support ([#1052](googleapis/google-auth-library-python#1052)) ([dda7dda](googleapis/google-auth-library-python@dda7dda))
* add experimental GDCH support ([#1022](googleapis/google-auth-library-python#1022)) ([5367aac](googleapis/google-auth-library-python@5367aac))
* Pluggable auth support ([#995](googleapis/google-auth-library-python#995)) ([62daa73](googleapis/google-auth-library-python@62daa73))
### Bug Fixes
* validate urls for external accounts ([#1031](googleapis/google-auth-library-python#1031)) ([61b1f15](googleapis/google-auth-library-python@61b1f15))
### Reverts
* pluggable auth support [#995](googleapis/google-auth-library-python#995) ([#1039](googleapis/google-auth-library-python#1039)) ([513d999](googleapis/google-auth-library-python@513d999))
* revert experimental GDCH support ([#1022](googleapis/google-auth-library-python#1022)) ([#1042](googleapis/google-auth-library-python#1042)) ([c720995](googleapis/google-auth-library-python@c720995))
### Documentation
* fix changelog header to consistent size ([#1046](googleapis/google-auth-library-python#1046)) ([e64d084](googleapis/google-auth-library-python@e64d084))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
parthea pushed a commit that referenced this pull request Mar 6, 2026
* fix: error if eval()-ing repr(SchemaField)
* Make repr(PolicyTagList) evaluable
* Fix SchemaField repr with policy tags
The repr() should be evaluable.
Co-authored-by: Tres Seaver <tseaver@palladion.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
* Implementation of client side statements that return
* Small fix
* Incorporated comments
* Added tests for exception in commit and rollback
* Fix in tests
* Skipping few tests from running in emulator
* Few fixes
* Refactoring
* Incorporated comments
* Incorporating comments
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigqueryIssues related to the BigQuery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tseaver@dhermes@googlebot