-
Notifications
You must be signed in to change notification settings - Fork 595
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
Authentication without using service account key for Datastore not working on GCE #1020
Comments
Update: This definitely works with the service account key file, but the automagical option is broken for me. |
Thanks for reporting. @jgeewax @jonparrott should an automagical token work with Datastore requests? |
Hey @richardkazuomiller , when you created the GCE machine, did you give it access to Datastore? In the UI you have to (I think) explicitly say "this instance can talk to Datastore auto-magically". |
(@stephenplusplus: If this is the issue, we should add this to the docs on gcloud-common) |
@stephenplusplus to clarify, yes, the token from the metadata server should work for accessing everything. Provided, of course, that the instance was created with access to the appropriate scopes. @richardkazuomiller can you tell us the scopes on your machine? You can do |
The output is
Is my understanding that |
I seem to recall the |
Shouldn't the |
It's also possible that |
Hmm, OK I'll try that but if that's the case I feel like checking the |
For datastore, it's very temporary. The next version of the API will not On Mon, Dec 14, 2015 at 12:28 PM Ricky Miller [email protected]
|
@richardkazuomiller did this do the trick? |
@stephenplusplus Yes, I tried adding the permissions and was able to query Datastore without the key, but since I've already set up my production environment I think I'll be using the service key authentication method for now. |
That makes sense. The docs try to provide some guidance while setting up an instance (https://googlecloudplatform.github.io/gcloud-node/#/authentication), but it's not very helpful if you already have one. I'll close this out, but if you think we can do something better, let us know. |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc-fresh](https://togithub.com/googleapis/jsdoc-fresh) | [`^1.0.2` -> `^2.0.0`](https://renovatebot.com/diffs/npm/jsdoc-fresh/1.1.1/2.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/compatibility-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc-fresh/2.0.0/confidence-slim/1.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/jsdoc-fresh</summary> ### [`v2.0.0`](https://togithub.com/googleapis/jsdoc-fresh/blob/HEAD/CHANGELOG.md#​200-httpsgithubcomgoogleapisjsdoc-freshcomparev111v200-2022-05-18) [Compare Source](https://togithub.com/googleapis/jsdoc-fresh/compare/v1.1.1...v2.0.0) ##### ⚠ BREAKING CHANGES - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ##### Build System - update library to use Node 12 ([#​108](https://togithub.com/googleapis/jsdoc-fresh/issues/108)) ([e61c223](https://togithub.com/googleapis/jsdoc-fresh/commit/e61c2238db8900e339e5fe7fb8aea09642290182)) ##### [1.1.1](https://www.github.com/googleapis/jsdoc-fresh/compare/v1.1.0...v1.1.1) (2021-08-11) ##### Bug Fixes - **build:** migrate to using main branch ([#​83](https://www.togithub.com/googleapis/jsdoc-fresh/issues/83)) ([9474adb](https://www.github.com/googleapis/jsdoc-fresh/commit/9474adbf0d559d319ff207397ba2be6b557999ac)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-vision).
I have a VM on Google Compute Engine that I'm trying to use to access Datastore but the server rejects the requests. I'm able to fiddle with the datastore on the control panel, so this should be working from the VM but I get
ApiError: Unauthorized
when trying to access it with gcloud-node. I'm guessing it would work if I used the key file but this issue probably needs fixing.The text was updated successfully, but these errors were encountered: