Shared Azure middleware between Azure Monitor and Prometheus datasources (#46002)

* Scopes in Azure middleware

* Enable Azure middleware without feature flag

* Use common Azure middleware in Azure Monitor

* Apply feature flag to JsonData configuration of Azure auth

* Enforce feature flag in Prometheus datasource

* Prometheus provider tests

* Datasource service tests

* Fix http client provider tests

* Pass sdkhttpclient.Options by reference

* Add middleware to httpclient.Options

* Remove dependency on Grafana settings

* Unit-tests updated

* Fix ds_proxy_test

* Fix service_test
This commit is contained in:
Sergey Kostrukov
2022-04-01 04:26:49 -07:00
committed by GitHub
parent 16db1ad46d
commit 656ade9884
39 changed files with 729 additions and 434 deletions

View File

@@ -20,7 +20,7 @@ var (
},
{
Name: "httpclientprovider_azure_auth",
Description: "use http client for azure auth",
Description: "Experimental. Allow datasources to configure Azure authentication directly via JsonData",
State: FeatureStateBeta,
},
{
@@ -112,7 +112,7 @@ var (
},
{
Name: "prometheus_azure_auth",
Description: "Use azure authentication for prometheus datasource",
Description: "Experimental. Azure authentication for Prometheus datasource",
State: FeatureStateBeta,
},
{

View File

@@ -16,7 +16,7 @@ const (
FlagEnvelopeEncryption = "envelopeEncryption"
// FlagHttpclientproviderAzureAuth
// use http client for azure auth
// Experimental. Allow datasources to configure Azure authentication directly via JsonData
FlagHttpclientproviderAzureAuth = "httpclientprovider_azure_auth"
// FlagServiceAccounts
@@ -84,7 +84,7 @@ const (
FlagAccesscontrolBuiltins = "accesscontrol-builtins"
// FlagPrometheusAzureAuth
// Use azure authentication for prometheus datasource
// Experimental. Azure authentication for Prometheus datasource
FlagPrometheusAzureAuth = "prometheus_azure_auth"
// FlagInfluxdbBackendMigration