Elasticsearch简单入门--安全设置

Secure Setting (安全设置)

有些设置是敏感的,仅依靠文件系统权限去保护他们的值是不够,Elasticsearch提供了一个秘钥库,并且 elasticsearch-keystore

工具可以管理在秘钥库中的设置项。

Note

All commands here should be run as the user which will run elasticsearch.

这里所有的命令都应该被启动elasticsearch的用户来运行

Note

Only some settings are designed to be read from the keystore. See documentation for each setting to see if it is supported as part of the keystore.

只有一些设置被设计为从密钥库读取。请参阅每个设置的文档,查看是否支持将其作为密钥存储库的一部分。

Note

All the modifications to the keystore take affect only after restarting Elasticsearch.

所有对秘钥库的修改只有在重启Elasticsearch之后才会生效

Note

The elasticsearch keystore currently only provides obfuscation. In the future, password protection will be added.

目前Elasticsearch秘钥库只提供模糊处理,以后,将会增加密码保护

 1. Creating the keystore 创建秘钥库

使用create命令去创建elasticsearch.keystore

./bin/elasticsearch-keystore create

文件elasticsearch-keystore将在elasticsearch.yml旁边被创建。

2. Listing settings in the keystore 列出秘钥库中的设置

秘钥库中的设置列表可通过list命令

./bin/elasticsearch-keystore list

3. Adding string settings  添加字符串设置

敏感的字符串设置,像云插件的身份验证凭证一样,可以使用add命令添加:

bin/elasticsearch-keystore add the.setting.name.to.set

该工具将提示设置的值。要通过stdin传递值,使用——stdin标志:

cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set

4. 移除设置项

从秘钥库中移除设置项,可以使用remove命令

bin/elasticsearch-keystore remove the.setting.name.to.remove

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值