blob: 46a8926646b93e10908adf06cafad699a3cfb66f [file] [log] [blame]
C.J. Collier37141e42020-02-13 13:49:49 -08001# Copyright 2016 Google LLC
Jon Wayne Parrottaadb3de2016-10-19 09:34:05 -07002#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""Environment variables used by :mod:`google.auth`."""
16
17
Bu Sun Kim9eec0912019-10-21 17:04:21 -070018PROJECT = "GOOGLE_CLOUD_PROJECT"
Jon Wayne Parrottaadb3de2016-10-19 09:34:05 -070019"""Environment variable defining default project.
20
21This used by :func:`google.auth.default` to explicitly set a project ID. This
22environment variable is also used by the Google Cloud Python Library.
23"""
24
Bu Sun Kim9eec0912019-10-21 17:04:21 -070025LEGACY_PROJECT = "GCLOUD_PROJECT"
Jon Wayne Parrottce37cba2016-11-07 16:41:42 -080026"""Previously used environment variable defining the default project.
27
28This environment variable is used instead of the current one in some
29situations (such as Google App Engine).
30"""
31
Bu Sun Kim9eec0912019-10-21 17:04:21 -070032CREDENTIALS = "GOOGLE_APPLICATION_CREDENTIALS"
Jon Wayne Parrottaadb3de2016-10-19 09:34:05 -070033"""Environment variable defining the location of Google application default
34credentials."""
35
36# The environment variable name which can replace ~/.config if set.
Bu Sun Kim9eec0912019-10-21 17:04:21 -070037CLOUD_SDK_CONFIG_DIR = "CLOUDSDK_CONFIG"
Jon Wayne Parrottaadb3de2016-10-19 09:34:05 -070038"""Environment variable defines the location of Google Cloud SDK's config
39files."""
Craig Citrob33b8022017-03-24 15:36:04 -070040
41# These two variables allow for customization of the addresses used when
42# contacting the GCE metadata service.
chenyumic8ffb4d32020-06-04 10:14:05 -070043GCE_METADATA_HOST = "GCE_METADATA_HOST"
Bu Sun Kim9eec0912019-10-21 17:04:21 -070044GCE_METADATA_ROOT = "GCE_METADATA_ROOT"
Craig Citrob33b8022017-03-24 15:36:04 -070045"""Environment variable providing an alternate hostname or host:port to be
chenyumic8ffb4d32020-06-04 10:14:05 -070046used for GCE metadata requests.
47
48This environment variable is originally named GCE_METADATA_ROOT. System will
49check the new variable first; should there be no value present,
50the system falls back to the old variable.
51"""
Craig Citrob33b8022017-03-24 15:36:04 -070052
Bu Sun Kim9eec0912019-10-21 17:04:21 -070053GCE_METADATA_IP = "GCE_METADATA_IP"
Craig Citrob33b8022017-03-24 15:36:04 -070054"""Environment variable providing an alternate ip:port to be used for ip-only
55GCE metadata requests."""
arithmetic1728c0c995f2020-08-27 14:05:30 -070056
57GOOGLE_API_USE_CLIENT_CERTIFICATE = "GOOGLE_API_USE_CLIENT_CERTIFICATE"
58"""Environment variable controlling whether to use client certificate or not.
59
60The default value is false. Users have to explicitly set this value to true
61in order to use client certificate to establish a mutual TLS channel."""