feat(api_core): add mtls and client configuration logic to gapic_v1#17750
feat(api_core): add mtls and client configuration logic to gapic_v1#17750hebaalazzeh wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces helper modules client_cert and config_helpers under google/api_core/gapic_v1 to manage client certificate handling, mTLS authentication, and parsing of environment variables such as GOOGLE_API_USE_CLIENT_CERTIFICATE, GOOGLE_API_USE_MTLS_ENDPOINT, and GOOGLE_CLOUD_UNIVERSE_DOMAIN. It also includes comprehensive unit tests and a test fixture to isolate unit tests from workstation mTLS environments. I have no feedback to provide as there are no review comments.
|
The diff for this seems to include https://github.com/googleapis/google-cloud-python/pull/17745/changes, so I'm going to look at that one first |
e237507 to
fcd2207
Compare
fcd2207 to
0314206
Compare
…effective, get_client_cert_source, and read_environment_variables
a20bbfc to
58a8230
Compare
Introduces
client_utilscontaininguse_client_cert_effective,get_client_cert_source, andread_environment_variableshelpers. Exposes this module as public ingapic_v1.The unit tests in test_client_utils.py are now identical to the generator's original test template
test_service.py.j2.Specifically, the following tests verify the helpers: