GeezerVison is showing github.com — Issue with auth and Docker GCE VM instance · Issue #815 · googleapis/google-cloud-node
Issue with auth and Docker GCE VM instance #815DescriptionFrom an internal bug report:
--- SNIP ---
I tried to use gcloud-node from a Node application running inside of a docker container on a GCE container-optimized VM instance. I expected authentication to work automatically given the README (https://github.com/GoogleCloudPlatform/gcloud-node#on-google-compute-engine) but it didn't work.
What did you expect to happen?
gcloud-node should work inside docker containers on GCE container-optimized VM instances (or the README should be updated to specify cases in which authentication doesn't work automatically on GCE)
--- SNIP --- Activitystephenplusplus commented on Aug 19, 2015 Thanks for sharing! Is there a time stamp when that was filed? Also would be great to get the reporter here for further questions.
All that should be required in GCE is a project ID. If this is managed VMs, authentication is manual. It's been a while since I've dug into this though, perhaps things have changed. I'll try to look into this soon. ryanseys commented on Aug 20, 2015 ContributorAuthor More actions Oh you're right, time of file was Dec 1, 2014 :( This might be obsolete. stephenplusplus commented on Sep 2, 2015 I've learned a few things while digging into this. I used a new GCE vm with all scopes enabled.
We have a bug with how we instantiate Datastore (PR coming soon) fixed
- From GCE, getting a bearer token from the google auth library is successful
- Making requests to the Storage API works
- Making requests to the Datastore API does not work
Here's my app: http://130.211.180.58:8080/
Here's a detailed view of the failed Datastore API request.
var query = dataset.createQuery(["Users"])
dataset.runQuery(query, function() {...});
Which makes the request:
{ method: 'POST',
uri: 'https://www.googleapis.com/datastore/v1beta2/datasets/nth-circlet-705/runQuery',
headers:
{ 'Content-Type': 'application/x-protobuf',
Authorization: 'Bearer ya29....', // same token that works with Storage calls
'User-Agent': 'gcloud-node/0.20.0',
'Content-Length': 13 } }
And responds with:
{ statusCode: 401,
body: undefined,
headers:
{ vary: 'X-Origin, Origin,Accept-Encoding',
'www-authenticate': 'Bearer realm="https://accounts.google.com/", error=invalid_token',
'content-type': 'text/html; charset=UTF-8',
date: 'Wed, 02 Sep 2015 17:50:38 GMT',
expires: 'Wed, 02 Sep 2015 17:50:38 GMT',
'cache-control': 'private, max-age=0',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '1; mode=block',
server: 'GSE',
'alternate-protocol': '443:quic,p=1',
'alt-svc': 'quic=":443"; p="1"; ma=604800',
'accept-ranges': 'none',
connection: 'close' }
// @jgeewax not sure where to go from here. stephenplusplus commented on Nov 23, 2015 theacodes commented on Nov 23, 2015 Should be in production now, verified last week. :) theacodes commented on Nov 23, 2015 Actually, this only applies for MVMs. GCE instances will still need to explicitly request userinfo.email until datastore v1beta3. example stephenplusplus commented on Nov 23, 2015 Sweet, thanks for the info!
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|