grafana-json-datasource icon indicating copy to clipboard operation
grafana-json-datasource copied to clipboard

Allowed cookies does not work

Open ChamXE opened this issue 2 years ago • 2 comments

I am using JSON API (Ver: 1.3.2) with Express.js to request data from the backend, the grafana_session cookie is needed for some processing. However, when using Grafana version 9.2.6, the allowed cookies are not included in the request.

I have used cookieParser so it shouldn't be an issue with my backend. After testing, I figured out that from Grafana 9.1.8 until the latest version (9.3.1 for now), the allowed cookies function does not work. Also tested with older versions (1.2.1, 1.3.0) of this plugin, it doesn't work either.

Below is an image of me printing out the cookies in the request, which you can see is null.

image

ChamXE avatar Dec 09 '22 00:12 ChamXE

@ChamXE, I just looked into grafana's source code, and they remove the possibility to pass the grafana_session cookie.

GuYounes avatar Feb 24 '23 15:02 GuYounes

I was looking into this, and I can confirm that possibility to pass the grafana_session cookie was removed here https://github.com/grafana/grafana/commit/4539c33fce5ef23badb08ebcbc09cb0cecb1f539

rvangsgaard avatar Aug 23 '23 14:08 rvangsgaard

hi @ChamXE as others explained, this is not possible anymore, for security reasons.

gabor avatar May 24 '24 13:05 gabor