I’m trying to configure Basic Auth and LDAP. Basic auth is connected to same LDAP as Grafana. User authorizes through Basic authentication, credentials are passed to grafana. Grafana verifies credentials againts LDAP and user is automatically logged in.
It’s working quite well, except one case. When user has never been logged. Basic auth prompts user for credentials and then browser returns error: {“message”:“Basic auth failed”}.
Grafana log file:
t=2017-09-05T09:40:17+0200 lvl=eror msg=“Basic auth failed” logger=context error="User not found"
t=2017-09-05T09:40:17+0200 lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=GET path=/ status=401 remote_addr=192.168.3.12 time_ms=4 size=31
This is in my config. If you want some other parts just tell me. It’s too long to post it whole.
[users] #disable user signup / registration
allow_sign_up = true #Allow non admin users to create organizations
allow_org_create = false #Set to true to automatically assign new users to the default organization (id 1)
auto_assign_org = true