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

Add pagerduty AMR integration #44754

Merged
merged 9 commits into from
Aug 27, 2024
Merged

Conversation

EdwardDowling
Copy link
Contributor

Initial integration of Pagerduty plugin and Access Monitoring Rules routing

Depends on 43298 being merged first and will take this out of draft and update the description when it is.

changelog: Allow PagerDuty service used by plugin to be dynamically configured by creating Access Monitoring Rules resources with the required Pagerduty notify services.

@EdwardDowling EdwardDowling force-pushed the edwarddowling/pagerduty-amr branch from 5222085 to fdeb10d Compare August 12, 2024 16:48
@EdwardDowling EdwardDowling marked this pull request as ready for review August 12, 2024 16:49
@EdwardDowling
Copy link
Contributor Author

@tigrato can you take a look at this when you get a chance?

Copy link
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

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

Can you also add test coverage.

integrations/access/pagerduty/app.go Outdated Show resolved Hide resolved
integrations/access/pagerduty/app.go Outdated Show resolved Hide resolved
func (a *App) getMessageRecipient(ctx context.Context, req types.AccessRequest) (string, error) {
recipientSetService := a.accessMonitoringRules.RecipientsFromAccessMonitoringRules(ctx, req)
if recipientSetService.Len() > 1 {
return "", trace.BadParameter("more than one service provided as PagerDuty plugin recipient")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we not support this? Can we just take the first one instead of hard-failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since these could be coming from separate rules with an undefined evaluation order taking the first would be pretty much just taking a random one which I doubt would be any users intent. I think failing to post anything would make more sense until we have the ability to set evaluation order for rules.

Copy link
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

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

@EdwardDowling Test coverage is still missing on this PR.

@EdwardDowling EdwardDowling requested a review from r0mant August 23, 2024 16:12
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from tigrato August 27, 2024 01:08
@EdwardDowling EdwardDowling added this pull request to the merge queue Aug 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 27, 2024
@EdwardDowling EdwardDowling added this pull request to the merge queue Aug 27, 2024
Merged via the queue into master with commit bd82316 Aug 27, 2024
39 checks passed
@EdwardDowling EdwardDowling deleted the edwarddowling/pagerduty-amr branch August 27, 2024 15:47
@public-teleport-github-review-bot

@EdwardDowling See the table below for backport results.

Branch Result
branch/v16 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants