AuthN: Add auth hook that can sync grafana cloud role to rbac cloud role (#80416)

* AuthnSync: Rename files and structures

* AuthnSync: register rbac cloud role sync if feature toggle is enabled

* RBAC: Add new sync function to service interface

* RBAC: add common prefix and role names for cloud fixed roles

* AuthnSync+RBAC: implement rbac cloud role sync

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Karl Persson
2024-01-17 10:55:47 +01:00
committed by GitHub
parent 24c32219bb
commit 7b58f71b33
10 changed files with 286 additions and 111 deletions

View File

@@ -28,6 +28,11 @@ const (
BasicRoleNoneUID = "basic_none"
BasicRoleNoneName = "basic:none"
FixedCloudRolePrefix = "fixed:cloud:"
FixedCloudViewerRole = "fixed:cloud:viewer"
FixedCloudEditorRole = "fixed:cloud:editor"
FixedCloudAdminRole = "fixed:cloud:admin"
)
// Roles definition