Skip to content

Skip user auth check in alerts_controller#notify

Reuben Pereira requested to merge 9504-fix-alert-notify into master

What does this MR do?

The AlertsController#notify API is hit by alertmanager when an alert occurs. There will never be a signed in user for that API.

But the current implementation checks if the current_user has permission to read the given project.

This MR changes it to not check for user permissions. Misuse is prevented by the token that is present in the request. The token in the request is checked against the project.alerting_setting.token (line in code).

What are the relevant issue numbers?

#9504 (closed)

Does this MR meet the acceptance criteria?

Closes #9504 (closed)

Edited by Reuben Pereira

Merge request reports