【入门篇】Elasticsearch、Kibana权限控制

本文档介绍了如何在Elasticsearch和Kibana中安装X-Pack进行权限控制,包括初始用户名密码、修改密码、角色设置、用户管理、字段级和文档级安全的配置。详细步骤从安装X-Pack到启用匿名访问,再到用户和角色的增删查改,提供了全面的权限控制入门指导。
摘要由CSDN通过智能技术生成

1、官方文档:https://www.elastic.co/guide/en/x-pack/current/index.html


2、Install X-Pack into Elasticsearch

  • bin/elasticsearch-plugin install x-pack

3、Start Elasticsearch

  • bin/elasticsearch

4、Install X-Pack into Kibana

  • bin/kibana-plugin install x-pack

5、Start Kibana

  • bin/kibana

6、初始用户名密码

    Navigate to Kibana at http://localhost:8601/. Log in as the built-in elastic user with the password changeme. (说白了就是初始用户名为elastic,密码为changeme)


7、修改密码

    修改elasticsearch密码:

curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -d '{
  "password" : "elastic"
}'

    修改kibana密码:修改之前需要在kibana.yml中配置elasticsearch的用户名和密码后才能需改密码,否则会报错。

# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
elasticsearch.username: "elastic"
elasticsearch.password: "your password"
curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/kibana/_password' -d '{
  "password" : "kibana"
}'

8、角色控制

kibana_user and monitoring_user roles.

curl -XPOST -u elastic 'localhost:9200/_xpack/security/role/events_admin' -d '{
  "indices" : [
    {
      "names" : [ "events*" ],
      "privileges" : [ "all" ]
    },
    {
      "names" : [ ".kibana*" ],
      "privileges" : [ "manage", "read", "index" ]
    }
  ]
}'
curl -XPOST -u elastic 'localhost:9200/_xpack/security/user/jack' -d '{
  "password" : "123456",
  "full_name" : "jack",
  "email" : "jack@163.com",
  "roles" : [ "events_admin" ]
}'

9、重置密码:https://www.elastic.co/guide/en/x-pack/current/security-api-users.html#security-api-reset-user-password


10、Enabling Anonymous Access

    Incoming requests are c

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值