禁用Elasticsearch 8.X身份验证

x4shl7ld  于 7个月前  发布在  ElasticSearch
关注(0)|答案(1)|浏览(234)

我已经在我的raspberry pi上安装了最新版本的elasticsearch
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
当我 curl 它问我的密码


的数据
这里是我的elasticsearch的服务状态


的数据
我甚至在yaml文件中禁用了elasticsearch安全性。

#http.enabled: false

xpack.security.enabled: false
xpack.security.http.ssl.enabled: false
xpack.security.transport.ssl.enabled: false

字符串
当我重新启动elasticsearch时,它仍然要求我输入密码。有没有一种方法可以禁用身份验证,让我直接使用curl访问elasticsearch?
下面是我的elasticsearch服务状态



下面是过程


qnzebej0

qnzebej01#

你可以在第一次启动Elasticsearch之前设置xpack.security.enabled: false。所以在你的例子中,你可以清除安装(因为我不认为你有任何相关的数据),重新安装它,更改设置,然后第一次启动Elasticsearch。
对于现有集群,您可以IMO停止它并运行以下命令:

bin/elasticsearch-keystore remove xpack.security.transport.ssl.keystore.secure_password
bin/elasticsearch-keystore remove xpack.security.transport.ssl.truststore.secure_password
bin/elasticsearch-keystore remove xpack.security.http.ssl.keystore.secure_password

字符串
然后设置xpack.security.enabled: false,然后再次启动Elasticsearch。
PS:强烈建议默认情况下的安全性。过去有很多泄露的数据,所以我们真的建议保持启用状态:)

相关问题