如何在kibana中设置身份验证

问题描述 投票:35回答:5

是否可以在Kibana中启用身份验证,以限制对特定用户只能访问的仪表板的访问?

kibana kibana-4
5个回答
31
投票

Kibana本身不支持身份验证或限制对仪表板的访问。

您可以使用nginx作为Kibana前面的代理来限制对Kibana 4的访问,如下所述:https://serverfault.com/a/345244。只需将proxy_pass设置为端口5601,并在防火墙上为其他端口禁用此端口。这将完全启用或禁用Kibana。

Elastic还有一个名为Shield的工具,可以让您管理elasticsearch的安全性。使用Shield,您可以例如允许某人使用只读权限分析特定索引中的数据。 https://www.elastic.co/products/shield


编辑:Elastic在github上有一个issue,他们建议使用Shield。

  1. these instructions之后安装Shield(elasticsearch的插件)
  2. Configure roles为Kibana用户
  3. Configure Kibana与Shield合作

记住Shield只提供索引级访问控制。这意味着用户A将能够看到所有仪表板,但其中一些将是空的(因为他无法访问所有索引)。


11
投票

检查这个名为elasticsearch-readonlyrest的插件。它允许通过身份验证或ip / network,x-forwarded-for标头轻松访问控制,并允许用户在kibana中设置读写或只读访问,并限制每个用户的索引访问。设置简单,应该为大多数人提供足够的控制。

如果需要更多的控制,你可以使用search-guard,盾牌的免费替代品。


3
投票

Kibana4目前不支持此功能。


0
投票

我通过安装haproxy实现了身份验证。

  1. 在当地限制kibana

$ Sudoku / tc tc /ば/ /ばな。阳明海运

server.host: "localhost"

2.在安装kibana的同一台机器上安装haproxy

$ sudo apt update && sudo apt install haproxy

$ Sudano /えtc /是pろxy /是pはxy。 CFG

global
log /dev/log    local0
log /dev/log    local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private

# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL). This list is from:
#  https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3

defaults
log global
mode    http
option  httplog
option  dontlognull
    timeout connect 10m
    timeout client  10m
    timeout server  10m
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http

userlist UsersFor_Kibana
    user kibana insecure-password myPASSWORD

frontend localnodes
     bind *:80 
     mode http
     default_backend nodes

backend nodes 
   acl AuthOkay_Kibana http_auth(UsersFor_Kibana) 
   http-request auth realm Kibana if !AuthOkay_Kibana
   mode http
   balance roundrobin
   option forwardfor
   http-request set-header X-Forwarded-Port %[dst_port]
   http-request add-header X-Forwarded-Proto https if { ssl_fc }
   option httpchk HEAD / HTTP/1.1\r\nHost:localhost
   server server1 127.0.0.1:5601 check

用户名: - “kibana”密码: - “myPASSWORD”

当您浏览http://IP:80时,会出现一个弹出窗口进行身份验证。


0
投票

老问题,但我想补充说,有来自aws的elk的开源版本。您可以在elastic.co的版本中使用该插件。 https://github.com/opendistro-for-elasticsearch/security

© www.soinside.com 2019 - 2024. All rights reserved.