二. Elasticsearch 7.7.0使用xpack认证
Elasticsearch 7.7.0使用xpack认证
一. 证书配置: (证书需放至各Node的config目录下)
$ cd /opt/elasticsearch/ $ ./bin/elasticsearch-certutil ca $ ./bin/elasticsearch-certutil cert -ca elastic-stack-ca.p12 $ mv elastic-stack-ca.p12 config/ $ mv elastic-certificates.p12 config/
二. 修改各Node配置文件:
$ grep -E -v "^#|^$" config/elasticsearch.yml cluster.name: my-es node.name: node-0 path.data: /opt/elasticsearch/data path.logs: /opt/elasticsearch/logs network.host: 192.168.3.120 http.port: 9200 transport.tcp.port: 9300 transport.tcp.compress: true discovery.seed_hosts: ["docker0","docker1","docker2"] cluster.initial_master_nodes: ["node-0","node-1", "node-2"] xpack.security.enabled: true xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.transport.ssl.keystore.path: /opt/elasticsearch/config/elastic-certificates.p12 xpack.security.transport.ssl.truststore.path: /opt/elasticsearch/config/elastic-certificates.p12
三. 启动ES,设置内置账号密码:
各节点启动
$ ./bin/elasticsearch -d
节点启动后在其中一台Node上设置内置账号密码
$ ./bin/elasticsearch-setup-passwords interactive
测试
curl -XGET -u elastic http://192.168.3.120:9200/text/name/1 Enter host password for user ‘elastic‘: {"_index":"text","_type":"name","_id":"1","_version":2,"_seq_no":1,"_primary_term":5,"found":true,"_source": { "name":"Laoluo" }}
- 修改elastic账户密码:
curl -H "Content-Type: application/json" -XPUT -u elastic:YourOldPWD ‘http://192.168.3.120:9200/_xpack/security/user/elastic/_password‘ -d ‘{ "password" : "YourNewPWD" }‘
开启认证后,beat,logstash,kibana连接es以及访问es都需要认证。
相关推荐
newbornzhao 2020-09-14
做对一件事很重要 2020-09-07
renjinlong 2020-09-03
明瞳 2020-08-19
李玉志 2020-08-19
mengyue 2020-08-07
molong0 2020-08-06
AFei00 2020-08-03
molong0 2020-08-03
wenwentana 2020-08-03
YYDU 2020-08-03
另外一部分,则需要先做聚类、分类处理,将聚合出的分类结果存入ES集群的聚类索引中。数据处理层的聚合结果存入ES中的指定索引,同时将每个聚合主题相关的数据存入每个document下面的某个field下。
sifeimeng 2020-08-03
心丨悦 2020-08-03
liangwenrong 2020-07-31
sifeimeng 2020-08-01
mengyue 2020-07-30
tigercn 2020-07-29
IceStreamLab 2020-07-29