apache_beam.internal.gcp.auth module

Dataflow credentials and authentication.

apache_beam.internal.gcp.auth.set_running_in_gce(worker_executing_project)[source]

For internal use only; no backwards-compatibility guarantees.

Informs the authentication library that we are running in GCE.

When we are running in GCE, we have the option of using the VM metadata credentials for authentication to Google services.

Parameters:worker_executing_project – The project running the workflow. This information comes from worker startup information.
apache_beam.internal.gcp.auth.get_service_credentials()[source]

For internal use only; no backwards-compatibility guarantees.

Get credentials to access Google services.

Returns:A oauth2client.client.OAuth2Credentials object or None if credentials not found. Returned object is thread-safe.