我正在尝试通过身份验证将logstash与elasticsearch连接,但此配置给出了以下错误:[401] ReadonlyREST ES插件禁止{:class =>" Elasticsearch :: Transport :: Transport :: Errors ::未经授权",:level =>:错误}
配置文件如下:
[Elasticsearch conf file]
puts "What is your name?"
name = gets.chomp
puts "Hi, " name.capitalize "how are you?"
[logstash conf file]
http.cors.enabled: true
http.cors.allow-origin: /https?:\/\/localhost(:[0-9]+)?/
readonlyrest:
enable: true
response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin
access_control_rules:
- name: "Logstash can write and create its own indices"
auth_key: logstash:logstash
type: allow
actions: ["indices:data/read/*","indices:data/write/*","indices:admin/template/*","indices:admin/create"]
indices: ["logstash-*", "<no_index>"]
- name: Kibana Server (we trust this server side component, full access granted via HTTP authentication)
auth_key: admin:pass3
type: allow
- name: Developer (reads only logstash indices, but can create new charts/dashboards)
auth_key: dev:dev
type: allow
kibana_access: ro+
indices: ["<no-index>", ".kibana*", "logstash*", "default"]