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

Destination BigQuery: Check should fail if we have insufficient permissions #16992

Closed
edgao opened this issue Sep 21, 2022 · 7 comments · Fixed by #18554
Closed

Destination BigQuery: Check should fail if we have insufficient permissions #16992

edgao opened this issue Sep 21, 2022 · 7 comments · Fixed by #18554
Assignees
Labels
needs-triage team/destinations Destinations team's backlog type/bug Something isn't working

Comments

@edgao
Copy link
Contributor

edgao commented Sep 21, 2022

from https://github.com/airbytehq/oncall/issues/640

destinatoin-bigquery failed with:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
POST https://www.googleapis.com/bigquery/v2/projects/<redacted>
{
  "code" : 403,
  "errors" : [ {
    "domain" : "global",
    "message" : "Access Denied: Dataset <redacted>: Permission bigquery.tables.create denied on dataset <redacted> (or it may not exist).",
    "reason" : "accessDenied"
  } ],
  "message" : "Access Denied: Dataset <redacted>: Permission bigquery.tables.create denied on dataset <redacted> (or it may not exist).",
  "status" : "PERMISSION_DENIED"
}
        at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146)
        at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:118)
        at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:37)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:428)
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1111)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:514)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:455)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:565)
        at com.google.cloud.bigquery.spi.v2.HttpBigQueryRpc.create(HttpBigQueryRpc.java:185)
        ... 16 more

Normalization also failed:

Database Error
  Access Denied: Project <redacted>: User does not have bigquery.datasets.create permission in project <redacted>.,retryable=<null>,timestamp=1663764411243
@grishick
Copy link
Contributor

Hey team! Please add your planning poker estimate with Zenhub @edgao @ryankfu @suhomud @etsybaev

@etsybaev etsybaev self-assigned this Oct 19, 2022
@edgao
Copy link
Contributor Author

edgao commented Oct 25, 2022

related: check should probably fail if we don't have permissions to create datasets https://github.com/airbytehq/oncall/issues/911, or if the user has gcs staging configured but we can't read from the bucket #17327 (comment)

would also be good to check that check checks for being able to write to the GCS bucket, but I'm not aware of this causing false positives.

@killthekitten
Copy link
Contributor

killthekitten commented Oct 28, 2022

@edgao not sure if in case of #17327 it was write or read permissions. I would assume read, because the exception happens during copyIntoTmpTableFromStage in my case:

2022-10-27 20:27:13 �[43mdestination�[0m > 	at io.airbyte.integrations.destination.bigquery.BigQueryGcsOperations.copyIntoTmpTableFromStage(BigQueryGcsOperations.java:124) ~[io.airbyte.airbyte-integrations.connectors-destination-bigquery-0.40.3.jar:?]

@edgao
Copy link
Contributor Author

edgao commented Oct 28, 2022

whoops, good callout - I edited my comment to reflect that.

@etsybaev
Copy link
Contributor

etsybaev commented Nov 7, 2022

Blocked. Need to wait for this PR first #18560

@akashkulk
Copy link
Contributor

@etsybaev I broke the PR into smaller PRs to unblock. I merged this PR : #18989
Which should unblock you

@killthekitten
Copy link
Contributor

Hey @etsybaev, thanks for merging the #18554! I think you shouldn't have closed this issue though, as your PR doesn't fully resolve the issue with read/write permissions on the GCS bucket as mentioned by @edgao and me in #17327 (check this comment).

Do you both think we could re-open this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage team/destinations Destinations team's backlog type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants