Skip to content
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

EntityOverviewDashboardViewer #81

Open
kerenbenzion opened this issue Nov 19, 2023 · 8 comments
Open

EntityOverviewDashboardViewer #81

kerenbenzion opened this issue Nov 19, 2023 · 8 comments

Comments

@kerenbenzion
Copy link

I am trying to use EntityOverviewDashboardViewer in order to view in my component a graph from grafana.
I managed to view the page of grafana after enabling allow_embedding = true in my grafana, but when I try to login to grafana it keeps sending me again to the login page even though the login was successful .

Important things to know:
I tried also to use port-forwarding for grafana and when I used it it worked but when I use the endpoint configured in the ingress it does not work.
Also., I have noticed that when I use the ingress I get reposnse 302 from grafana.
It is only happening when I try to use the backstage plugin. when I use it from browser everything is working as usual
Can you please assist ?

@KyryloKarpenko
Copy link

Hi @kerenbenzion, I am having the same issue. Have you found a solution?

@kerenbenzion
Copy link
Author

@KyryloKarpenko unfortunately not yet

@JulienKleinmann
Copy link

Hello @kerenbenzion @KyryloKarpenko,
same issue on my side, any news ?
also I do not see any error on dev tools network of my browser..
@K-Phoen any idea ?
kind regards,

@KyryloKarpenko
Copy link

Hi @JulienKleinmann, I didn't find any solution and still use EntityGrafanaDashboardsCard 😢

@JulienKleinmann
Copy link

JulienKleinmann commented Aug 7, 2024

Hello @KyryloKarpenko,
did some test on an isolated docker environment, seems to work if you have in your env or equivalent in grafana.ini :
GF_SECURITY_ALLOW_EMBEDDING=true
GF_SECURITY_COOKIE_SAMESITE=none
GF_SECURITY_COOKIE_SECURE=true
can you test on your side and confirm ? i used chrome, seems that if you are using edge it might be different settings.
kind regards,

@KyryloKarpenko
Copy link

Hi @JulienKleinmann, if I remember correctly, I initially did the same, but in grafana.ini:

        security:
          allow_embedding: true
          cookie_samesite: none
          cookie_secure: true

For me, there was the same problem as it is described in the issue.

@JulienKleinmann
Copy link

JulienKleinmann commented Aug 8, 2024

@KyryloKarpenko
definitely work on my side..
I guess you can try to align version with what I have, I have read somewhere that some grafana version might have this issue.

chrome version : Version 127.0.6533.89 (Official Build) (64-bit)
grafana version : Grafana v7.3.1 (6668161a88)

grafana config :

seems to be default of the image : docker-hub.pictet.com/grafana/grafana:7.3.1

also find that in my grafana.ini :
[auth.anonymous]
enabled = true

so did not pay to much attention but it actually does not ask me to login in the iframe and i see my dashboard but when i click login i am able to login.

@SuperCoolAlan
Copy link

SuperCoolAlan commented Nov 14, 2024

I was having this same issue until I tested in different browsers. We can embed a cross-domain iframe from Grafana and log in using Firefox, but not Chrome.

This led me to my partial solution:
grafana/grafana#25758

This may have to do with the Set-Cookie header containing something other than SameSite=None as reported by Chromium in the screenshot below. I assume Firefox ignores this directive and therefore applies the session token as a cookie which lets us log into Grafana as directed.
image

In case you can't see my screenshot, here's what my error from Chromium says:

This Set-Cookie header didn't speicfy a "SameSite" attribute and was defaulted to "SameSite=Lax," and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The Set-Cookie had to have been set with "SameSite=None" to enable cross-site usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants