elasticsearch验证模块x-pack
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elasticsearch验证模块x-pack相关的知识,希望对你有一定的参考价值。
安装模块bin/elasticsearch-plugin install x-pack --batch
也可以直接下载模块
bin/elasticsearch-plugin install file://usr/local/src/x-pack.5.1.zip --batch
当然kibana也可以安装
bin/kibana-plugin install x-pack --batch
配置elasticsearch.yaml
xpack.security.enabled:(true/false) 是否开启安全验证
xpack.monitoring.enabled 是否开启监控
xpack.graph.enabled 是否开启图形
xpack.watcher.enabled 是否开启watcher 仅仅es配置
xpack.reporting.enabled 是否开启报表仅仅kibana配置
在ES 5.4版本参数
xpack.security.enabled: true
xpack.monitoring.enabled: false
xpack.graph.enabled: false
xpack.watcher.enabled: false
xpack.reporting.enabled: false
默认登录密码
user:elastic
password: changeme
修改密码
curl -XPUT 'localhost:9200/_xpack/security/user/elastic/_password?pretty' -d' { "password": "elasticpassword" }'
curl -XPUT 'localhost:9200/_xpack/security/user/kibana/_password?pretty' -d'
{
"password": "kibanapassword"
}'
添加新用户
curl -XPOST 'localhost:9200/_xpack/security/user/jacknich?pretty' -d'
{
"password" : "[email protected]",
"roles" : [ "admin", "other_role1" ],
"full_name" : "Jack Nicholson",
"email" : "[email protected]",
"metadata" : {
"intelligence" : 7
},
"enabled": true
}'
删除用户
curl -XDELETE 'localhost:9200/_xpack/security/user/jacknich?pretty'
以上是关于elasticsearch验证模块x-pack的主要内容,如果未能解决你的问题,请参考以下文章
python使用elasticsearch模块操作elasticsearch
Elasticsearch:配置 TLS/SSL 和 PKI 身份验证