Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Issue 2986033003: [scheduler]: ACLs phase 1 - per Job ACL specification and enforcement. (Closed)

Created:
3 years, 4 months ago by tandrii(chromium)
Modified:
3 years, 4 months ago
Reviewers:
Vadim Sh.
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, maruel+w_chromium.org, tandrii+luci-go_chromium.org, nodir
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

[scheduler]: ACLs phase 1 - per Job ACL specification and enforcement. This CL: * allows specifying READER and OWNER acls per Job/Trigger definition: * READER is who can see Job and **all** its invocations, including those finished long ago under potentially more restrictive ACLs. * OWNER is who can affect Job state manually through API or UI such as `AbortJob` and `PauseJob`. * boilerplate reduction by means of acl_set defined per project and referenced in Job/Trigger definitions. * ACL spec per Job/Trigger is **not yet** required. If not specified, defaults to current behavior of READER=all OWNER=scheduler admins. * ACLs introduced do not limit which Jobs can be triggered by which Triggers. However, triggering functionality doesn't exist yet, so this doesn't matter. On deployment: * This CL has backwards compatibility and can be deployed without breaking anything. * Once deployed, this CL can be reverted and things will work as before. This imples in particular that all configured READER ACLs will be ignored and default to READER=all (see also warning in cron.proto). * Plan: 1. Deploy this CL. 2. Update existing configs to specify ACLs with explicit READER=all and OWNER=project-<NAME>-owners. 2. Deploy requirement to specify ACLs for all Jobs and remove currently implicit default ACLs. R=vadimsh@chromium.org Bug=736770 Review-Url: https://codereview.chromium.org/2986033003 Committed: https://github.com/luci/luci-go/commit/0377d2719f9ea31ca5c1abd5b519ef25f9833571

Patch Set 1 #

Total comments: 4

Patch Set 2 : nodir@ review follow up #

Patch Set 3 : Rename WRITER to OWNER. #

Patch Set 4 : not enabled acls #

Patch Set 5 : gofmt #

Patch Set 6 : now safe to deploy #

Patch Set 7 : pcg #

Total comments: 20

Patch Set 8 : review #

Patch Set 9 : [WIP] ACLs into engine public API. #

Total comments: 5

Patch Set 10 : temp sync between laptops #

Patch Set 11 : temp #

Patch Set 12 : rework #

Total comments: 15

