-
Notifications
You must be signed in to change notification settings - Fork 604
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
how to authenticate on a google compute instance? #1169
Comments
Is it possible the GCE instance wasn't created with the proper scopes granted? Reference doc: https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.29.0/guides/authentication |
I used the console gui to choose the scope parameters, selecting "full api access"
so it looks to be set right.... |
Okay, thanks for checking. I'll try to reproduce. |
the problem is still occuring, but in case it helps, here's my full command-line for creating the GCE instance: FYI I see that there was an update to gcloud gui console, so now instead of explicitly naming the scope account it uses "default".
Also, ironically, I can actually disable using the .json key on my windows dev machine and authentication with the datastore works, I assume because I installed the google-cloud-sdk locally. also FYI this is my gcloud-node initialization code, In case it matters if I initialize datastore explicitly
|
Okay, I've traced down the problem. Datastore requires the |
Related: #815 (comment) |
fyi i tested this, and as per the following gcloud command line args:
|
Yes, that's correct. Thanks for bringing this up so we can hopefully avoid the confusion the next time. |
Co-authored-by: Anthonios Partheniou <partheniou@google.com> Source-Link: googleapis/synthtool@df7fc1e Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:6245a5be4c0406d9b2f04f380d8b88ffe4655df3cdbb57626f8913e8d620f4dd
From the docs It says that no authentication is needed if running on a google compute instance.
however when I try to access datastore, I get a *_401 unauthorized *_error.
there isn't any error being output, so the best I can do is a blurb i get output from a promise-wrapped callback:
in there I see "invalid_token" also... no other really meaningful info is reported unfortunately.
Is there something I'm missing? in my local dev environment I pass a key in .json format to authenticate and that works great (and works on google compute), but I don't really want to put a read/write key on my production server in case it gets hacked.
The text was updated successfully, but these errors were encountered: