grafana/pkg/services/datasources
Eric Leijonmarck be5ba68132
Team LBAC: Add teamHeaders for datasource proxy requests (#76339)
* Add teamHeaders for datasource proxy requests

* adds validation for the teamHeaders

* added tests for applying teamHeaders

* remove previous implementation

* validation for header values being set to authproxy

* removed unnecessary checks

* newline

* Add middleware for injecting headers on the data source backend

* renamed feature toggle

* Get user teams from context

* Fix feature toggle name

* added test for validation of the auth headers and fixed evaluation to cover headers

* renaming of teamHeaders to teamHTTPHeaders

* use of header set for non-existing header and add for existing headers

* moves types into datasources

* fixed unchecked errors

* Refactor

* Add tests for data model

* Update pkg/api/datasources.go

Co-authored-by: Victor Cinaglia <victor@grafana.com>

* Update pkg/api/datasources.go

Co-authored-by: Victor Cinaglia <victor@grafana.com>

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
Co-authored-by: Victor Cinaglia <victor@grafana.com>
2023-10-17 11:23:54 +01:00
..
fakes Replace signed in user for identity.requester (#74048) 2023-08-30 16:51:18 +02:00
guardian Replace signed in user for identity.requester (#74048) 2023-08-30 16:51:18 +02:00
service Chore: Adapt GetDataSourcesByType to plugins with aliases (#76637) 2023-10-17 11:09:56 +02:00
accesscontrol.go Connections: Align permissions for Connections page (#60725) 2023-01-06 03:11:27 -05:00
datasources.go Replace signed in user for identity.requester (#74048) 2023-08-30 16:51:18 +02:00
errors.go Chore: Add errutils helpers (#73577) 2023-08-22 12:52:24 +02:00
models_test.go Team LBAC: Add teamHeaders for datasource proxy requests (#76339) 2023-10-17 11:23:54 +01:00
models.go Team LBAC: Add teamHeaders for datasource proxy requests (#76339) 2023-10-17 11:23:54 +01:00