Skip to content

auth-2.0.0

Choose a tag to compare

@talkiq-ops talkiq-ops released this 01 Feb 01:28
· 1140 commits to master since this release

Breaking Changes

The arguments to the Token constructor have been changed -- project has been removed and service_file is now optional. See below for more information.

Features

We now support falling back to the GCE metadata service for authentication. This enables us to use this library in GAE, GCE, GKE, etc without provisioning a service account and providing a path to that credential file.

Additionally, this mode has been integrated with Google's new recommendations around authentication, which allowed us to make the service_file value completely optional.

We now attempt to authenticate in the following way:

  • try the credential file provided by the service_file argument
  • try any credentials found in the env (try ${GOOGLE_APPLICATION_CREDENTIALS} then ${CLOUDSDK_CONFIG}/application_default_credentials.json)
  • try the GCE metadata service

Note that as of release 1.2.0 the supported credential file types includes:

  • service accounts
  • application default credentials
  • legacy credentials
  • authorized user creds

Minor

A new method has been added: Token.get_project() which returns the authenticated project, if if can be determined.