Strongly-typed AzureCredentials in httpclient.Options #37044
Replies: 1 comment
-
@kostrse Thanks for the PR - it's been merged and should be available in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
PR #36932 adds experimental support for Azure authentication directly into
httpclientprovider
to make it possible for any datasource to activate it by providing proper settings viahttpclient.Options
.Currently, since
httpclient.Options
does not provide any strongly-typed configuration for Azure, theCustomOptions
key-value bag is used to pass the needed settings.AzureCredentials in httpclient.Options
The proposal is to add strongly-typed configuration for Azure credentials into the
httpclient.Options
structure, similar toBasicAuth
,SigV4
etc.httpclient.Options
is part of Grafana Plugin SDK.Dependencies between packages
Currently, there are two Azure packages which are candidates to be moved out of Grafana codebase into a separate repo grafana-azure-sdk-go:
azcredentials - contains only definitions of
AzureCredentials
type and builders/constructors. Doesn't have any implementation and doesn't have any dependencies. Intended only for interfaces / models.aztokenprovider - contains actual implementation of token provider, middleware. Has dependencies on Grafana, Grafana SDK and other libraries like Azure SDK for Go etc.
To reference
AzureCredentials
inhttpclient.Options
, Grafana Plugin SDK (grafana-plugin-sdk-go
) would need to have dependency on thegithub.com/grafana/grafana-azure-sdk-go/pkg/azcredentials
package which contains definition ofAzureCredentials
.The
aztokenprovider
would have dependency onazcredentials
andgrafana-plugin-sdk-go
:azcredentials
⬅️grafana-plugin-sdk-go
⬅️aztokenprovider
⬅️ Grafana / pluginsAlternative option is to eliminate
azcredentials
, add definition ofAzureCredentials
directly into Grafana Plugin SDK:grafana-plugin-sdk-go
⬅️aztokenprovider
⬅️ Grafana / pluginsRelated work
TBD
Beta Was this translation helpful? Give feedback.
All reactions