Cloud wizard credentials for AWS, Azure and Google are not written through to the session store
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 79/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- authentication, cloud
調査の方向性
web/pgadmin/utils/session.pyを読み、rds/__init__.py、azure/__init__.py、google/__init__.pyにあるAWS、Azure、Googleプロバイダーの更新を、#10499のStarfleetプロバイダーの変更と比較してください。ネストされたセッション更新がどのようにsave_sessionに届くかを追い、その後、各プロバイダーがセッションを変更済みとしてマークし、ディスクへの書き込みを強制することを確認してください。完了条件は、更新されたプロバイダーの状態が、複数のworkerにまたがる後続のウィザードリクエストで保持されることです。
索引モデルが issue の本文から書いたものです。
説明
The AWS, Azure and Google steps of the cloud deployment wizard store their verified credentials or authentication state in the Flask session, and the next wizard request (fetching regions, instance types and so on) expects to find it there. Under a deployment with more than one worker process, that request can fail as unauthenticated, because the session is never written to disk where another worker could read it. There are two causes:
FileBackedSessionManager.put(web/pgadmin/utils/session.py) skips the disk write if the session was last written withinPGADMIN_SESSION_DISK_WRITE_DELAY(10 seconds by default) unlesssession.force_writeis set, and none of the three providers set it.- The providers mostly mutate a nested dictionary, e.g.
session['aws']['secret'] = ...inrds/__init__.py,session['azure']['state']/['auth_type']/['azure_tenant_id']inazure/__init__.py, andsession['google']['client_config']/['state']ingoogle/__init__.py.ManagedSessionis aCallbackDict, which only notices top-level assignments, so when the provider's key already exists the session is not even marked modified andsave_sessiondoes not save it at all. The change survives only in the per-workerCachingSessionManagercache.
The configurations pgAdmin ships and documents all run a single worker, which is why this has gone unnoticed; it affects people who run more than one process, and also loses the state if the server restarts within the write-delay window.
The fix is to set session.force_write = True and session.modified = True after updating the provider's session state, as the pgEdge Starfleet provider does in #10499.
- 主要言語
- Python
- スター
- 3.9k
- フォーク
- 908
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 35
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pgadmin-org/pgadmin4 のほかの issue
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pgadmin-org/pgadmin4#10503 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pgadmin-org/pgadmin4#10426 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
pgadmin-org/pgadmin4#10424 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pgadmin-org/pgadmin4#10418 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
pgadmin-org/pgadmin4#10408 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
pgadmin-org/pgadmin4 の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
gradio-app/gradio#13964 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 93/100
BSData/horus-heresy-3rd-edition#3232 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jbacalso24/mimry#123 ·
メンテナーはふだん 1 日以内に返信
-
p:3-mid pydanty:bug pydanty:is-working
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pydantic/pydantic-ai#10153 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue priority: medium size: S testing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
cubrid-lab/cubrid-cookbook-python#316 ·
メンテナーはふだん 1 日以内に返信