Remove the v1 user routes and keep complete simulation and report results final
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
調査の方向性
Start by locating the v1 user-profile and user-policy route definitions and the PATCH handlers for simulation and report; the issue gives no file or test names. Read how those handlers authorize requests and determine whether a stored result is complete. Done means the legacy routes are removed and updates to complete results are accepted unchanged when identical or rejected with 409 when they differ; run the relevant API tests.
索引モデルが issue の本文から書いたものです。
説明
The 2026-10-22 security review of the deployed API found two authorization gaps in v1 routes.
- Legacy user routes.
/{country_id}/user-profile(GET, POST, PUT) and/{country_id}/user-policy(GET, POST, PUT) read and change user profiles and saved policies by auser_id,auth0_idor recordidtaken from the request, and check no credential. App v2 does not call them, and #4017 reports no production requests to them in the 30 days to 2026-10-19. Signed-in users' saved work is served by the/v2routes, which take the owner from the verified credential. - Result updates.
PATCH /{country_id}/simulationandPATCH /{country_id}/reporttake no credential and can replace a result that is already complete. These records are shared (identical requests reuse one record), so one caller's update changes what every viewer of that record sees.
Plan:
- Remove the v1 user routes. #4017 removes them too, but it is held for the legacy site's shutdown because of the other routes it removes.
- Make a complete result final: an update that repeats it is accepted and changes nothing, and one that would change it answers 409. Today the browser that ran the calculation writes its result, so there is no compute-worker credential to require; making the server the only writer of results is a follow-up.
- 主要言語
- Python
- スター
- 18
- フォーク
- 33
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 36
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-api のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
PolicyEngine/policyengine-api#3911 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
PolicyEngine/policyengine-api#3910 ·
メンテナーはふだん 3 日以内に返信
-
Store the metadata v3 reads in the v2 catalog, from PolicyEngine.py's public records対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
PolicyEngine/policyengine-api#4022 ·
メンテナーはふだん 3 日以内に返信
-
Publish v2 catalog regions from the Public API's own region reference files対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
PolicyEngine/policyengine-api#4019 ·
メンテナーはふだん 3 日以内に返信
-
Remove the routes only the legacy site used, check health at /health, and stop serving Canada, Nigeria and Israel対応中かも @anth-volk が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
PolicyEngine/policyengine-api#4016 ·
メンテナーはふだん 3 日以内に返信
PolicyEngine/policyengine-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
iceboundrock/AutoForge#304 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fossasia/visdom-dev#77 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws-cloudformation/cfn-lint#4890 ·
メンテナーはふだん 2 日以内に返信