Ieva
a8bae3f0b0
Access Control: Clear user's permission cache after resource creation ( #59101 )
...
* refresh user's permission cache after resource creation
* clear the cache instead of reloading the permissions
* don't error if can't clear cache
* fix tests
* fix tests again
2022-11-24 14:38:55 +00:00
Gabriel MABILLE
d999b5bda0
RBAC: remove redundant role name field from plugin role registrations ( #58166 )
...
* RBAC: Remove name from role registration
* Inline accesscontrol service
* test fix
* use fmt
Co-Authored-By: marefr <marcus.efraimsson@gmail.com>
Co-authored-by: marefr <marcus.efraimsson@gmail.com>
2022-11-15 09:51:40 +01:00
Gabriel MABILLE
30fae33f66
RBAC: Allow role registration for plugins ( #57387 )
...
* Picking role registration from OnCall POC branch
* Fix test
* Remove include actions from this PR
* Removing unused permission
* Adding test to DeclarePluginRoles
* Add testcase to RegisterFixed role
* Additional test case
* Adding tests to validate plugins roles
* Add test to plugin loader
* Nit.
* Scuemata validation
* Changing the design to decouple accesscontrol from plugin management
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Fixing tests
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Add missing files
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Remove feature toggle check from loader
* Remove feature toggleimport
* Feedback
Co-Authored-By: marefr <marcus.efraimsson@gmail.com>
* Fix test'
* Make plugins.RoleRegistry interface typed
* Remove comment question
* No need for json tags anymore
* Nit. log
* Adding the schema validation
* Remove group to take plugin Name instead
* Revert sqlstore -> db
* Nit.
* Nit. on tests
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Update pkg/services/accesscontrol/plugins.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Log message
Co-Authored-By: marefr <marcus.efraimsson@gmail.com>
* Log message
Co-Authored-By: marefr <marcus.efraimsson@gmail.com>
* Remove unecessary method. Update test name.
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
* Fix linting
* Update cue descriptions
* Fix test
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: marefr <marcus.efraimsson@gmail.com>
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-11-07 11:30:45 +01:00
Karl Persson
78c849ac29
RBAC: Fetch service account permissions in oss ( #57343 )
2022-10-24 12:11:59 +02:00
Kristin Laemmert
05709ce411
chore: remove sqlstore & mockstore dependencies from (most) packages ( #57087 )
...
* chore: add alias for InitTestDB and Session
Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store.
* next pass of removing sqlstore imports
* last little bit
* remove mockstore where possible
2022-10-19 09:02:15 -04:00
Kristin Laemmert
c61b5e85b4
chore: replace sqlstore.Store with db.DB ( #57010 )
...
* chore: replace sqlstore.SQLStore with db.DB
* more post-sqlstore.SQLStore cleanup
2022-10-14 15:33:06 -04:00
Karl Persson
b827df626d
RBAC: Initiate store in service ( #55081 )
...
* RBAC: Dont inject store with wire
* RBAC: Use Store interface
* RBAC: Move store interface and initiate it from service
2022-09-15 11:34:15 +02:00
Karl Persson
870929b463
RBAC: Add cache for oss rbac permissions ( #55098 )
...
* RBAC: Add cache for oss permissions
* RBAC: include service account actions
* RBAC: revert changes to fetch service account permissions
* Update comment for setting
* RBAC: Disable permission chache for tests
2022-09-14 09:13:10 +02:00
Karl Persson
ff35e35ce0
RBAC: Move service and evaluator to acimpl package ( #54714 )
...
* RBAC: Move access control evaluator to acimpl package
* RBAC: Move service to acimpl package
2022-09-05 18:15:47 +02:00