feat(api-core): centralize MTLS fallback functions in gapic_v1 config#17817
Open
hebaalazzeh wants to merge 2 commits into
Open
feat(api-core): centralize MTLS fallback functions in gapic_v1 config#17817hebaalazzeh wants to merge 2 commits into
hebaalazzeh wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces helper functions to manage mutual TLS (mTLS) configuration and environment variables, specifically use_client_cert_effective, get_client_cert_source, and read_environment_variables. It also adds comprehensive unit tests to verify their behavior under various conditions. There are no review comments, and I have no feedback to provide.
hebaalazzeh
marked this pull request as ready for review
July 21, 2026 21:58
hebaalazzeh
force-pushed
the
feat/api-core-centralize-mtls
branch
from
July 21, 2026 22:09
5cc6350 to
2c0b579
Compare
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.
This PR centralizes the MTLS configuration fallback functions (
use_client_cert_effective,get_client_cert_source, andread_environment_variables) directly intogoogle.api_core.gapic_v1.config.PR #17799 successfully centralized the endpoint routing functions into
universe.py, but it did not include these MTLS functions. By moving these intoapi-core, we can remove the fallback implementations that are currently being generated into_compat.pyby the GAPIC generator.This provides the actual implementations that were missing from the earlier attempt in PR #17750.