NOTE: The below is without the ror kbn plugin installed? So maybe the .kibana index translations is done in the client and not the es server?
I’m trying to automate the creation of the index patterns (and other kibana objects). But, if I understand correctly, those objects need to be in the user-index. Just using a user with a kibana_index
does not seem to create the index, eg
- name: plant-admin--kibana-rw
headers:
- x-vi-plant:*
auth_key: "plantadmin:{{ vault_ror_admin_password }}"
kibana_index: .kibana_@{x-vi-plant}
curl --user 'plantadmin:plantadmin \
-X POST "http://localhost:5601/api/saved_objects/index-pattern/test_1" \
-H 'kbn-xsrf: true' -H 'Content-Type: application/json' \
-H 'x-vi-plant: male' \
-d'
{
"attributes": {
"title": "kibana_sample_*",
"timeFieldName": "order_date"
}
}
'
The pattern does get created, but in the .kibana
index not .kibana_male
. The logs shows KDX being kibana_male
but the the PTH still uses .kibana
. Am I missing something?
[2018-12-25T21:32:38,735][INFO ][tech.beshu.ror.acl.ACL ] [s-ror-es-1] ALLOWED by { name: 'plant-admin', policy: ALLOW, rules: [auth_key, headers, kibana_index]} req={ ID:87760583-106528550#3896, TYP:IndexRequest, CGR:N/A, USR:plantadmin, BRS:false, KDX:.kibana_male, ACT:indices:data/write/index, OA:10.11.136.165, DA:10.11.136.165, IDX:.kibana, MET:POST, PTH:/.kibana/doc/index-pattern%3Atest_1/_create?refresh=wait_for, CNT:<OMITTED, LENGTH=182>, HDR:{authorization=<OMITTED>, x-vi-plant=male, Connection=keep-alive, content-type=application/json, Host=10.11.136.165:9200, Content-Length=182}, HIS:[svc-consul->[auth_key->false]], [svc-kibana->[auth_key->false]], [plant-admin->[headers->true, auth_key->true, kibana_index->true]] }