Skip to content

Commit 417306e

Browse files
committed
Adding a "Using GCE" section to auth troubleshooting.
1 parent 2c5df50 commit 417306e

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/gcloud-auth.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,3 +252,42 @@ you need a `Google Developers Service Account`_.
252252

253253
.. _Google Developers Console: https://console.developers.google.com/project
254254
.. _Google Developers Service Account: https://developers.google.com/accounts/docs/OAuth2ServiceAccount
255+
256+
Using Google Compute Engine
257+
---------------------------
258+
259+
If your code is running on Google Compute Engine,
260+
using the inferred Google `Application Default Credentials`_
261+
will be sufficient for retrieving credentials.
262+
263+
However, by default your credentials may not grant you
264+
access to the services you intend to use.
265+
Be sure when you `set up the GCE instance`_,
266+
you add the correct scopes for the APIs you want to access:
267+
268+
* **All APIs**
269+
270+
* ``https://www.googleapis.com/auth/cloud-platform``
271+
* ``https://www.googleapis.com/auth/cloud-platform.read-only``
272+
273+
* **BigQuery**
274+
275+
* ``https://www.googleapis.com/auth/bigquery``
276+
* ``https://www.googleapis.com/auth/bigquery.insertdata``
277+
278+
* **Datastore**
279+
280+
* ``https://www.googleapis.com/auth/datastore``
281+
* ``https://www.googleapis.com/auth/userinfo.email``
282+
283+
* **Pub/Sub**
284+
285+
* ``https://www.googleapis.com/auth/pubsub``
286+
287+
* **Storage**
288+
289+
* ``https://www.googleapis.com/auth/devstorage.full_control``
290+
* ``https://www.googleapis.com/auth/devstorage.read_only``
291+
* ``https://www.googleapis.com/auth/devstorage.read_write``
292+
293+
.. _set up the GCE instance: https://cloud.google.com/compute/docs/authentication#using

0 commit comments

Comments
 (0)