Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple PagerDuty accounts #96

Closed
harikennedy opened this issue Apr 23, 2024 · 5 comments
Closed

Support for multiple PagerDuty accounts #96

harikennedy opened this issue Apr 23, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@harikennedy
Copy link

Currently, the plugin is limited to using a single API key. This is restrictive for scenarios where mulitple PagerDuty integrations are necessary.

@harikennedy harikennedy added the enhancement New feature or request label Apr 23, 2024
@t1agob
Copy link
Contributor

t1agob commented Apr 23, 2024

Hello @harikennedy!
Can you elaborate more on a scenario where you would need to use multiple API Keys?

@harikennedy
Copy link
Author

In our setup, we're dealing with two different PagerDuty instances because our teams operate independently and need to manage their incidents separately. Our Backstage setup currently can't handle two instances since the plugin supports only a single API key. We're looking for a way to route to the correct PagerDuty instance based on the service context within Backstage. Could we have support for multiple API keys to accommodate this?

Reference (Auth):
https://github.com/PagerDuty/backstage-plugin-backend/blob/2f52b41cae9fa54b3f741170e6e977f076e88a6b/src/auth/auth.ts

@t1agob
Copy link
Contributor

t1agob commented Apr 25, 2024

Got it! This is not the standard approach as most customers have a single account approach I believe.

I'll review this one. It's not an easy task to perform without hindering the config experience. It will probably require changes to the app config and the service metadata itself. Give me a few days to review this one in more detail and get back to you.

@t1agob t1agob moved this to Under review in PagerDuty plugin for Backstage Apr 25, 2024
@t1agob t1agob changed the title Support for multiple PagerDuty instances Support for multiple PagerDuty accounts May 6, 2024
@t1agob t1agob moved this from Under review to Todo in PagerDuty plugin for Backstage May 7, 2024
@martina-equinix
Copy link

Hi @t1agob , I have a similar use case. I have two separate pagerduty accounts (each with their own subdomain and credentials). This can be a typical case when there is an acquisition for example, and the company ends up with at least two PD accounts for a period of time (which can be years even).

@t1agob t1agob moved this from Todo to In Progress in PagerDuty plugin for Backstage Jul 4, 2024
@t1agob t1agob self-assigned this Jul 4, 2024
t1agob added a commit that referenced this issue Jul 12, 2024
### Description

This PR introduces support for multi-account configuration. With this PR
admins will be able to specify multiple PagerDuty accounts in the same
Backstage instance. Support was added across all the components of the
plugin:
- **Backend:** All API routes exposed take account as an optional
parameter so you can create and query information from different
PagerDuty Accounts. If admins leverage the Entity Mapping feature, the
account is now persisted into the plugin database.
- **Scaffolder Actions:** When the scaffolder action is used on a
template it now lists Escalation Policies from all accounts configured
so the user can easily select the one they want. The Scaffolder action
also outputs the account so it can be replaced in the `app-config.yaml`
annotations.
- **Entity Processor:** If an entity mapping stored in the plugin
database contains the `account` property, the processor will add an
annotation to the entity with its information.

This PR solves an existing problem for many large organizations that
have several PagerDuty accounts for segregation purposes or that result
from company acquisitions.

**Issue number:** #96 

### Type of change

- [x] New feature (non-breaking change which adds functionality)
- [ ] Fix (non-breaking change which fixes an issue)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)

### Checklist

- [x] I have performed a self-review of this change
- [x] Changes have been tested
- [x] Changes are documented
- [x] Changes generate *no new warnings*
- [x] PR title follows [conventional commit
semantics](https://www.conventionalcommits.org/en/v1.0.0/)

If this is a breaking change 👇

- [ ] I have documented the migration process
- [ ] I have implemented necessary warnings (if it can live side by
side)

## Acknowledgement

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.

**Disclaimer:** We value your time and bandwidth. As such, any pull
requests created on non-triaged issues might not be successful.
@t1agob
Copy link
Contributor

t1agob commented Jul 13, 2024

@harikennedy @martina-equinix This feature is now available on the latest version (0.14.0). Feel free to try it and provide feedback.

Follow these in order to set it up.

@t1agob t1agob closed this as completed Jul 13, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in PagerDuty plugin for Backstage Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants