Project resource RPCs do not check that the resource belongs to the request's project
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- authorization, backend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Go
- Stelle
- 343
- Fork
- 48
- Merge medio
- 2g 9h
- PR unite (30g)
- 48
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di raystack/frontier
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di raystack/frontier
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
QuantumNous/new-api#7839 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage service/costoptimizationhub
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
hashicorp/terraform-provider-aws#50507 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
adcontextprotocol/adcp-go#567 ·
I maintainer di solito rispondono entro 1 giorno
-
bug raised-by:desk
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
medici-finance/assay#3097 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
supabase-community/supabase-kubernetes#275 ·
I maintainer di solito rispondono entro 1 giorno