grafana/pkg/services/accesscontrol
Alexander Zobnin 5d724c2482
Zanzana: Initial dashboard search (#93093)
* Zanzana: Search in a background and compare results

* refactor

* Search with check

* instrument zanzana client

* add single_read option

* refactor

* refactor move check into separate function

* Fix tests

* refactor

* refactor getFindDashboardsFn

* add resource type to span attributes

* run ListObjects concurrently

* Use list and search in less cases

* adjust metrics buckets

* refactor: move Check and ListObjects to AccessControl implementation

* Revert "Fix tests"

This reverts commit b0c2f072a2.

* refactor: use own types for Check and ListObjects inside accesscontrol package

* Fix search scenario with low limit and empty query string

* more accurate search with checks

* revert

* fix linter

* Revert "revert"

This reverts commit ee5f14eea8.

* add search errors metric

* fix query performance under some conditions

* simplify check strategy

* fix pagination

* refactor findDashboardsZanzanaList

* Iterate over multiple pages while making check request

* refactor listUserResources

* avoid unnecessary db call

* remove unused zclient

* Add notes for SkipAccessControlFilter

* use more accurate check loop

* always use check for search with provided UIDs

* rename single_read to zanzana_only_evaluation

* refactor

* update go workspace

* fix linter

* don't use deprecated fields

* refactor

* fail if no org specified

* refactor

* initial integration tests

* Fix tests

* fix linter errors

* fix linter

* Fix tests

* review suggestions

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* fix limit

* refactor

* refactor tests

* fix db config in tests

* fix migrator (postgres)

---------

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-10-04 12:27:10 +02:00
..
acimpl Zanzana: Initial dashboard search (#93093) 2024-10-04 12:27:10 +02:00
actest Zanzana: Initial dashboard search (#93093) 2024-10-04 12:27:10 +02:00
api Instrument tracing across dashboards (#91937) 2024-08-29 22:26:15 -08:00
database Revert read replica POC (#93551) 2024-09-25 15:21:39 -08:00
migrator Zanzana: Initial dashboard search (#93093) 2024-10-04 12:27:10 +02:00
mock Zanzana: Initial dashboard search (#93093) 2024-10-04 12:27:10 +02:00
ossaccesscontrol Folders: Set folder creation permission as part of legacy create (#94040) 2024-10-01 14:03:02 +02:00
permreg RBAC: FIX Allow specifying several valid scopes for a kind (#93176) 2024-09-10 17:22:40 +01:00
pluginutils Actionsets: Add ability for plugins to add actions for core actionsets (i.e. folders:edit) (#88776) 2024-07-19 16:16:23 +01:00
resourcepermissions Revert read replica POC (#93551) 2024-09-25 15:21:39 -08:00
ssoutils Auth: Improve /admin/authentication permission checks and include new SSO pages (#81183) 2024-01-25 11:13:24 +01:00
accesscontrol_test.go Add auth spans and remove deduplication code for scopes (#89804) 2024-07-02 22:08:57 -08:00
accesscontrol.go Zanzana: Initial dashboard search (#93093) 2024-10-04 12:27:10 +02:00
authorize_in_org_test.go RBAC: Fix an issue with server admins not being able to manage users in orgs that they don't belong to (#92024) 2024-08-22 10:04:06 +01:00
authorizer_test.go RBAC: Add legacy authorization checks to service accounts (#93753) 2024-09-27 15:53:11 +02:00
authorizer.go RBAC: Add legacy authorization checks to service accounts (#93753) 2024-09-27 15:53:11 +02:00
cacheutils_test.go RBAC: Optimize permissions caching (#92673) 2024-09-03 15:46:56 +02:00
cacheutils.go RBAC: Optimize permissions caching (#92673) 2024-09-03 15:46:56 +02:00
checker_test.go Chore: Fix goimports grouping (#62426) 2023-01-30 09:34:18 +01:00
checker.go RBAC: Add required component to perform access control checks for user api when running single tenant (#93104) 2024-09-23 11:26:44 +02:00
errors.go Actionsets: Add ability for plugins to add actions for core actionsets (i.e. folders:edit) (#88776) 2024-07-19 16:16:23 +01:00
evaluator_test.go RBAC: handle partially resolved scopes (#85323) 2024-03-28 10:08:07 +01:00
evaluator.go Instrument tracing across accesscontrol (#91864) 2024-08-16 14:08:19 -08:00
filter_bench_test.go Chore: Remove Result field from datasources (#63048) 2023-02-09 15:49:44 +01:00
filter_test.go Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
filter.go Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
metadata_bench_test.go Chore: Fix error handling in postDashboard, remove UserDisplayDTO, fix live redis client initialization (#87206) 2024-05-06 14:17:34 -04:00
metadata_test.go RBAC: Add function to generate wildcards from prefix (#54275) 2022-08-26 17:10:35 +02:00
metadata.go Instrument tracing across accesscontrol (#91864) 2024-08-16 14:08:19 -08:00
middleware_test.go Zanzana: Evaluate permissions alongside with RBAC engine (#90064) 2024-07-05 11:31:23 +02:00
middleware.go Auth: Use sessionStorage instead of cookie for automatic redirection (#92759) 2024-09-24 18:38:09 +02:00
models_test.go ExtSvcAuth: Assign roles locally (#78669) 2023-11-29 12:12:30 +01:00
models.go Zanzana: Initial dashboard search (#93093) 2024-10-04 12:27:10 +02:00
resolvers_test.go Chore: Fix goimports grouping (#62426) 2023-01-30 09:34:18 +01:00
resolvers.go Instrument tracing across accesscontrol (#91864) 2024-08-16 14:08:19 -08:00
roles_test.go AccessControl: Remove package lists for roles and grants (#47141) 2022-04-06 09:31:14 +02:00
roles.go Auth: Add LDAP scope to Grafana Admin (#92990) 2024-09-05 17:15:47 +01:00
scope_test.go RBAC: Add function to generate wildcards from prefix (#54275) 2022-08-26 17:10:35 +02:00
scope.go Zanzana: Evaluate permissions alongside with RBAC engine (#90064) 2024-07-05 11:31:23 +02:00