Hi all,
I cannot wrap my head around data source authentication/authorization and hope to get some ideas where I went wrong or whether I misunderstood the way Grafana works in that regards. Anyways, I need some directions.
-
What Grafana version and what operating system are you using?
version=9.5.2, running in docker on ubuntu host -
What are you trying to achieve?
I want to consume a JSON API data source (via marcusolsson-json-datasource) that request oauth authentication/authorization (using client_credentials). -
How are you trying to achieve it?
After reading in the grafana documentation, I supposed that I could use the data source proxy to add a route. I went to the plugin directory and modified plugin.json to contain a “routes” attribute. -
What happened?
If I modify the plugin.json file, then the plugin is not loaded at all. Following messages show up in the logs:- plugin file checksum does not match signature checksum
- Skipping loading plugin due to problem with signature
-
What did you expect to happen?
I expected the plugin to load properly and to route my request via the data source proxy to retrieve an oauth-token before accessing the api. -
Can you copy/paste the configuration(s) that you are having problems with?
modified plugin.json in the plugins/marcusolsson-json-datasource directory like this:
"routes": [
{
"path": "api",
"url": "https://api.example.com/v1",
"tokenAuth": {
"url": "https://api.example.com/v1/oauth/token",
"params": {
"grant_type": "client_credentials",
"client_id": "my_client_id",
"client_secret": "my_client_secret"
}
}
}
]
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
- plugin file checksum does not match signature checksum
- Skipping loading plugin due to problem with signature
-
Did you follow any online instructions? If so, what is the URL?
Add authentication for data source plugins | Grafana documentation
Thanks a lot!