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

Not pressing "Log in" for local auth #69

Open
David-Igou opened this issue Mar 3, 2022 · 5 comments
Open

Not pressing "Log in" for local auth #69

David-Igou opened this issue Mar 3, 2022 · 5 comments
Labels

Comments

@David-Igou
Copy link

What I expect to happen: I run /usr/bin/grafana-kiosk -c /home/pi/grafana-kiosk/grafana-kiosk-config.yaml and grafana-kiosk opens chromium and logs into my instance of grafana.

What happens: Chromium loads as fullscreen as expected, it loads my grafana login page, and then enters the login and password. But it does not log in

System: Raspberry Pi Zero 1.1 running latest Raspberry Pi OS Lite, Openbox
Grafana version: grafana/grafana:8.3.4 - deployed via kube-prometheus
config:

general:
  kiosk-mode: full
  autofit: true
  lxde: false

target:
  login-method: local
  username: mygrafanaadmin
  password: changeme
  playlist: false
  URL: https://user:password@grafana.myroute
  ignore-certificate-errors: false

My instance of grafana is behind a basic htpasswd ingress + it does local login. Not sure if that's relevant, but I've recreated this issue with and without it.

Let me know any other information I can provide

@David-Igou
Copy link
Author

Just for clarity, this is what my kiosk hangs at:
image

@briangann
Copy link
Collaborator

i'm currently running on 8.3.3, will update to 8.3.4 and try to repro (latest v8.3 is 8.3.7 and 8.4 is at 8.4.3)

@briangann
Copy link
Collaborator

just tried against v8.3.4 and it worked ok with local login, are you using the v1.0.4 build from here or building yourself?

@David-Igou
Copy link
Author

So after investigating, this error is mainly a grafana issue but there are some issues with grafana-kiosk not recognizing certain variables that made it way more difficult to troubleshoot.

I don't know what's causing my error, but it's likely that it has something to do with my ingress controller or how my grafana instance is receiving traffic. When I kubectl port-forward and run grafana-kiosk against that it works.. so it's something on that end

Some issues I did face that might warrant their own separate issue is that a number of parameters just.. aren't recognized by grafana-kiosk? Maybe this is an OSX issue?

➜  ~ cat kiosk-config.yaml 
general:
  kiosk-mode: tv
  autofit: true

target:
  login-method: local
  playlist: true
  URL: myurl.com/d/playlist
  ignore-certificate-errors: true
➜  ~ ./grafana-kiosk.darwin.amd64 -c kiosk-config.yaml
2022/03/11 09:20:30 Using config from kiosk-config.yaml
2022/03/11 09:20:30 AutoFit: false
2022/03/11 09:20:30 LXDEEnabled: false
2022/03/11 09:20:30 LXDEHome: /home/pi
2022/03/11 09:20:30 Mode: full
2022/03/11 09:20:30 WindowPosition: 0,0
[etc]

So.. I actually found a workaround with settings that avoid this error, but is only working with flags. The config file option just ignores some options, and I didn't realize some of my settings weren't actually being set via the config.yaml for awhile

@briangann
Copy link
Collaborator

I'll review the config/env/flag issues, it does look like some were missed.

the key for login detection is the pattern matching, if the ingress is doing any kind of rewrite it may not work. there was a change between v6 and v7 also that caused this to break detection of the login page.

@github-actions github-actions bot added the stale label Mar 7, 2023
@briangann briangann added no stalebot exempt from stale bot and removed stale labels Mar 7, 2023
@briangann briangann added this to To do in grafana-kiosk Mar 7, 2024
@briangann briangann moved this from To do to In progress in grafana-kiosk Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
grafana-kiosk
  
In progress
Development

No branches or pull requests

2 participants