oauth-default

command
v0.0.0-...-8c1f7d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

Introduction

In this example we authenticate against the Google AI Platform API using the application-default credentials. This is the most common and simple way to authenticate against Google APIs including the AI platform.

Running locally

If you want to use your own Google Cloud account, authenticate using the gcloud auth application-default login. If you want to assume the role of a service account, use gcloud auth activate-service-account.

Running in the cloud

When deploying to Compute Engine, Kubernetes Engine, App Engine, or Cloud Function you'll need to specify a service account for the application to run as, which is surfaced as the application-default context.

Creating a service account

Create a service account using the IAM and admin section of the Google Cloud console. This service account needs to have the following roles:

  • Project: viewer
  • Storage Object: Admin
  • ML Engine: Admin

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL