Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: 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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@agrawalradhika-cell
Copy link
Contributor

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>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
@agrawalradhika-cellagrawalradhika-cell changed the titleAdd 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 detectedfeat: 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 detectedNov 4, 2025
@agrawalradhika-cellagrawalradhika-cell marked this pull request as ready for reviewNovember 4, 2025 22:40
@nbayatinbayati added the kokoro:runAdd this label to force Kokoro to re-run the tests. labelNov 4, 2025
@yoshi-kokoroyoshi-kokoro removed the kokoro:runAdd this label to force Kokoro to re-run the tests. labelNov 4, 2025
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Copy link
Contributor

@nbayatinbayati left a comment

Choose a reason for hiding this comment

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

Overall LGTM, I just have a minor suggestion: Add a test case to verify the behavior when GOOGLE_API_USE_CLIENT_CERTIFICATE is set to a string other than "true" or "false". The current implementation correctly evaluates such cases to False, and adding an explicit test for this would make the test suite more comprehensive.

agrawalradhika-cell reacted with thumbs up emoji
daniel-sanche
daniel-sanche previously approved these changesNov 5, 2025
Copy link
Collaborator

@daniel-sanchedaniel-sanche left a comment

Choose a reason for hiding this comment

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

LGTM, but one more small comment

agrawalradhika-cell reacted with thumbs up emoji
@daniel-sanchedaniel-sanche added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelNov 5, 2025
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelNov 5, 2025
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
@nbayatinbayati added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelNov 5, 2025
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelNov 5, 2025
@andyrzhaoandyrzhao added the kokoro:runAdd this label to force Kokoro to re-run the tests. labelNov 5, 2025
@andyrzhaoandyrzhao self-requested a reviewNovember 5, 2025 06:30
Copy link
Contributor

@andyrzhaoandyrzhao left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for working on this!

@yoshi-kokoroyoshi-kokoro removed the kokoro:runAdd this label to force Kokoro to re-run the tests. labelNov 5, 2025
@agrawalradhika-cellagrawalradhika-cell merged commit1535ecc intogoogleapis:mainNov 5, 2025
12 checks passed
Linchin added a commit that referenced this pull requestNov 5, 2025
Librarian Version: v0.5.0Language 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 whichenables mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, when theMWID/X.509 cert sources detected (#1859)([1535ecc](1535eccb))* Enable mTLS if GOOGLE_API_USE_CLIENT_CERTIFICATE is not set, if theMWID/X.509 cert sources detected (#1848)([395e405](395e405b))* onboard `google-auth` to librarian (#1838)([c503eaa](c503eaa5))</details>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@daniel-sanchedaniel-sanchedaniel-sanche approved these changes

@andyrzhaoandyrzhaoandyrzhao approved these changes

@yaoliuggyaoliuggyaoliugg approved these changes

@nbayatinbayatinbayati approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@agrawalradhika-cell@daniel-sanche@andyrzhao@yaoliugg@nbayati@yoshi-kokoro

[8]ページ先頭

©2009-2025 Movatter.jp