Within my web application, I’m trying to bypass the Grafana login page which is embedded in an iframe. My solution for this was to use Auth Proxy, but I’m still prompted to login when the iframe is loaded. These are my relevant settings:
allow_embedding = true
[auth.proxy]
enabled = true
enable_login_token = true
auto_sign_up = true
sync_ttl = 15
header_name = X-WEBAUTH-USER
header_property = username
[security]
cookie_secure = true
cookie_samesite = none
Using a very simple proxy (X-WEBAUTH-USER: “admin”), I can interact with the Grafana API (for example, /api/users) and receive user data. When interacting with /login, I successfully obtain a session token, which is confirmed when I log the info in the broswer console:
console.log(document.cookie);
Output: grafana_session_expiry=1732817959
Afterwards, I attempt to load the Grafana URL in the iframe (https://grafanainstance:PORT) but I’m always prompted to enter my credentials.
enable_login_token = true doesn’t seem to be working, or maybe I’m missing something else? Any help would be greatly appreciated. Thank you.