Auth samples for Endpoints. by liminw · Pull Request #431 · GoogleCloudPlatform/python-docs-samples

@liminw

Added three samples:

  1. Use App Engine default service account client (without key file).
  2. Use non-default service account client (without key file).
  3. Use Google ID token client (without key file)

@googlebot googlebot added the cla: yes

This human has signed the Contributor License Agreement.

label

Jul 28, 2016

theacodes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't with key file implied? Is there any way to do it without a key file?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the three auth samples added here are to show how to authenticate with endpoints without a key file.

@theacodes

Finished a first pass. Let me know when you're ready for another pass.

@liminw

Added three samples:
1. Use App Engine default service account client (without key file).
2. Use non-default service account client (without key file).
3. Use Google ID token client (without key file)

theacodes

six==1.10.0
pyyaml==3.11
requests==2.10.0
google-api-python-client

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please pin the version, I think 1.5.1 is the latest.

@theacodes

Code looks mostly good, two things I would like to see in the README before we merge this:

  1. update appcfg.py usage to gcloud app.
  2. Make it very clear that these are App Engine standard applications.

@liminw

theacodes

4. Upload your application to Google App Engine by invoking the following command.

appcfg.py -A <YOUR-CLIENT-PROJECT-ID> -V v1 update .
gcloud app deploy app.yaml --project=<YOUR-CLIENT-PROJECT-ID> --promote

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither --project or --promote are needed for gcloud app

@liminw

@theacodes