feat: honor NO_GCE_CHECK environment variable#1610
Merged
chalmerlowe merged 10 commits intogoogleapis:mainfrom Jan 9, 2026
Merged
feat: honor NO_GCE_CHECK environment variable#1610chalmerlowe merged 10 commits intogoogleapis:mainfrom
NO_GCE_CHECK environment variable#1610chalmerlowe merged 10 commits intogoogleapis:mainfrom
Conversation
|
Hey folks / maintainers, just to bump this up a bit. Would it be possible to merge / release this? What else do we need to do here - please let us know. |
daniel-sanche
approved these changes
Jan 9, 2026
daniel-sanche
added a commit
that referenced
this pull request
Jan 26, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v1.0.1 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209 <details><summary>google-auth: 2.48.0</summary> ## [2.48.0](v2.47.0...v2.48.0) (2026-01-21) ### Features * honor `NO_GCE_CHECK` environment variable (#1610) ([383c982](383c9827)) * add configurable GCE Metadata Server retries (#1488) ([454b441](454b441b)) * add cryptography as required dependency (#1929) ([52558ae](52558ae2)) * Support the mTLS IAM domain for Certificate based Access (#1938) ([8dcf91a](8dcf91a1)) ### Bug Fixes * resolve circular imports (#1942) ([25c1b06](25c1b064)) * Use `user_verification=preferred` for ReAuth WebAuthn challenge (#1798) ([3f88a24](3f88a240)) * removes `content-header` from AWS IMDS get request (#1934) ([97bfea9](97bfea9e)) * detect correct auth when ADC env var is set but empty (#1374) ([bfc07e1](bfc07e10)) * replace deprecated utcfromtimestamp (#1799) ([e431f20](e431f20c)) </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently,
google.auth.default()always attempts to authenticate using the Google Compute Engine (GCE) metadata service as a fallback. There is no easy way to prevent this behavior, leading to unnecessary delays and unhelpful exceptions, particularly in cases where GCE-based authentication is pointless or undesired.This pull request introduces a
NO_GCE_CHECKenvironment variable, allowing users to explicitly skip GCE metadata service authentication. This implementation mirrorsNO_GCE_CHECKin googleapis/google-auth-library-java:Note
Other clouds also provide similar environment variables, such as
AWS_EC2_METADATA_DISABLEDon AWS.This change is also tangentially related to the following pull requests: