| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ion (googleapis#18147) * Isolate hostname using urllib.parse.urlsplit in _mtls_helper.is_mtls_endpoint * Eliminate false positives on non-mTLS URLs containing mtls substrings in paths/queries * Add support for Private Service Connect (*.p.googleapis.com) custom mTLS endpoints * Update AuthorizedSession and AuthorizedHttp to use shared is_mtls_endpoint helper * Add comprehensive unit tests in test__mtls_helper, test_requests, and test_urllib3 Fixes googleapis#18147 Follow-up to googleapis#17928
There was a problem hiding this comment.
This pull request centralizes and improves mTLS and Private Service Connect (PSC) endpoint detection by introducing a robust is_mtls_endpoint helper function in _mtls_helper.py. This helper replaces redundant inline checks in both the requests and urllib3 transport implementations. Comprehensive unit tests have been added to validate the new helper across various URL formats, and existing tests have been updated to ensure proper cert rotation behavior on PSC endpoints. I have no additional feedback to provide as the changes are well-implemented and fully tested.
Sorry, something went wrong.
|
Hi @parthea and @viacheslav-rostovtsev can you please review above PR for issue: b/548699340 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Relands #18153 with all review feedback addressed, full test coverage, and live manual verification against Google Cloud mTLS endpoints.
Fixes #18147
Changes
Manual Verification & Findings
- Non-mTLS URLs (storage.googleapis.com): On receiving 401 Unauthorized, AuthorizedSession executes the standard OAuth token refresh & retry (2 HTTP requests: 401 ➔ 200 OK), and completely skips certificate rotation (spy_check Call Count: 0).
- PSC / mTLS URLs (storage.p.googleapis.com): On receiving 401 Unauthorized, AuthorizedSession triggers certificate rotation inspection (spy_check Call Count: 1) before refreshing credentials and retrying with 200 OK.
Click to expand Live Manual Test Output (100% Green)