grafana/pkg/plugins
Marcus Efraimsson 6dbe3b555f
Plugins: Refactor forward of cookies, OAuth token and header modifications by introducing client middlewares (#58132)
Adding support for backend plugin client middlewares. This allows headers in outgoing 
backend plugin and HTTP requests to be modified using client middlewares.

The following client middlewares added:
Forward cookies: Will forward incoming HTTP request Cookies to outgoing plugins.Client 
and HTTP requests if the datasource has enabled forwarding of cookies (keepCookies).
Forward OAuth token: Will set OAuth token headers on outgoing plugins.Client and HTTP 
requests if the datasource has enabled Forward OAuth Identity (oauthPassThru).
Clear auth headers: Will clear any outgoing HTTP headers that was part of the incoming 
HTTP request and used when authenticating to Grafana.
The current suggested way to register client middlewares is to have a separate package, 
pluginsintegration, responsible for bootstrap/instantiate the backend plugin client with 
middlewares and/or longer term bootstrap/instantiate plugin management. 

Fixes #54135
Related to #47734
Related to #57870
Related to #41623
Related to #57065
2022-12-01 19:08:36 +01:00
..
adapters Move SignedInUser to user service and RoleType and Roles to org (#53445) 2022-08-10 11:56:48 +02:00
backendplugin Instrumentation: Log plugin and datasource info for each plugin request. (#54769) 2022-11-02 14:51:51 +01:00
config Instrumentation: Log plugin and datasource info for each plugin request. (#54769) 2022-11-02 14:51:51 +01:00
logger Plugins: Create single point of entry for adding / removing plugins (#55463) 2022-09-23 14:27:01 +02:00
manager Plugins: Refactor forward of cookies, OAuth token and header modifications by introducing client middlewares (#58132) 2022-12-01 19:08:36 +01:00
pfs Perfomance: add preallocation for some slices (#59263) 2022-11-28 13:10:24 +01:00
plugincontext Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
plugindef Heatmap: Remove legacy angular based implementation (#59249) 2022-11-23 10:46:21 -08:00
repo Plugins: Refactor plugin download/installation (#43046) 2022-08-23 11:50:50 +02:00
storage Perfomance: add preallocation for some slices (#59263) 2022-11-28 13:10:24 +01:00
accesscontrol.go RBAC: Add permissions to install and configure plugins (#51829) 2022-09-09 09:44:50 +02:00
errors.go Plugins: Use error plane for api/ds/query (#54750) 2022-09-14 18:19:57 +02:00
fakes.go NavTree: Make it possible to configure where in nav tree plugins live (#55484) 2022-09-28 08:29:35 +02:00
ifaces.go Plugins: Refactor forward of cookies, OAuth token and header modifications by introducing client middlewares (#58132) 2022-12-01 19:08:36 +01:00
models.go RBAC: Cover plugin includes (#57582) 2022-11-16 15:54:04 +01:00
plugins.go RBAC: Allow role registration for plugins (#57387) 2022-11-07 11:30:45 +01:00