This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
plugin.json templating enhancement (routing to "https://{ClientParams.dynamicServerUrl}/some/path") #27986
Labels
You can continue the conversation there. Go to discussion →
What would you like to be added:
It would be great if templating in
plugin.json
could be extended to support calling arbitrary endpoints.We're aware this is currently forbidden due to security, however in some cases this is needed.
For instance, currently one could use JsonData variables when specifiying the final URL (the proxy routes the traffic to):
https://login.microsoftonline.com/{{ .JsonData.tenantId }}/oauth2/v2.0/token
Note:
JsonData
is an object configured by the user via ConfigEditor:(example
plugin.json
of Azure Monitor datasource here)What we would like to be added is a possibility of sending some dynamic variables from the browser to Grafana proxy route (i.e. not only the ones configured via ConfigEditor), for instance a random server endpoint (https://abc.some-domain.com, or https://def.some-domain.com) used like this:
https://{ClientParams.serverUrl}/some/path
Yes, we're aware of the security applications, but this would not be a default behavior and would need to be enabled in Grafana configuration.
Why is this needed:
Currently, the only solution to this would be a proxy that needs to somehow get the information of the final server to call (via request headers for instance) and then this proxy would route to this server. However, this is not elegant and requires additional resources.
Together with a proxy in front of Grafana for resolving a TLS cypher order issue, this would mean running and maintaining 2 additional proxies, whereas this could possibly be solved by Grafana's own proxy.
Additional question: if we eventually implement this by modifying Grafana code, would this be considered as something that could be contributed to Grafana and accepted as a valid use case?
Thanks! 😄
The text was updated successfully, but these errors were encountered: