Skip to content

chore(api_core): move mtls and client configuration logic to gapic_v1#17750

Open
hebaalazzeh wants to merge 5 commits into
mainfrom
feat/gapic-centralization-api-core-mtls
Open

chore(api_core): move mtls and client configuration logic to gapic_v1#17750
hebaalazzeh wants to merge 5 commits into
mainfrom
feat/gapic-centralization-api-core-mtls

Conversation

@hebaalazzeh

@hebaalazzeh hebaalazzeh commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Introduces client_cert and config_helpers modules containing use_client_cert_effective, get_client_cert_source, and read_environment_variables helpers. Exposes these modules as public in gapic_v1.

The unit tests in test_client_cert.py and test_config_helpers.py are now identical to the generator's original test template test_service.py.j2.

…public helpers

Introduces client_cert and config_helpers modules containing use_client_cert_effective, get_client_cert_source, and read_environment_variables helpers. Exposes these modules as public in gapic_v1.

@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 modules client_cert.py and config_helpers.py to handle client certificate loading and environment variable parsing for mTLS, along with corresponding unit tests and test environment isolation. The review feedback advises against silently falling back to standard TLS when mTLS is requested but no certificate source is found, suggesting instead to raise a ValueError and add a test case to verify this behavior.

Comment thread packages/google-api-core/google/api_core/gapic_v1/client_cert.py Outdated
Comment thread packages/google-api-core/tests/unit/gapic/test_client_cert.py Outdated
@hebaalazzeh
hebaalazzeh marked this pull request as ready for review July 16, 2026 22:03
@hebaalazzeh
hebaalazzeh requested a review from a team as a code owner July 16, 2026 22:03
@hebaalazzeh hebaalazzeh self-assigned this Jul 16, 2026
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