[pinpoint] Let users with tryjob access launch Pinpoint jobs.

Refactor api_request_handler to make it more flexible in the types of
authentication it can do. Instead of _AllowAnonymous(), it has an
overridable method _CheckUser() that checks the user's credentials.
This way, we can override it to accept tryjob users.

Replace PrivilegedPost() and UnprivilegedPost() with just Post().
There were no API handlers that treated privileged and unprivileged
users differently. They only needed to be overridden to do access
control.

Previously there were three tiers of access control:

* Override PrivilegedPost().
* This is now `def _CheckUser(self): self._CheckIsInternalUser()`

* Override UnprivilegedPost() and PrivilegedPost().
* This is now `def _CheckUser(self): self._CheckIsLoggedIn()`

* Override UnprivilegedPost(), PrivilegedPost(), and _AllowAnonymous().
* This is now the default behavior, allowing all users.

Bug: chromium:895738
Change-Id: I35a2d9116bd98170ea17caeba9f8756b9304ceb1
Reviewed-on: https://chromium-review.googlesource.com/c/1319249
Reviewed-by: Juan Antonio Navarro PĂ©rez <perezju@chromium.org>
Commit-Queue: Dave Tu <dtu@chromium.org>
19 files changed
tree: 8851d6c1ced7ba69fa38d8f77f7091482e77ff0c
  1. bin/
  2. catapult_build/
  3. common/
  4. dashboard/
  5. dependency_manager/
  6. devil/
  7. docs/
  8. experimental/
  9. firefighter/
  10. hooks/
  11. infra/
  12. netlog_viewer/
  13. systrace/
  14. telemetry/
  15. third_party/
  16. trace_processor/
  17. tracing/
  18. web_page_replay_go/
  19. .eslintignore
  20. .eslintrc
  21. .gitignore
  22. .vpython
  23. AUTHORS
  24. BUILD.gn
  25. codereview.settings
  26. CONTRIBUTING.md
  27. generate_telemetry_build.py
  28. LICENSE
  29. navbar.md
  30. OWNERS
  31. PRESUBMIT.py
  32. pylintrc
  33. README.md
  34. WATCHLISTS
README.md

Catapult

Catapult is the home for several performance tools that span from gathering, displaying and analyzing performance data. This includes:

These tools were created by Chromium developers for performance analysis, testing, and monitoring of Chrome, but they can also be used for analyzing and monitoring websites, and eventually Android apps.

Contributing

Please see our contributor's guide

Current build status