[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
19 files changed
tree: 85faea8f1c4ff2a82fecae95f0eccf1a79b24323
  1. appengine/
  2. buildbucket/
  3. cipd/
  4. client/
  5. common/
  6. deploytool/
  7. dm/
  8. examples/
  9. grpc/
  10. hardcoded/
  11. infra/
  12. logdog/
  13. luci_config/
  14. lucictx/
  15. milo/
  16. mmutex/
  17. scheduler/
  18. scripts/
  19. server/
  20. swarming/
  21. tokenserver/
  22. tools/
  23. tumble/
  24. vpython/
  25. web/
  26. .travis.yml
  27. AUTHORS
  28. codereview.settings
  29. CONTRIBUTING.md
  30. CONTRIBUTORS
  31. LICENSE
  32. luci-deploy.cfg
  33. pre-commit-go.yml
  34. PRESUBMIT.py
  35. README.md
  36. WATCHLISTS
README.md

luci-go: LUCI services and tools in Go

GoDoc Build Status Coverage Status

Installing

go get -u github.com/luci/luci-go/client/cmd/...
go get -u github.com/luci/luci-go/server/cmd/...

Code layout

  • /appengine/... contains AppEngine server code. It imports packages from /common/... and /server/....
  • /client/... contains all client code.
  • /common/... contains code and structures shared between all of /appengine/..., /client/... and /server/...; for example, the structures used by the server APIs. These are inherently APIs.
  • /deploytool/... contains the LUCI cloud services deployment tool.
  • /logdog/... contains LogDog client and server code, as well as APIs, protobufs, and support libraries.
  • /server/... contains standalone server code. Its packages are reusable by /appengine/....
  • /tools/... contains support tools used by other LUCI components.

Versioning

  • Branch go1 contains the stable code.
  • Branch master constains the latest code.

Contributing

  • Sign the Google CLA.
  • Make sure your user.email and user.name are configured in git config.
  • Install test-only packages: go get -u -t github.com/luci/luci-go/client/...
  • Install the pcg git hook: go get -u github.com/maruel/pre-commit-go/cmd/... && pcg

Run the following to setup the code review tool and create your first review:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/src/depot_tools
export PATH="$PATH:$HOME/src/depot_tools"
cd $GOROOT/github.com/luci/luci-go
git checkout -b work origin/master

# hack hack

git commit -a -m "This is awesome\nR=joe@example.com"
# This will ask for your Google Account credentials.
git cl upload -s
# Wait for LGTM over email.
# Check the commit queue box in codereview website.
# Wait for the change to be tested and landed automatically.

Use git cl help and git cl help <cmd> for more details.