Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/google/auth/environment_vars.py: 100%

16 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-12-08 06:45 +0000

1# Copyright 2016 Google LLC 

2# 

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 

18PROJECT = "GOOGLE_CLOUD_PROJECT" 

19"""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 

25LEGACY_PROJECT = "GCLOUD_PROJECT" 

26"""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 

32GOOGLE_CLOUD_QUOTA_PROJECT = "GOOGLE_CLOUD_QUOTA_PROJECT" 

33"""Environment variable defining the project to be used for 

34quota and billing.""" 

35 

36CREDENTIALS = "GOOGLE_APPLICATION_CREDENTIALS" 

37"""Environment variable defining the location of Google application default 

38credentials.""" 

39 

40# The environment variable name which can replace ~/.config if set. 

41CLOUD_SDK_CONFIG_DIR = "CLOUDSDK_CONFIG" 

42"""Environment variable defines the location of Google Cloud SDK's config 

43files.""" 

44 

45# These two variables allow for customization of the addresses used when 

46# contacting the GCE metadata service. 

47GCE_METADATA_HOST = "GCE_METADATA_HOST" 

48"""Environment variable providing an alternate hostname or host:port to be 

49used for GCE metadata requests. 

50 

51This environment variable was originally named GCE_METADATA_ROOT. The system will 

52check this environemnt variable first; should there be no value present, 

53the system will fall back to the old variable. 

54""" 

55 

56GCE_METADATA_ROOT = "GCE_METADATA_ROOT" 

57"""Old environment variable for GCE_METADATA_HOST.""" 

58 

59GCE_METADATA_IP = "GCE_METADATA_IP" 

60"""Environment variable providing an alternate ip:port to be used for ip-only 

61GCE metadata requests.""" 

62 

63GOOGLE_API_USE_CLIENT_CERTIFICATE = "GOOGLE_API_USE_CLIENT_CERTIFICATE" 

64"""Environment variable controlling whether to use client certificate or not. 

65 

66The default value is false. Users have to explicitly set this value to true 

67in order to use client certificate to establish a mutual TLS channel.""" 

68 

69LEGACY_APPENGINE_RUNTIME = "APPENGINE_RUNTIME" 

70"""Gen1 environment variable defining the App Engine Runtime. 

71 

72Used to distinguish between GAE gen1 and GAE gen2+. 

73""" 

74 

75# AWS environment variables used with AWS workload identity pools to retrieve 

76# AWS security credentials and the AWS region needed to create a serialized 

77# signed requests to the AWS STS GetCalledIdentity API that can be exchanged 

78# for a Google access tokens via the GCP STS endpoint. 

79# When not available the AWS metadata server is used to retrieve these values. 

80AWS_ACCESS_KEY_ID = "AWS_ACCESS_KEY_ID" 

81AWS_SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY" 

82AWS_SESSION_TOKEN = "AWS_SESSION_TOKEN" 

83AWS_REGION = "AWS_REGION" 

84AWS_DEFAULT_REGION = "AWS_DEFAULT_REGION"