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" : "j@rV1s",
"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