google-auth-library-python
google-auth-library-python copied to clipboard
Google Auth Python Library
If users want to set a custom metadata server endpoint, you have to use *both* [GCE_METADATA_IP](https://github.com/googleapis/google-auth-library-python/blob/main/google/auth/environment_vars.py#L59) and [GCE_METADATA_HOST](https://github.com/googleapis/google-auth-library-python/blob/main/google/auth/environment_vars.py#L47). The IP based env var is used [here](https://github.com/googleapis/google-auth-library-python/blob/main/google/auth/compute_engine/_metadata.py#L129) to ping the address...
Detailed description is here https://issuetracker.google.com/issues/328089077
Thanks for stopping by to let us know something could be better! **PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/)...
- chore: Use stdlib unittest.mock instead of separate mock library. Resolves https://github.com/googleapis/google-auth-library-python/issues/1055 - Fix mypy error.
This PR aims to replicate the functionality of the Nodejs library implemented here: https://github.com/googleapis/gcp-metadata/pull/275
When an application is run on Google Cloud Platform there are usually a set of default credentials populated in `GOOGLE_APPLICATION_CREDENTIALS`. However, this is only a token and does not contain...
The `rsa` library is slower and not as well-maintained as the `cryptography` library. Now that we require the `cryptography` library, drop the hard requirement on the `rsa` library. Fixes: #941
Fixes #1165 This features allows using access token in the sdk without having any of the GCP related credentials. Example Usage: - Generate the token using CLI `gcloud auth print-access-token...
Simplifying troubleshooting by capturing last seen exception to set it as the direct cause of the `exceptions.TransportError`
Is it possible to save a reference to the last exception thrown at: https://github.com/googleapis/google-auth-library-python/blob/0afc61a3a9c3d5035c913ad4a7568e8a888e2ec9/google/auth/compute_engine/_metadata.py#L204 and use it to build a more meaningful error message? at: https://github.com/googleapis/google-auth-library-python/blob/0afc61a3a9c3d5035c913ad4a7568e8a888e2ec9/google/auth/compute_engine/_metadata.py#L217-L220 that way the underlying...