Title: google-auth: mTLS token refresh blindspot due to unconfigured internal helper transport · Issue #17680 · googleapis/google-cloud-python · GitHub
Open Graph Title: google-auth: mTLS token refresh blindspot due to unconfigured internal helper transport · Issue #17680 · googleapis/google-cloud-python
X Title: google-auth: mTLS token refresh blindspot due to unconfigured internal helper transport · Issue #17680 · googleapis/google-cloud-python
Description: Determine this is the right repository I determined this is the correct repository in which to report this bug. Summary of the issue When a developer calls configure_mtls_channel() on AuthorizedSession or AuthorizedHttp, the client certi...
Open Graph Description: Determine this is the right repository I determined this is the correct repository in which to report this bug. Summary of the issue When a developer calls configure_mtls_channel() on AuthorizedSes...
X Description: Determine this is the right repository I determined this is the correct repository in which to report this bug. Summary of the issue When a developer calls configure_mtls_channel() on AuthorizedSes...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/17680
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"google-auth: mTLS token refresh blindspot due to unconfigured internal helper transport","articleBody":"### Determine this is the right repository\n\n\n\n- [x] I determined this is the correct repository in which to report this bug.\n\n\n\n### Summary of the issue\n\n\n\nWhen a developer calls `configure_mtls_channel()` on `AuthorizedSession` or `AuthorizedHttp`, the client certificates are only mounted onto the **outer client session**. \n\n\n\nTo prevent infinite recursion loops, the credentials class delegates out-of-band network requests (such as token refreshing and internal IAM requests like `signBlob` or `generateAccessToken`) to a **separate internal helper session** (`self._auth_request_session`). \n\n\n\nBecause this internal transport is omitted during configuration, it lacks the client certificate. Consequently, any internal token exchanges or IAM requests bypass the mTLS channel entirely. \n\n* If GFE allows optional client certificates, the TLS handshake succeeds but silently falls back to standard one-way TLS.\n\n* If the token endpoint enforces strict Certificate-Based Access (CBA) policies, the connection is blocked, resulting in runtime outages.\n\n\n\n### Proposed fix\n\n\n\nEnsure the client certificate configuration propagates to the inner helper transport during channel setup.\n\n\n\n**For Requests (`google/auth/transport/requests.py`):**\n\nExplicitly mount the adapter to the inner session during configuration:\n\n```python\n\nif self._is_mtls:\n\n mtls_adapter = _MutualTlsAdapter(cert, key)\n\n self.mount(\"https://\", mtls_adapter)\n\n if self._auth_request_session is not None:\n\n self._auth_request_session.mount(\"https://\", mtls_adapter)\n\n```\n\n\n\n**For Urllib3 (`google/auth/transport/urllib3.py`):**\n\nEnsure the inner request transport is also configured with the mTLS http instance:\n\n```python\n\nif found_cert_key:\n\n self.http = _make_mutual_tls_http(cert, key)\n\n self._request = Request(self.http)\n\n```","author":{"url":"https://github.com/nbayati","@type":"Person","name":"nbayati"},"datePublished":"2026-07-09T05:29:43Z","url":"https://github.com/googleapis/google-cloud-python/issues/17680"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:733b3aa5-fa1f-60aa-8aa1-f97d7a171b94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C774:2B73A8:6D31BB:9A3DAA:6AFE120A |
| html-safe-nonce | 8fe4b61bec40b717ebf77d018e26131b1fe768f60c5f2f2667c73cec5f9b4dba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzc0OjJCNzNBODo2RDMxQkI6OUEzREFBOjZBRkUxMjBBIiwidmlzaXRvcl9pZCI6IjE2NzM4NjgzNDUwOTEwNzcyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6c4ad67254026c01f0b338b804402fdbe17c9b1d5e763495cc8cbca94ddd7369 |
| hovercard-subject-tag | issue:4843470992 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/17680/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d7d6732f16ae1926d49a3015a939ea954eb6c6a5f54e1e37ba4e2d1f2633f979/googleapis/google-cloud-python/issues/17680 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d7d6732f16ae1926d49a3015a939ea954eb6c6a5f54e1e37ba4e2d1f2633f979/googleapis/google-cloud-python/issues/17680 |
| og:image:alt | Determine this is the right repository I determined this is the correct repository in which to report this bug. Summary of the issue When a developer calls configure_mtls_channel() on AuthorizedSes... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nbayati |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3cd8a1d79ccbf9aecac62781f79072482a49047fb982b8c9e2ad4aca8bf6a9af |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 05539640a34afe6142a519483d78ddd766a1304a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width