Hello !
Ror 1.40-pre on Elastic+Kibana 7.16.3
It seems that the Kibana index from headers feature is broken in this version :
Here is what I tried :
- set up an account with the following config :
- name: "::Import::Export"
kibana_access: "rw"
verbosity: info
auth_key: "import:${ELASTICSEARCH_IMPORT_PASSWORD}"
indices: [".kibana*"]
kibana_index: ".@{header:x-kibana-index}"
-
Connect to this account with the following header :
-
I expected to have an empty space, but in reality I’m connected to the .kibana !
Logs from ES confirms this :
{"type": "server", "timestamp": "2022-05-05T16:24:33,068+02:00", "level": "INFO", "component": "t.b.r.a.l.AccessControlLoggingDecorator", "cluster.name": "REDACTED", "node.name": "elasticsearch-45-sxwbf", "message": "\u001B[36mALLOWED by { name: '::Import::Export tool ::', policy: ALLOW, rules: [auth_key,kibana_index,kibana_access,indices] req={ ID:566996114--320231449#383558, TYP:SearchRequest, CGR:N/A, USR:import, BRS:true, KDX:.kibana_test2, ACT:indices:data/read/search, OA:REDACTED/32, XFF:REDACTED, DA:REDACTED/32, IDX:.kibana, MET:POST, PTH:/.kibana/_search, CNT:<OMITTED, LENGTH=316.0 B> , HDR:Accept-Charset=utf-8, Authorization=<OMITTED>, Host=elasticsearch-service:9200, connection=close, content-length=316, content-type=application/json, user-agent=elasticsearch-js/7.16.0-canary.7 (linux 3.10.0-957.12.2.el7.x86_64-x64; Node.js v16.13.0), x-elastic-client-meta=es=7.16.0p,js=16.13.0,t=7.16.0p,hc=16.13.0, x-elastic-product-origin=kibana, x-forwarded-for=REDACTED, x-kibana-index=kibana_test2, x-opaque-id=01059a6f-9118-4673-b8bd-6697d0907638, x-ror-kibana-request-method=get, x-ror-kibana-request-path=/api/saved_objects/_find, HIS: [[::Import::Ex
port tool ::-> RULES:[auth_key->true, kibana_index->true, kibana_access->true, indices->true] RESOLVED:[user=import;indices=.kibana;kibana_idx=.kibana_test2]], }\u001B[0m", "cluster.uuid": "dfU-4Q0gQwaBg1Wq9Oa51g", "node.id": "B72n4nuWQuCClFp1SXWlmQ" }
Even though KDX = .kibana_test2, IDX== .kibana?!
However if i switch kibana_index to a static value, it works like a charm.
I’ve tried with ".@{x-kibana-index}"
but to no avail.