Auto Auth for kibana visualization using Nginx not working

Hi im trying to use nginx to auto authenticate in kibana shared visualizations and it isnt working.

Im on a centos 8, installed nginx, installed httpd-tools ,I create a folder called: sites-available, with a filed called: default on it, wich contains this code:

server {
listen 80;
    server_name _;
    auth_basic "Restricted Access";
    auth_basic_user_file /etc/nginx/htpasswd.users;

    location / {
        proxy_pass http://localhost:5601;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

}

Created a user and a password with this commands

sudo sh -c "echo -n 'sammy:' >> /etc/nginx/.htpasswd"

sudo sh -c "openssl passwd -apr1 >> /etc/nginx/.htpasswd"

In my kibana.yml I have this line:

server.host: "localhost"

started nginx, load the shared visualization in browser, but the login page keeps on showing. what Im doing wrong?

Hi @Incauto
I'm sorry for the very late reply, was you able to solve the issue by your own?
If so, it will be great if you can post the solution there, if not I'm more then happy to help you on this

Thank you

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.