Basic Auth and LDAP


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= time_ms=4 size=31

I’m using Grafana 4.3.1 and Centos 6.6/7.


What does your config look like? Have you enabled/disabled allow signup?

In LDAP section it’s Enabled. I made another test and I discovered, that I’m getting same error even with Basic auth only without LDAP enabled.

Do you allow signup in your config?

Yes it’s enabled in my config.

This is in my config. If you want some other parts just tell me. It’s too long to post it whole.

#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

enabled = true
config_file = /etc/grafana/ldap.toml
allow_sign_up = true

do you have any progress with this issue?