Title: google.auth.default ignores provided scopes when application default credentials are an authorized user. · Issue #805 · googleapis/python-bigquery · GitHub
Open Graph Title: google.auth.default ignores provided scopes when application default credentials are an authorized user. · Issue #805 · googleapis/python-bigquery
X Title: google.auth.default ignores provided scopes when application default credentials are an authorized user. · Issue #805 · googleapis/python-bigquery
Description: Environment details OS: macOS Big Sur version 11.4 Python version: 3.8.2 pip version: 21.1.3 google-auth version: 1.33.1 Steps to reproduce Confirm application default credentials are an authorized user (env var GOOGLE_APPLICATION_CREDEN...
Open Graph Description: Environment details OS: macOS Big Sur version 11.4 Python version: 3.8.2 pip version: 21.1.3 google-auth version: 1.33.1 Steps to reproduce Confirm application default credentials are an authorized...
X Description: Environment details OS: macOS Big Sur version 11.4 Python version: 3.8.2 pip version: 21.1.3 google-auth version: 1.33.1 Steps to reproduce Confirm application default credentials are an authorized...
Opengraph URL: https://github.com/googleapis/python-bigquery/issues/805
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"google.auth.default ignores provided scopes when application default credentials are an authorized user.","articleBody":"#### Environment details\r\n\r\n - OS: macOS Big Sur version 11.4\r\n - Python version: 3.8.2\r\n - pip version: 21.1.3\r\n - `google-auth` version: 1.33.1\r\n\r\n#### Steps to reproduce\r\n\r\n 1. Confirm application default credentials are an authorized user (env var GOOGLE_APPLICATION_CREDENTIALS is not set, and gcloud auth application-default login has been run and quota project has been added to ADC)\r\n 2. Run the code from the guide \"Querying Drive Data\"\r\n ```\r\n from google.cloud import bigquery\r\nimport google.auth\r\n\r\n# Create credentials with Drive \u0026 BigQuery API scopes.\r\n# Both APIs must be enabled for your project before running this code.\r\ncredentials, project = google.auth.default(\r\n scopes=[\r\n \"https://www.googleapis.com/auth/drive\",\r\n \"https://www.googleapis.com/auth/bigquery\",\r\n ]\r\n)\r\n\r\n# Construct a BigQuery client object.\r\nclient = bigquery.Client(credentials=credentials, project=project)\r\n ```\r\n3. Inspect the credentials and client variables. Neither will contain the drive scope provided.\r\nOR\r\n3. Attempt to run a query that references a drive-sourced table and receive the error: `google.api_core.exceptions.Forbidden: 403 Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials.`\r\n\r\nThe user I am authenticating as has viewer permissions for the sheet in question.","author":{"url":"https://github.com/ipear3","@type":"Person","name":"ipear3"},"datePublished":"2021-07-22T16:09:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/805/python-bigquery/issues/805"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6d18e95f-fa55-6a60-871b-38a305c91168 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B274:70DC1:F0ECD:143F81:6A4D7E2F |
| html-safe-nonce | d95c7191dcd48c7c0d022af64f78810ca02384919c7d138289b3ef970945de2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjc0OjcwREMxOkYwRUNEOjE0M0Y4MTo2QTREN0UyRiIsInZpc2l0b3JfaWQiOiI1NjMwNjY4MjUyNDMyMzk5OTE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 05a8f835e6f2462ba706d3be24aec69f1cda36ffdfbc138e6fa24843eef907db |
| hovercard-subject-tag | issue:951671251 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-bigquery/805/issue_layout |
| twitter:image | https://opengraph.githubassets.com/02c98b2f376cc00c31fd4873efb8331c57f0c4127251b9067f3e67dbbd11a075/googleapis/python-bigquery/issues/805 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/02c98b2f376cc00c31fd4873efb8331c57f0c4127251b9067f3e67dbbd11a075/googleapis/python-bigquery/issues/805 |
| og:image:alt | Environment details OS: macOS Big Sur version 11.4 Python version: 3.8.2 pip version: 21.1.3 google-auth version: 1.33.1 Steps to reproduce Confirm application default credentials are an authorized... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ipear3 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6bf61c909482ec3072ef5d7a5a28f2a9d214788c9a44793eca1960048cb05ae |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-bigquery git https://github.com/googleapis/python-bigquery.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992475 |
| octolytics-dimension-repository_nwo | googleapis/python-bigquery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992475 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-bigquery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6702a58b419a792226bd21ef0fb1bcb318bbcaa3 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width