谁能指出我在ElasticSearch中启用安全性的配置文件示例
到目前为止,我已经创建了具有密码和超级用户角色的用户
xpack.security.enabled: true
xpack.security.authc.realms.native.type: native
xpack.security.authc.realms.native.order: 0
xpack.security.authc.realms.native.enabled: true
output {
if [type] == "products" {
elasticsearch {
hosts => ["localhost:9200"]
index => "products"
user => "esadmin"
password => "pswd"
}
}
}
而且我仍然能够在不进行身份验证的情况下请求数据
curl -X GET "localhost:9200/_all/_search?q=powershot%20G"
curl --user esadmin:pswd -X GET "localhost:9200/_all/_search?q=powershot%20G"
两个cUrl调用都给我相同的结果。
答案 0 :(得分:1)
请确保:
curl -X GET "localhost:9200/_xpack/license"
elastic
内置用户