feat: Enable mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, if the MWID/X.509 cert sources detected by agrawalradhika-cell · Pull Request #1848 · googleapis/google-auth-library-python

@agrawalradhika-cell agrawalradhika-cell changed the title feat: Autoupdate the GOOGLE_API_USE_CLIENT_CERTIFICATE flag to true if not set, if the MWID/X.509 cert sources detected feat: Enable mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, if the MWID/X.509 cert sources detected

Oct 28, 2025

sai-sunder-s

daniel-sanche

daniel-sanche

sai-sunder-s

nbayati

…f not set, if the MWID/X.509 cert sources detected

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
…or updates to docsting and indentation

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
…he json and return the exact value set by user, and not handling the case when user is setting value to an unsupported value

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
…thod to catch exceptions and update docstring

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>

daniel-sanche

@agrawalradhika-cell

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>

daniel-sanche

@agrawalradhika-cell

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>

agrawalradhika-cell

daniel-sanche

sai-sunder-s

@daniel-sanche

agrawalradhika-cell added a commit that referenced this pull request

Nov 5, 2025
… enables mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, when the MWID/X.509 cert sources detected (#1859)

Add public wrapper for check_use_client_cert which enables mTLS if
GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, when the MWID/X.509 cert
sources detected. Also, fix check_use_client_cert to return boolean
value.

Change #1848 added the check_use_client_cert method that helps know if
client cert should be used for mTLS connection. However, that was in a
private class, thus, created a public wrapper of the same function so
that it can be used by python Client Libraries. Also, updated
check_use_client_cert to return a boolean value instead of existing
string value for better readability and future scope.

---------

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Co-authored-by: Daniel Sanche <d.sanche14@gmail.com>

This was referenced

Nov 5, 2025

Linchin added a commit that referenced this pull request

Nov 5, 2025
Librarian Version: v0.5.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator:latest
<details><summary>google-auth: 2.43.0</summary>

##
[2.43.0](v2.42.1...v2.43.0)
(2025-11-05)

### Features

* Add public wrapper for _mtls_helper.check_use_client_cert which
enables mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, when the
MWID/X.509 cert sources detected (#1859)
([1535ecc](1535eccb))

* Enable mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, if the
MWID/X.509 cert sources detected (#1848)
([395e405](395e405b))

* onboard `google-auth` to librarian (#1838)
([c503eaa](c503eaa5))

</details>