1. 安全配置
原文链接 : https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html
译文链接 : http://www.apache.wiki/pages/viewpage.action?pageId=9406540
校对 : misaka nagisa
有一些设置是敏感的,通过文件系统的权限来保护是不足够的。基于这种场景,elasticsearch提供了一个keystore,可以通过密码保护。elasticsearch-keystore
就是用来管理与设置keystore的工具。
所有的指令都必须使用运行elasticsearch的用户来执行。
只有部分设置被设计为从keystore读取。请一一参阅设置项文档,以查看其是否为keystore支持的那部分设置。
1.1. 创建keystore
使用create
指令来创建elasticsearch.keystore
:
bin/elasticsearch-keystore create
elasticsearch.keystore
文件将被创建在elasticsearch.yml
文件的旁边。
1.2. 列出keystore的配置
使用list
指令来列出elasticsearch.keystore
的设置:
bin/elasticsearch-keystore list
1.3. 添加一个String设置
一些敏感的字符串,像云平台插件的一个认真参数,可以通过add
指令来添加:
bin/elasticsearch-keystore add the.setting.name.to.set
工具将提示这个值得设置。如果要通过控制台展示,使用--stdin
参数:
cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set
1.4. 删除设置
使用remove
指令来从keystore
中删除配置:
bin/elasticsearch-keystore remove the.setting.name.to.remove