Hi,
I am using ES, Kibana 7.10.2 and using opendistro-security plugin 1.13.x. I have tried below 2 scenarios on OD security index Snapshot/Restore and details are as below:
Case 1:
a. Add user and respective roles, rolesmapping. Access the ES cluster using this user.
b. Take Snapshot of .opendistro_security index using admin certificates.
c. Delete .opendistro_security index from the cluster
d. Restore .opendistro_security index into the cluster.
This scenario works fine. After restore I am able to access ES cluster using the user created in step a.
Case 2:
a. Add user and respective roles, rolesmapping. Access the ES cluster using this user.
b. Take Snapshot of .opendistro_security index using admin certificates.
c. Delete only user. Roles, rolesmappings are not deleted.
d. Delete .opendistro_security index from the cluster before restore
e. Restore .opendistro_security index into the cluster.
After restore the user is restored back(I can see user in Kibana UI Internalusers).
But I am unable to access ES cluster using the user which have deleted in step c.
When I try to curl to ES it says Unauthorized. Also I can’t login to Kibana UI using this user.
Command used for Snapshot
curl -X PUT --cert <path-to-client.crt> --key <path-to-client.key> https://<ELASTICSEARCH_SERVICE>:<ES_PORT>/_snapshot/es_backup/snapshot_1?wait_for_completion=true -H 'Content-Type: application/json' -d' {"ignore_unavailable": true,"include_global_state": false, "indices": ".opendistro_security" }'
Command used for Restore
curl -XPOST --cert <path-to-client.crt> --key <path-to-client.key> https://<ELASTICSEARCH_SERVICE>:<ES_PORT>/_snapshot/es_backup/snapshot_1/_restore?wait_for_completion=true -H 'Content-Type: application/json' -d' { "indices": ".opendistro_security", "ignore_unavailable": true,"include_global_state": false }'
Why is it not working as expected?