Project resource RPCs do not check that the resource belongs to the request's project
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- go
- Bereich
- authorization, backend
Rechercherichtung
Start with the permission rules for the three project resource RPCs in pkg/server/connect_interceptors/authorization.go, then the handlers in internal/api/v1beta1connect/resource.go. Check where each handler takes the project from (the request or the resource row) and compare it with the resource's project. Use the organization resource RPCs that refuse another organization's resource (#1990) as the pattern. Done when all three RPCs reject a resource outside the request's project and DeleteProjectResource works for organization resources.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
GetProjectResource, UpdateProjectResource and DeleteProjectResource take a resource id and a project id, but never check that the resource belongs to that project.
UpdateProjectResourceloads the project from the request, updates the resource, and writes theapp.resource.updatedaudit log under that project's organization. A caller withupdateon a resource can send the id of any project, even one they cannot see, and the update goes through with the audit log under that other organization.GetProjectResourcereturns the resource for any project id.DeleteProjectResourceloads the project from the resource row instead. For an organization resource (#1987), which has no project, that lookup fails and the call returns an internal error. Nothing is deleted.
Steps
- User A owns resource R in a project of organization O1.
- A calls
UpdateProjectResourcewith R's id and the id of a project in organization O2, where A has no access. - The update succeeds, and the
app.resource.updatedaudit log is written under O2.
Code
The authorization rules for these RPCs in pkg/server/connect_interceptors/authorization.go check the permission on the resource and the plan on the request's project. The handlers in internal/api/v1beta1connect/resource.go never compare the request's project with the resource's.
Expected
These RPCs refuse a resource that does not belong to the request's project, the way the organization resource RPCs refuse a resource of another organization (#1990).
- Vorherrschende Sprache
- Go
- Sterne
- 343
- Forks
- 48
- Ø Merge
- 2 T. 9 Std.
- Gemergte PRs (30 T.)
- 48
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus raystack/frontier
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in raystack/frontier
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
keyxmakerx/Chronicle#1469 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Gentleman-Programming/gentle-ai#5565 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug frontend grammar sev-3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
-
Docs: say where source and device come from in the Withings and Polar guidesEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenconnector docs good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
soma-intelligence/open-health-sync#134 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 3 Tagen