New issue
Advanced search Search tips

Issue 905885 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Gate read/write access for all RPCs on project group membership

Project Member Reported by qyears...@chromium.org, Nov 16

Issue description

In order to support non-public projects on the same instance of Tricium, we need to always check ACLs before fetching any potentially non-public data. In most handlers, immediately after the project config is fetched, the user can be checked, and the request must be aborted if the user doesn't have access.

A good source to look at as an example is the way that Milo handles this:
https://chromium.googlesource.com/infra/luci/luci-go/+/master/milo/common/acl.go

For this change, first of all, the project config should include a field specifying access group(s).

All public handlers that could potentially read project-specific data must check ACLs
before fetching anything. It turns out that for Tricium this just includes the RPCs at
https://cs.chromium.org/chromium/infra/go/src/infra/tricium/api/v1/tricium.proto

 - Analyze (request a run to start, given a project and CL/patch details)
 - Progress (read only, takes run ID. Could be changed to require project as well as run ID.)
 - ProjectProgress (read only)
 - Results (read only, takes run ID. Could be changed to require project too.)
 - Feedback (read only, provides only on an aggregate number across projects --
             could be changed to take a project and return results for a project.
             A DB schema change might be required.)
 - ReportNotUseful (read/write; takes a comment ID; could be changed to require project as well as comment ID)

All other handlers are internal routes used for task queues and cron tasks, so there's no external user access for those routes; that should be enforced by requiring "admin" login in app.yaml.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 17 (5 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra/+/9eb1ecb1f4b998df517e25e0a6af2c26c03b58c4

commit 9eb1ecb1f4b998df517e25e0a6af2c26c03b58c4
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Thu Jan 17 20:42:49 2019

Add a project field to FeedbackRequest.

This CL also changes the comments.

Bug: 905885
Change-Id: I436e57480c9377f5cf74a24c5778ba568e9014c0
Reviewed-on: https://chromium-review.googlesource.com/c/1418411
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#20057}
[modify] https://crrev.com/9eb1ecb1f4b998df517e25e0a6af2c26c03b58c4/go/src/infra/tricium/api/v1/tricium.proto
[modify] https://crrev.com/9eb1ecb1f4b998df517e25e0a6af2c26c03b58c4/go/src/infra/tricium/api/v1/pb.discovery.go
[modify] https://crrev.com/9eb1ecb1f4b998df517e25e0a6af2c26c03b58c4/go/src/infra/tricium/api/v1/tricium.pb.go

Sign in to add a comment