Skip to content

feat(api-core): centralize MTLS fallback functions in gapic_v1 config#17817

Open
hebaalazzeh wants to merge 2 commits into
mainfrom
feat/api-core-centralize-mtls
Open

feat(api-core): centralize MTLS fallback functions in gapic_v1 config#17817
hebaalazzeh wants to merge 2 commits into
mainfrom
feat/api-core-centralize-mtls

Conversation

@hebaalazzeh

Copy link
Copy Markdown
Contributor

This PR centralizes the MTLS configuration fallback functions (use_client_cert_effective, get_client_cert_source, and read_environment_variables) directly into google.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 into api-core, we can remove the fallback implementations that are currently being generated into _compat.py by the GAPIC generator.

This provides the actual implementations that were missing from the earlier attempt in PR #17750.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
hebaalazzeh marked this pull request as ready for review July 21, 2026 21:58
@hebaalazzeh
hebaalazzeh requested a review from a team as a code owner July 21, 2026 21:58
@hebaalazzeh
hebaalazzeh force-pushed the feat/api-core-centralize-mtls branch from 5cc6350 to 2c0b579 Compare July 21, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant