GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #815

New issue
Copy link
New issue
Copy link
Closed
Closed
Issue with auth and Docker GCE VM instance#815
Copy link
Assignees
stephenplusplus

Description

@ryanseys
ryanseys
opened on Aug 19, 2015
Issue body actions

From 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 ---

Activity

Next
  1. stephenplusplus commented on Aug 19, 2015

    @stephenplusplus
    stephenplusplus
    on Aug 19, 2015
    Contributor
    More actions

    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.

  2. ryanseys commented on Aug 20, 2015

    @ryanseys
    ryanseys
    on Aug 20, 2015
    ContributorAuthor
    More actions

    Oh you're right, time of file was Dec 1, 2014 :( This might be obsolete.

  3. stephenplusplus
    self-assigned this
    on Sep 1, 2015
  4. stephenplusplus commented on Sep 2, 2015

    @stephenplusplus
    stephenplusplus
    on Sep 2, 2015
    Contributor
    More actions

    I've learned a few things while digging into this. I used a new GCE vm with all scopes enabled.

    1. We have a bug with how we instantiate Datastore (PR coming soon) fixed
    2. From GCE, getting a bearer token from the google auth library is successful
    3. Making requests to the Storage API works
    4. 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.

  5. stephenplusplus
    removed their assignment
    on Nov 12, 2015
  6. stephenplusplus commented on Nov 23, 2015

    @stephenplusplus
    stephenplusplus
    on Nov 23, 2015
    Contributor
    More actions

    From @jonparrott (thanks!):

    cloud-platform doesn't include userinfo.email. userinfo.email was just recently added to the default scopes for [managed VMs] but it will be a few weeks before it hits prod. In the meantime, add the scopes to your app.yaml like this: https://github.com/GoogleCloudPlatform/nodejs-getting-started/blob/2-structured-data/app.yaml

  7. stephenplusplus
    closed this as completedon Nov 23, 2015
  8. theacodes commented on Nov 23, 2015

    @theacodes
    theacodes
    on Nov 23, 2015
    More actions

    Should be in production now, verified last week. :)

  9. theacodes commented on Nov 23, 2015

    @theacodes
    theacodes
    on Nov 23, 2015
    More actions

    Actually, this only applies for MVMs. GCE instances will still need to explicitly request userinfo.email until datastore v1beta3. example

  10. stephenplusplus commented on Nov 23, 2015

    @stephenplusplus
    stephenplusplus
    on Nov 23, 2015
    Contributor
    More actions

    Sweet, thanks for the info!

  11. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  12. sofisl
    added 2 commits that reference this issue on Nov 10, 2022

    chore(deps): update dependency uuid to v9 (#815)

    5d45801

    chore(deps): update dependency @types/node to v14 (#815)

    96368a1
  13. sofisl
    added 2 commits that reference this issue on Jan 17, 2023

    build: use gapic-generator-typescript v1.0.7. (#815)

    60ff5dd

    build(node): update deps used during postprocessing (#1243) (#815)

    a6e4c2f
  14. 4 remaining items

  15. sofisl
    added 6 commits that reference this issue on Jan 27, 2026

    chore(deps): update dependency python to v3.10.4 (#1386) (#815)

    2f0833e

    chore(deps): update dependency python to v3.10.4 (#1386) (#815)

    6f338be

    chore(deps): update dependency python to v3.10.4 (#1386) (#815)

    6e68bfe

    chore(deps): update dependency python to v3.10.4 (#1386) (#815)

    560e696

    chore(deps): update dependency python to v3.10.4 (#1386) (#815)

    52ade85

    docs: update product title (#815)

    2ff8933
  16. sofisl
    added 2 commits that reference this issue on Feb 24, 2026

    chore: release 3.0.0 (#815)

    338e168

    tests: cleanup mock server tests (#815)

    d7e7225
  17. GautamSharda
    added a commit that references this issue on Mar 5, 2026

    chore(deps): update dependency @google-cloud/pubsub to v2 (#815)

    ae95e28
  18. sofisl
    added a commit that references this issue on Mar 5, 2026

    feat(auth): use gtoken from internal class instead of dependency (#815)

    4f9c54f
  19. GautamSharda
    added a commit that references this issue on Mar 11, 2026

    fix(docs): snippets are now replaced in jsdoc comments (#815)

    f91d935
  20. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    docs: updated code of conduct (includes update to actions) (#815)

    79f8097

    docs: updated code of conduct (includes update to actions) (#815)

    e3cc097
  21. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    docs: updated code of conduct (includes update to actions) (#815)

    d4b1a93
  22. thiyaguk09
    added a commit that references this issue on May 5, 2026

    docs: updated code of conduct (includes update to actions) (googleapi…

    014c512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.