ES镜像开源用户认证

参考链接

填写信息如下图,收取邮件

  1. Download the zip file
  2. cd to the Elasticsearch home
  3. bin/elasticsearch-plugin install file:///download-folder/readonlyrest-1.19.3_es6.2.2.zip
  4. Edit readonlyrest.yml and add your configuration snippets. Also, refer to the official documentation.

[root@7d2590e1812d elasticsearch]# bin/elasticsearch-plugin install file:///usr/share/elasticsearch/data/readonlyrest-1.19.2_es6.3.2.zip
[root@7d2590e1812d elasticsearch]# vi config/elasticsearch.yml
[root@7d2590e1812d elasticsearch]# vi config/readonlyrest.yml
[root@7d2590e1812d elasticsearch]# cat config/elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0

# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1
xpack.security.enabled: false

[root@7d2590e1812d elasticsearch]# cat config/readonlyrest.yml
readonlyrest:
    access_control_rules:

    - name: "Require HTTP Basic Auth"
      type: allow
      auth_key: username:password