Patch Set 13 : Review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1556 lines, -701 lines) Patch
M scheduler/api/scheduler/v1/pb.discovery.go View 1 2 1 chunk +328 lines, -326 lines 0 comments Download
M scheduler/api/scheduler/v1/scheduler.proto View 1 2 3 chunks +8 lines, -0 lines 0 comments Download
M scheduler/api/scheduler/v1/scheduler.pb.go View 1 2 4 chunks +16 lines, -0 lines 0 comments Download
M scheduler/appengine/acl/acl.go View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +171 lines, -7 lines 0 comments Download
A scheduler/appengine/acl/acl_test.go View 1 2 3 4 5 6 7 1 chunk +218 lines, -0 lines 0 comments Download
A + scheduler/appengine/acl/doc.go View 1 2 3 4 5 1 chunk +1 line, -15 lines 0 comments Download
M scheduler/appengine/apiservers/scheduler.go View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +14 lines, -17 lines 0 comments Download
M scheduler/appengine/apiservers/scheduler_test.go View 1 2 3 4 5 6 7 8 9 10 11 16 chunks +50 lines, -85 lines 0 comments Download
M scheduler/appengine/catalog/catalog.go View 1 2 3 4 5 6 7 6 chunks +25 lines, -2 lines 0 comments Download
M scheduler/appengine/catalog/catalog_test.go View 1 2 3 6 chunks +30 lines, -4 lines 0 comments Download
M scheduler/appengine/engine/engine.go View 1 2 3 4 5 6 7 8 9 10 11 12 21 chunks +202 lines, -84 lines 0 comments Download
M scheduler/appengine/engine/engine_test.go View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +188 lines, -59 lines 0 comments Download
M scheduler/appengine/frontend/handler.go View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -3 lines 0 comments Download
M scheduler/appengine/messages/cron.proto View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +55 lines, -1 line 0 comments Download
M scheduler/appengine/messages/cron.pb.go View 1 2 3 4 5 6 7 8 9 10 11 12 21 chunks +217 lines, -61 lines 0 comments Download
M scheduler/appengine/ui/index.go View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M scheduler/appengine/ui/invocation.go View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +10 lines, -12 lines 0 comments Download
M scheduler/appengine/ui/job.go View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +18 lines, -23 lines 0 comments Download
M scheduler/appengine/ui/project.go View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 127 (109 generated)
tandrii(chromium)
3 years, 4 months ago (2017-07-28 13:51:10 UTC) #1
nodir
https://codereview.chromium.org/2986033003/diff/1/scheduler/appengine/messages/cron.proto File scheduler/appengine/messages/cron.proto (right): https://codereview.chromium.org/2986033003/diff/1/scheduler/appengine/messages/cron.proto#newcode21 scheduler/appengine/messages/cron.proto:21: // "email:mail@example.com". Consider supporting prefix-less user emails, e.g. just ...
3 years, 4 months ago (2017-07-28 13:59:44 UTC) #6
tandrii(chromium)
https://codereview.chromium.org/2986033003/diff/1/scheduler/appengine/messages/cron.proto File scheduler/appengine/messages/cron.proto (right): https://codereview.chromium.org/2986033003/diff/1/scheduler/appengine/messages/cron.proto#newcode21 scheduler/appengine/messages/cron.proto:21: // "email:mail@example.com". On 2017/07/28 13:59:44, nodir wrote: > Consider ...
3 years, 4 months ago (2017-07-28 15:15:13 UTC) #9
Vadim Sh.
looks fine to me
3 years, 4 months ago (2017-07-28 19:21:27 UTC) #14
tandrii(chromium)
Vadim, PTAL I've not yet made use of ACLs in presentation and API. I can ...
3 years, 4 months ago (2017-07-31 18:45:59 UTC) #18
Vadim Sh.
you can keep adding stuff to this CL https://codereview.chromium.org/2986033003/diff/120001/scheduler/appengine/acl/acl.go File scheduler/appengine/acl/acl.go (right): https://codereview.chromium.org/2986033003/diff/120001/scheduler/appengine/acl/acl.go#newcode71 scheduler/appengine/acl/acl.go:71: func ...
3 years, 4 months ago (2017-08-01 01:56:19 UTC) #35
tandrii(chromium)
ok, will do all as part of this CL, so ignore description for now. This ...
3 years, 4 months ago (2017-08-01 22:50:01 UTC) #99
Vadim Sh.
On 2017/08/01 22:50:01, tandrii(chromium) wrote: > ok, will do all as part of this CL, ...
3 years, 4 months ago (2017-08-01 23:01:27 UTC) #100
Vadim Sh.
https://codereview.chromium.org/2986033003/diff/120001/scheduler/appengine/acl/acl.go File scheduler/appengine/acl/acl.go (right): https://codereview.chromium.org/2986033003/diff/120001/scheduler/appengine/acl/acl.go#newcode71 scheduler/appengine/acl/acl.go:71: func ValidateAclSets(sets []*messages.AclSet) (AclSets, error) { On 2017/08/01 22:50:01, ...
3 years, 4 months ago (2017-08-01 23:04:09 UTC) #101
tandrii(chromium)
this is getting more involved than I hoped, but at least I know codebase much ...
3 years, 4 months ago (2017-08-02 20:23:47 UTC) #106
Vadim Sh.
Not a fan of RA. Let's split Engine into two: API that checks ACLs, and ...
3 years, 4 months ago (2017-08-02 21:12:34 UTC) #107
Vadim Sh.
https://codereview.chromium.org/2986033003/diff/490001/scheduler/appengine/engine/engine.go File scheduler/appengine/engine/engine.go (right): https://codereview.chromium.org/2986033003/diff/490001/scheduler/appengine/engine/engine.go#newcode87 scheduler/appengine/engine/engine.go:87: ListInvocations(c context.Context, jobID string, pageSize int, cursor string) ([]*Invocation, ...
3 years, 4 months ago (2017-08-02 21:14:15 UTC) #108
tandrii(chromium)
ptal I changed slightly your proposal: instead of InternalAPI in Engine (only called by frontend/handler), ...
3 years, 4 months ago (2017-08-04 21:59:06 UTC) #113
Vadim Sh.
looks reasonable https://codereview.chromium.org/2986033003/diff/550001/scheduler/appengine/engine/engine.go File scheduler/appengine/engine/engine.go (right): https://codereview.chromium.org/2986033003/diff/550001/scheduler/appengine/engine/engine.go#newcode68 scheduler/appengine/engine/engine.go:68: // * if caller lacks have READER ...
3 years, 4 months ago (2017-08-04 23:07:27 UTC) #114
tandrii(chromium)
PTAL incl. new description. https://codereview.chromium.org/2986033003/diff/550001/scheduler/appengine/engine/engine.go File scheduler/appengine/engine/engine.go (right): https://codereview.chromium.org/2986033003/diff/550001/scheduler/appengine/engine/engine.go#newcode68 scheduler/appengine/engine/engine.go:68: // * if caller lacks ...
3 years, 4 months ago (2017-08-07 12:48:17 UTC) #119
Vadim Sh.
lgtm https://codereview.chromium.org/2986033003/diff/550001/scheduler/appengine/engine/engine.go File scheduler/appengine/engine/engine.go (right): https://codereview.chromium.org/2986033003/diff/550001/scheduler/appengine/engine/engine.go#newcode733 scheduler/appengine/engine/engine.go:733: if job, err := e.GetVisibleJob(c, jobID); err != ...
3 years, 4 months ago (2017-08-07 22:53:22 UTC) #122
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2986033003/570001
3 years, 4 months ago (2017-08-08 07:42:55 UTC) #124
commit-bot: I haz the power
3 years, 4 months ago (2017-08-08 07:46:35 UTC) #127
Message was sent while issue was closed.
Committed patchset #13 (id:570001) as
https://github.com/luci/luci-go/commit/0377d2719f9ea31ca5c1abd5b519ef25f9833571

Powered by Google App Engine
This is Rietveld 408576698