Per-catalog auth state is shared: commit_table mutates the session, and cached S3FileSystem instances share a signer
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- aws, python
- 領域
- authentication, backend, cloud
調査の方向性
Start by tracing RestCatalog.commit_table and FileIO.get_fs, including the fsspec S3FileSystem instance cache and botocore event registration shown in the issue. Verify isolation with requests from multiple tables and catalogs: table tokens must not persist on the shared session, and each catalog must retain its own signer even when filesystem constructor arguments match.
索引モデルが issue の本文から書いたものです。
説明
Two places where authentication state configured for one catalog or table persists onto another.
1. commit_table mutates the shared session's headers
headers = self._session.headers # the live session mapping, not a copy
if table_token := table.config.get(TOKEN):
headers[AUTHORIZATION_HEADER] = f"{BEARER_PREFIX} {table_token}"
self._session.headers is the session's own mapping, so assigning into it persists the table-scoped token on the session. Every subsequent request from that RestCatalog carries it, including requests for other tables.
2. fsspec-cached S3FileSystem instances share one signer registration
fs = S3FileSystem(**s3_fs_kwargs)
for event_name, event_function in register_events.items():
fs.s3.meta.events.unregister(event_name, unique_id=1925)
fs.s3.meta.events.register_last(event_name, event_function, unique_id=1925)
The signer is registered as a botocore event handler after construction, under a fixed unique_id. It is not part of s3_fs_kwargs, and fsspec caches filesystem instances by constructor arguments (skip_instance_cache is not set). Two catalogs whose anon / client_kwargs / config_kwargs match therefore receive the same S3FileSystem object, and the second unregister + register_last replaces the first catalog's signer with its own.
Note the per-thread lru_cache in get_fs is not involved — _thread_locals is an instance attribute, so that cache is already per-FileIO. The sharing comes from fsspec's instance cache.
Issue investigation generated via claude, reviewed by Sung, Kevin, Fokko.
- 主要言語
- Python
- スター
- 1.1k
- フォーク
- 589
- 平均マージ
- 2日 2時間
- マージ済み PR(30日)
- 70
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iceberg-python のほかの issue
-
kind:bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
apache/iceberg-python#4006 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/iceberg-python#3996 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/iceberg-python#3979 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/iceberg-python#3885 ·
-
[Bug] PyArrowFileIO fails to propagate s3.ssl.ca-cert to pyarrow.fs.S3FileSystem tls_ca_file_path オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/iceberg-python#3866 · コメント 1 件 ·
apache/iceberg-python の issue をすべて見る
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·