PagerDuty / backstage-plugin

PagerDuty plugin for Backstage
https://pagerduty.github.io/backstage-plugin-docs/index.html
Apache License 2.0
25 stars 6 forks source link

Lack of required scopes might prevent that `PagerDutyCard` loads properly #134

Open t1agob opened 3 months ago

t1agob commented 3 months ago

Describe the bug The PagerDuty plugin for Backstage, when configured with OAuth, requires the following scopes to work:

    abilities.read // used in scaffolder only
    analytics.read
    escalation_policies.read
    incidents.read
    oncalls.read
    schedules.read
    services.read
    services.write // used in scaffolder only
    standards.read
    teams.read
    users.read
    vendors.read // used in scaffolder only

If some of these scopes are missing (e.g. standards.read) the PagerDutyCard fails to load and causes to app to crash. This doesn't happen for all scopes as some will fail more gracefully.

To Reproduce Steps to reproduce the behavior:

  1. Register an Application in PagerDuty
  2. When setting the Application Scopes select all of the ones above, except for standards.read.
  3. Run your Backstage application
  4. Open a Backstage entity that contains the PagerDutyCard

Expected behavior When a required scope is missing I would expect the PagerDutyCard to fail gracefully and present a message saying which scopes are missing in the Application Registration so it can be fixed.

Screenshots This is how we found out the problem was related to a missing scope 👇 image