grafana/pkg/infra
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
..
appcontext Chore: Add appcontext.WithUser and appcontext.User (#57534) 2022-10-25 07:51:24 -04:00
db Chore: Add Quote function in DB (#58594) 2022-11-23 18:40:58 +01:00
filestorage chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
fs Chore: Upgrade Go to 1.19.1 (#54902) 2022-09-12 12:03:49 +02:00
grn EntityStore: Rename ObjectStore to EntityStore (part 1) (#59613) 2022-11-30 13:42:42 -08:00
httpclient Plugins: Refactor forward of cookies, OAuth token and header modifications by introducing client middlewares (#58132) 2022-12-01 19:08:36 +01:00
kvstore chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
localcache Migrate to Wire for dependency injection (#32289) 2021-08-25 15:11:22 +02:00
log Logging: Introduce API for contextual logging (#55198) 2022-09-20 18:32:06 +02:00
metrics metrics: expose when the binary was built as an gauge (#57951) 2022-11-01 13:00:47 +01:00
network Backend: fix IPv6 address parsing erroneous (#28585) 2020-11-25 07:55:22 +01:00
process PluginsCatalog: adding error information about disabled plugins. (#39171) 2021-09-20 09:08:00 +02:00
remotecache chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
serverlock Chore: Extract server lock error so it can be used with errors.As (#58899) 2022-11-17 15:02:17 +01:00
slugify Slugify: Replace gosimple/slug with a simple function (#59517) 2022-11-30 11:12:56 -05:00
tracing Tracing: Fix bug where errors are not reported to OTel (#55925) 2022-09-28 15:54:47 +02:00
usagestats Chore: Move stats service into a standalone packge from sqlstore (#59574) 2022-11-30 18:11:07 +01:00
x/persistentcollection Chore: Persistent collection (#56074) 2022-09-30 21:34:44 +04:00