Skip to content

Use the appropriate authorization attribute on Web API controllers - #188

Merged
ritchiecarroll merged 2 commits into
masterfrom
secure-grafana-controller
Oct 11, 2026
Merged

ritchiecarroll merged 2 commits into
masterfrom
secure-grafana-controller

Conversation

@StephenCWills

Copy link
Copy Markdown
Member

AuthorizeControllerRoleAttribute applies to MVC controllers, not Web API controllers. As a result, these functions were more accessible than they needed to be. Furthermore, the /api/grafana/... endpoints were all marked as anonymous resources, which meant that the endpoints in GrafanaController were accessible regardless.

@ritchiecarroll
ritchiecarroll merged commit 037c1f5 into master Oct 11, 2026
2 checks passed
@StephenCWills
StephenCWills deleted the secure-grafana-controller branch October 12, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants