Hello George,
Thank you for the response. The scope of the VM seems to be sufficient:$ gcloud compute instances describe my-instance[..]serviceAccounts:
scopes:The same credentials work correctly with the Storage API but fail with the TaskQueue API.Here is the queue definition:# queue.yamlqueue:- name: test-queuemode: pullacl:
- user_email: 118816049693-compute@developer.gserviceaccount.com- writer_email: 118816049693-compute@developer.gserviceaccount.com
Hello Jarda,Is it possible to try it from a different instance where you manually enable all the needed scopes including the task-queue scope?Looking forward to your reply.Sincerely,George
On Wednesday, April 27, 2016 at 2:56:23 AM UTC-4, Jaroslav Grešula wrote:
Hello George,
Thank you for the response. The scope of the VM seems to be sufficient:$ gcloud compute instances describe my-instance[..]serviceAccounts:
scopes:The same credentials work correctly with the Storage API but fail with the TaskQueue API.Here is the queue definition:# queue.yamlqueue:- name: test-queuemode: pullacl:
- user_email: 1188160496...@developer.gserviceaccount.com- writer_email: 1188160496...@developer.gserviceaccount.com
Do you have any other idea what could be wrong or what should I check?Thank you,Jarda
On Wednesday, April 27, 2016 at 1:48:10 AM UTC+2, George wrote:Hello Jarda,Please make sure that the VM instance has the TaskQueue API scope enabled. You can verify the scopes by running the following command:gcloud compute instances describe AFFECTED_INSTANCE_NAMEUnder "scopes", the following should be present : "https://www.googleapis.com/auth/taskqueue". You can have more information on setting up an instance scope, in this Help Center article.I hope this helps.Sincerely,George
On Tuesday, April 26, 2016 at 1:17:38 PM UTC-4, Jaroslav Grešula wrote:Hello,I run some Python code on Google Compute Engine. The code uses the TaskQueue API and the queue is configured to allow writes from the GCE default service account.In my code I create credentials via GoogleCredentials.get_application_default(). When I call the TaskQueue API, it fails with HTTP 403 "Insufficient Permission".When I set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the service account key file, the same code authorizes successfully.If I understand correctly, GOOGLE_APPLICATION_CREDENTIALS shouldn't be needed if the code runs on GCE. Do you have any idea why it doesn't work without GOOGLE_APPLICATION_CREDENTIALS? What should I check?Thank you,Jarda
--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/aa9a070c-92ce-4167-b247-8457c006ae14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Jarda,
Is it possible to try it from a different instance where you manually enable all the needed scopes including the task-queue scope?Looking forward to your reply.Sincerely,
George
On Wednesday, April 27, 2016 at 2:56:23 AM UTC-4, Jaroslav Grešula wrote:
Hello George,
Thank you for the response. The scope of the VM seems to be sufficient:$ gcloud compute instances describe my-instance[..]serviceAccounts:
scopes:The same credentials work correctly with the Storage API but fail with the TaskQueue API.Here is the queue definition:# queue.yamlqueue:- name: test-queuemode: pullacl:
- user_email: 1188160496...@developer.gserviceaccount.com- writer_email: 1188160496...@developer.gserviceaccount.com
What permissions does 1188160496...@developer.gserviceaccount.com have on the project?