Skip to content

auth: configure_mtls_channel() discards existing session configuration #18314

Open

Description

@nbayati

In AsyncAuthorizedSession.configure_mtls_channel() (packages/google-auth/google/auth/aio/transport/sessions.py), configuring mutual TLS replaces self._auth_request with a newly constructed aiohttp.ClientSession and aiohttp.TCPConnector:

connector = aiohttp.TCPConnector(ssl=ssl_context)
new_session = aiohttp.ClientSession(connector=connector)
old_auth_request = self._auth_request
self._auth_request = AiohttpRequest(session=new_session)

Because new_session is instantiated from scratch with default arguments, we lose any custom configurations provided by callers on the initial session, such as connection pool limits, timeouts, etc.

Activity

  1. added theissue type on Sep 8, 2026
  2. added
    type: bug
    priority: p2
    on Sep 8, 2026
  3. removed theissue type on Sep 8, 2026
  4. added this to the Async REST GA milestone on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2type: bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions