Elasticsearch 7.8 開啟用戶名密碼認證


最近工作中安裝了es7.8. 我只是安裝使用了。並沒有設置密碼。結果安全掃描到了。需要設置密碼。
so。找到了這篇https://www.chengxulvtu.com/elasticsearch-7-8-enable-password-authentication/
下面也記錄下。

1.在 elasticsearch.yml 中添加如下配置

# 配置X-Pack
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

2.重啟 elasticsearch 服務

systemctl restart elasticsearch

3.設置密碼

./usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive

需要設置 elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user 這些用戶的密碼

設置完就可以了。用戶名是:elastic

好了 玩的開心!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM