Just wanted to state i was able to reproduce this issue, with both http and https endpoints using a generic iframe element.
Let me do some digging and see if this is natively possible or if we might need to use a plugin. i feel like it used to work for some reason
That’s because you didn’t disable html sanitization = dangerous html tags won’t be implemented as html, but as a string only.
Grafana config has sections, so those configs options must be in the right sections, not in random place.
Page, which you are embedding may reject embedding (there are special headers, which are interpreted by browser, so browser will know that page owner didn’t allow embedding):
Ahhh you are right! its been a long time since ive wanted/needed to embed anything into grafana, forgot all about that setting around html sanitization. OP that should 100% solve youre issue as i just tested on my test instance and it worked appropriately
so I need to understand do I need to update the page which I am embedding in grafana with this Content-Security-Policy to frame-ancestors or it can be done in grafana configurations file.
For example you want to have your grafana in some iframe: you neee to allow emebeding in grafana config - that will configure all headers, so browser will not reject embedding.
But you can’t allow embedding of any other sites in grafana config. E. g. google.com may have headers, which reject embedding and you can’t configure Grafana to override that. That will be security issue.
ok. so what I understood is as per my requirement I need to embed a iframe in Grafana, so I need to allow embedding that external page and add a meta configuration like
Just try, test it and improvement it until you have desired result.
There is many variables which may affect it. You mentioned only CSP, but there can be also headers, which may block it.
How can someone tell you if it will be working, when we don’t know which site/page you are embedding, which headers are there, how csp is configured, which browsers you have, how auth is configured there,
…?