Skip to content

fix: correct RBAC scopes in incidents API (#5363)#6452

Open
anxovatomica wants to merge 1 commit into
keephq:mainfrom
anxovatomica:fix/incident-scopes-clean
Open

fix: correct RBAC scopes in incidents API (#5363)#6452
anxovatomica wants to merge 1 commit into
keephq:mainfrom
anxovatomica:fix/incident-scopes-clean

Conversation

@anxovatomica
Copy link
Copy Markdown

Problem

The RBAC scopes in routes/incidents.py were incorrect:

  • delete_incident endpoint used write:incident instead of delete:incident
  • Read endpoints (get_incident_alerts, get_future_incidents_for_an_incident, get_incident_workflows) used read:incidents instead of read:incident

This broke the permission model — a role with write permission could delete incidents, and the inconsistent incidents vs incident scope naming prevented proper RBAC configuration.

Changes

  • Corrected delete_incident scope to delete:incident
  • Unified all read scopes to read:incident

Closes #5363

- delete_incident used write:incident instead of delete:incident
- read endpoints used read:incidents instead of read:incident

Closes keephq#5363
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. Bug Something isn't working labels May 11, 2026
@anxovatomica
Copy link
Copy Markdown
Author

Following up on this RBAC scope fix. This corrects 4 incorrect scope strings in the incidents API that could cause authorization mismatches. Clean 4-line change, all CI passing.

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

Labels

Bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Wrong scope in incidents.py

1 participant