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

http_403 error for test #5 #190

Open
eteitelbaum opened this issue Mar 30, 2022 · 4 comments
Open

http_403 error for test #5 #190

eteitelbaum opened this issue Mar 30, 2022 · 4 comments

Comments

@eteitelbaum
Copy link

Hi Mark,

When I run test number 5 (Cloud Scheduler -- R script), I get an http_403 error (user not authorized to perform this action). Any idea what might be causing this? I am running the development version, which I just installed now.

Here is the exact text for the test and error message:

-- Testing scheduling R script deployments via cr_deploy_r(schedule = '* * * * *') --

i 2022-03-30 08:30:56 > Deploy R script cr_rscript_2022031648643456083056 to Cloud Build
i 2022-03-30 08:30:56 > Scheduling R script on cron schedule: * * * * *
i 2022-03-30 08:30:56 > Creating PubSub topic: cr_rscript_2022031648643456083056-topic
√ projects/recession-charts/topics/cr_rscript_2022031648643456083056-topic succesfully created
i 2022-03-30 08:31:01 > Request Status Code: 403
Error: http_403 User not authorized to perform this action.

Thanks for your help!

@MarkEdmondson1234
Copy link
Owner

MarkEdmondson1234 commented Mar 30, 2022

Thanks - would you mind reporting what IAM roles the service account you created in setup has in the web console? By default called googlecloudrunner@{project-id}.iam.gserviceaccount.com

Should see it on this URL: https://console.cloud.google.com/iam-admin/iam

Is it different from this?

image

@eteitelbaum
Copy link
Author

Yes, it is different. I only see a subset of those roles:

iam-roles

Did I miss a step during the setup or something?

@MarkEdmondson1234
Copy link
Owner

MarkEdmondson1234 commented Mar 30, 2022

Its probably my fault with the permissions code. Would you mind running the test to fail again, with options(googleAuthR.verbose=2) to give more logging info? That can narrow down which service is missing. As it stands now I suspect maybe its the general Viewer role that is necessary for viewing logs.

@eteitelbaum
Copy link
Author

OK, sure. Here is what I see when I run it that way:

-- Testing scheduling R script deployments via cr_deploy_r(schedule = '* * * * *') --

i 2022-03-30 11:14:53 > Deploy R script cr_rscript_2022031648653293111453 to Cloud Build
i 2022-03-30 11:14:53 > Scheduling R script on cron schedule: * * * * *
i 2022-03-30 11:14:53 > Creating PubSub topic: cr_rscript_2022031648653293111453-topic
i 2022-03-30 11:14:53 > Token exists.
i 2022-03-30 11:14:53 > Request: https://pubsub.googleapis.com/v1/projects/recession-charts/topics/cr_rscript_2022031648653293111453-topic/
i 2022-03-30 11:14:53 > Body JSON parsed to: {}
√ projects/recession-charts/topics/cr_rscript_2022031648653293111453-topic succesfully created
i 2022-03-30 11:14:57 > data json: "projects/recession-charts/topics/cr_rscript_2022031648653293111453-topic"
i 2022-03-30 11:14:57 > data encoded to: InByb2plY3RzL3JlY2Vzc2lvbi1jaGFydHMvdG9waWNzL2NyX3JzY3JpcHRfMjAyMjAzMTY0ODY1MzI5MzExMTQ1My10b3BpYyI=
i 2022-03-30 11:14:57 > Token exists.
i 2022-03-30 11:14:57 > Request: https://pubsub.googleapis.com/v1/projects/recession-charts/topics/cr_rscript_2022031648653293111453-topic/
i 2022-03-30 11:14:57 > Request Status Code: 403
i 2022-03-30 11:14:57 > API error: User not authorized to perform this action.
i 2022-03-30 11:14:57 > No retry attempted: User not authorized to perform this action.
i 2022-03-30 11:14:57 > Custom error 403 User not authorized to perform this action.
Error in abort_http():
! http_403 User not authorized to perform this action.

Does that help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants