Auth proxy not working

Grafana v6.0.2 (commit: 3f4c2e7)
Ubuntu 18.04.1 LTS

grafana.ini:
[auth.proxy]
enabled = true
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = false
ldap_sync_ttl = 60
[users]
allow_sign_up = true
allow_org_create = false
auto_assign_org = true

api work ok:
request:
curl -H “X-WEBAUTH-USER: user2” http://host:3000/api/user
answer:
{“id”:8,“email”:“user2@localhost”,“name”:"",“login”:“user2”,“theme”:"",“orgId”:1,“isGrafanaAdmin”:false}

but web not working:
curl -H “X-WEBAUTH-USER: user2” http://host:3000/
answer like:

  1. This could be caused by your reverse proxy settings.
  2. If you host grafana under subpath make sure your grafana.ini root_url setting includes subpath
  3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build
  4. Sometimes restarting grafana-server can help

using nginx proxy, config:
proxy_set_header Host $host;
proxy_set_header X-WEBAUTH-USER $user;
proxy_set_header Authorization “”;

Logs grafana when using browser:
lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=GET path=/api/dashboards/home status=401 remote_addr=XXX time_ms=0 size=26 referer=“XXX”
lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=GET path=/api/login/ping status=401 remote_addr=XXX time_ms=0 size=26 referer=“XXX”
lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=GET path=/logout status=302 remote_addr=XXX time_ms=0 size=29 referer=“XXX”

What is a point of this config?

proxy_set_header Authorization “”;

Doc: Configure auth proxy authentication | Grafana documentation

The RequestHeader unset Authorization removes the Authorization header from the HTTP request before it is forwarded to Grafana. This ensures that Grafana does not try to authenticate the user using these credentials (BasicAuth is a supported authentication handler in Grafana).

That isn’t unset, but set to empty value.

With this line or without it does not work, its from example.

The main problem is that Auth proxy does not work with and without nginx

Tested other versions:

Auth proxy working OK:
5.4.3

Auth proxy not working:
6.0.2
6.1.0-9a7577a1pre
6.1.0-beta1

I tested on my 6.0.2 with ubuntu 16.04 and 18.04 and work

Hi Sir,

With iframe Nginx rever proxy auto login is not work. if you could guide me it will be greate.

Hi Sir,
Auth proxy how to add the View or Edit access to the user dynamically?