Skip to content

Conversation

@shahzad31
Copy link
Contributor

Summary

Fixes: elastic/uptime#154

Abstracted 'access:uptime-read' tag into a wrapper for uptime rest routes.

@shahzad31 shahzad31 requested review from andrewvc and justinkambic and removed request for andrewvc April 6, 2020 10:04
@shahzad31 shahzad31 self-assigned this Apr 6, 2020
@shahzad31 shahzad31 added v7.7.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.8.0 and removed v7.7.0 labels Apr 6, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

return {
...uptimeRoute,
options: {
tags: ['access:uptime-read', ...(uptimeRoute.options?.tags ?? [])],
Copy link
Contributor

@andrewvc andrewvc Apr 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we only have two options read/write, maybe instead of adding arbitrary tags we can just add a accessWrite: true option or similar that adds access:uptime-write.

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulled this down and tested locally, LGTM.

Testing summary

  • loaded app locally and made sure everything was working
  • created a role with Uptime readonly privileges, was not able to perform admin actions like changing index pattern or creating ML job

const licenseCheckHandler: UMRouteHandler = async (customParams, context, request, response) => {
const { statusCode, message } = libs.license(context.licensing.license);
if (statusCode === 200) {
return await handler(customParams, context, request, response);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@shahzad31 shahzad31 merged commit 2e0d900 into elastic:master Apr 7, 2020
@shahzad31 shahzad31 deleted the abstract-access-uptime-header branch April 7, 2020 07:16
shahzad31 added a commit to shahzad31/kibana that referenced this pull request Apr 7, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 7, 2020
* master: (36 commits)
  [data.search.aggs] Remove service getters from agg types (elastic#61628)
  fixing APM internationalization (elastic#62757)
  fix: 🐛 correctly create error on no_matching_indices (elastic#61257)
  [Lens] Remove all legacy imports (elastic#62596)
  Add label for ace editor (elastic#62588)
  [ML] Show better file structure finder explanations (elastic#62316)
  Fix old pathes in eslintrc (elastic#62580)
  [Uptime] Improve Telemetry test (elastic#62428)
  [SIEM] Adds sort rules Cypress test (elastic#62700)
  [Uptime]Abstracted 'access:uptime-read' tag into a wrapper for… (elastic#62576)
  fixing bug (elastic#62577)
  [Maps] Allow updating requestType for ESGeoGridSource (elastic#62365)
  [Maps] do not show circle border when symbol size is zero (elastic#62644)
  [Maps] Always show current zoom level (elastic#62684)
  bc5 siem rules merge (elastic#62679)
  Revert "[Monitoring] Cluster state watch to Kibana alerting (elastic#61685)"
  Fix visual tests (elastic#62660)
  [Telemetry] update crypto packages (elastic#62469)
  [DOCS] Removed references to left (elastic#60807)
  [Maps] Move layers to np maps (elastic#61877)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.8.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Abstract application of access:uptime from API endpoint implementation

5 participants