Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin.json templating enhancement (routing to "https://{ClientParams.dynamicServerUrl}/some/path") #27986

Closed
dkozar opened this issue Oct 1, 2020 · 0 comments

Comments

@dkozar
Copy link

dkozar commented Oct 1, 2020

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:

image

(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! 😄

@grafana grafana locked and limited conversation to collaborators Aug 20, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants