Authentication error when accessing provisioned data source using proxy

  • What Grafana version and what operating system are you using?
    Grafana v10.4.8 on Ubuntu 20.04.6

  • What are you trying to achieve?
    Use a provisioned OpenSearch data source. Opensearch is running on the same machine as Grafana.

  • How are you trying to achieve it?
    If I use the datasource API to access the data source without a proxy, it works, or at least returns the datasource information:

curl --insecure -GET http://localhost:3000/api/datasources/uid/f990c0c6-a920-41c2-8b3e-a43e6ff9234a/
{"id":36,"uid":"f990c0c6-a920-41c2-8b3e-a43e6ff9234a","orgId":1,"name":"perfSONAR Local","type":"grafana-opensearch-datasource","typeLogoUrl":"public/plugins/grafana-opensearch-datasource/img/logo.svg","access":"proxy","url":"https://localhost/opensearch","user":"","database":"","basicAuth":false,"basicAuthUser":"","withCredentials":false,"isDefault":true,"jsonData":{"database":"pscheduler*","flavor":"opensearch","maxConcurrentShardRequests":5,"pplEnabled":true,"timeField":"pscheduler.start_time","tlsAuth":false,"tlsSkipVerify":true,"version":"2.6.0"},"secureJsonFields":{},"version":1,"readOnly":true}
  • What happened?
    If I use the proxy, however, which should mimic the behavior of the dashboards using this datasource, I get an error:
curl --insecure -GET http://localhost:3000/api/datasources/proxy/uid/f990c0c6-a920-41c2-8b3e-a43e6ff9234a/
Authentication to data source failed
  • What did you expect to happen?
    I expected to get the data that the datasource is supposed to supply. The “Authentication to data source failed” error is also visible on the web interface. When I load it, I get the following error:
    Templating [node_name]
    Error updating options: OpenSearch error: Authentication to data source failed

  • Can you copy/paste the configuration(s) that you are having problems with?
    The provisioned datasource configuration can be seen above, in the API response.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    The above error is observed in the UI. The “Authentication to data source failed” error is the only one I observe in the log file, even with logging set to debug. Immediately before this error, I do see several messages saying

logger=folder.permissions t=2024-12-18T00:40:20.597400744Z level=debug msg="Access denied to folder" namespaceID=anonymous userId= orgID=1 uid=e65dd0fc-fd6d-45c2-a8bb-f6df1186cf66 permissions="all(action:folders.permissions:read scopes:folders:uid:e65dd0fc-fd6d-45c2-a8bb-f6df1186cf66 action:folders.permissions:write scopes:folders:uid:e65dd0fc-fd6d-45c2-a8bb-f6df1186cf66)"

However, I’m not sure if this is relevant. If I explicitly perform the curl command using the admin user, the same authentication error is observed.

  • Did you follow any online instructions? If so, what is the URL?
    No, but I didn’t come up with this myself, the setup is part of the Perfsonar traffic monitoring package