Remove the v1 user routes and keep complete simulation and report results final
Les mainteneurs répondent en général sous 3 jours
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 18
- Forks
- 33
- Merge moyen
- 2 j 18 h
- PR mergées (30 j)
- 36
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PolicyEngine/policyengine-api
-
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
PolicyEngine/policyengine-api#3911 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
PolicyEngine/policyengine-api#3910 ·
Les mainteneurs répondent en général sous 3 jours
-
Store the metadata v3 reads in the v2 catalog, from PolicyEngine.py's public recordsPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
PolicyEngine/policyengine-api#4022 ·
Les mainteneurs répondent en général sous 3 jours
-
Publish v2 catalog regions from the Public API's own region reference filesPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 38/100
PolicyEngine/policyengine-api#4019 ·
Les mainteneurs répondent en général sous 3 jours
-
Remove the routes only the legacy site used, check health at /health, and stop serving Canada, Nigeria and IsraelPeut-être pris @anth-volk l’a pris il y a 1 jour. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
PolicyEngine/policyengine-api#4016 ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de PolicyEngine/policyengine-api
Issues similaires
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fossasia/visdom-dev#77 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
aws-cloudformation/cfn-lint#4890 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
volcengine/OpenViking#6521 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
AstrBotDevs/AstrBot#10720 ·
Les mainteneurs répondent en général sous 1 jour