googleapis / googleapis/google-cloud-python

auth: configure_mtls_channel() discards existing session configuration

未关闭
#18,314 0 条评论 0 个 reaction 已指派 1 人 已被 @agrawalradhika-cell 认领 在 GitHub 查看
priority: p2 type: bug
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
122

描述

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

```python
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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。