admin管理员组文章数量:1624786
ES默认是不需要认证的,可以直接访问,但是这样不安全; 需要为其添加认证;
认证设置方式取自:Elasticsearch 7.8 开启用户名密码认证 - Kevin_zheng - 博客园
在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
重启ES服务后通过命令:bin/elasticsearch-setup-passwords interactive进行设置密码;
需要设置 elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user 这些账户的密码,密码可以重复;
另:
设置完成之后,Kibana需要修改设置才可以连上;否则当设置完密码之后,启动Kibana会报错:
[2021-11-15T15:33:27,803][INFO ][o.e.x.s.a.AuthenticationService] [A03-R28-I33-232-JCFB742.JD.LOCAL] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2021-11-15T15:33:30,305][INFO ][o.e.x.s.a.AuthenticationService] [A03-R28-I33-232-JCFB742.JD.LOCAL] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
添加如下设置
#elasticsearch.username: "kibana_system"
#elasticsearch.password: "pass"
username填的是kiana的,默认用户名: kibana
本文标签: es
版权声明:本文标题:ES 认证 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1728913927a1179449.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论