The best way to do this is to take advantage of Service Accounts in GCE. This is a synthetic user account that is usable by anyone in the GCE project. Getting all of the auth lined up can be a little tricky. Here is an example on how to do this in python.
The general outline of what you need to do:
- Start the GCE instance with the task queue OAuth scope.
- Add the GCE service account to the task queue ACL in queue.yaml.
- Acquire an access token. It looks like you can use the computeclient.js credential object to automate the HTTP call to
http://metadata/computeMetadata/v1beta1/instance/service-accounts/default/token
- Use this token in any API calls to the task queue API.
I'm not a Node expert, but searching around I saw found an example of how to connect to the Datastore API from Node using service accounts from GCE. It should be straightforward to adapt this to the task queue API.