Snapshot doesn't seem to work properly (ES 6.8.10 & RoR 1.20)

Hi

I’ve been using the free version of RoR on my ES cluster for a while now, and we just upgraded the cluster and the plugin to ES 6.8.10.
The security setting is really basic, just basic http auth for all actions + access to cluster:monitor/main for everyone. I don’t need more at the moment, and it used to work with ES 5.
Now, when I try to snapshot an index, ES/RoR seems to discard my indices list. I was having issues with my backup system so I tried a few tests:

curl -X PUT “localhost:9200/_snapshot/test-repo/test-snapshot?wait_for_completion=false&pretty” --user xxx:password -H ‘Content-Type: application/json’ -d’
{
“indices”:“test-index-to-be-deleted”,
“include_global_state”: false
}

When I request that, ES starts snapshoting my entire cluster instead of just the test index. The log seems to indicate that the json containing the indices information doesn’t seem to pass through RoR (it clearly says “indices:*”):

[2020-07-24T14:23:13,382][INFO ][t.b.r.a.l.AccessControlLoggingDecorator] [localhost] ALLOWED by { name: ‘full access if Basic HTTP auth’, policy: ALLOW, rules: [auth_key] req={ ID:817557308-1750811663#617, TYP:CreateSnapshotRequest, CGR:N/A, USR:xxxx, BRS:true, KDX:null, ACT:cluster:admin/snapshot/create, OA:172.16.6.127/32, XFF:null, DA:172.16.7.80/32, IDX:, MET:PUT, PTH:/_snapshot/test-repo/test-snapshot, CNT:<OMITTED, LENGTH=75.0 B> , HDR:Accept=/*, Authorization=, Content-Length=75, Content-Type=application/json, Host=localhost:9200, User-Agent=curl/7.58.0, HIS:[full access if Basic HTTP auth-> RULES:[auth_key->true], RESOLVED:[user=xxxx;indices=*;repositories=test-repo;snapshots=test-snapshot]] }

When I remove the RoR plugin the request works fine.

Is this a bug ? What am I doing wrong ?

@coutoPL is this related to GET _snapshot permission issue ?

maybe. I’ll check it during the linked task fixing

1 Like

I am experiencing the same issue. I want to create a snapshot for a few indices, but ES creates a giant snapshot for everything in my cluster, like a 2t+ snapshot.
I did a few upgrades recently, both ES and ROR, from 7.3.1 to 7.5.2 and now 7.8.0, so I am not sure which part cause this issue.

ES version: 7.8.0
ROR version: 1.22.1 for ES7.8
ROR Kibana version: 1.22.1 Enterprise for ES7.8

Guys, we fixed several issues related to snapshot and restore API. Here are prebuilds to test:

@deng47
https://readonlyrest-data.s3.amazonaws.com/build/1.24.0-pre3/readonlyrest-1.24.0-pre3_es7.8.0.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA5SJIWBO54AGBERLX/20200927/eu-west-1/s3/aws4_request&X-Amz-Date=20200927T183219Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=f5e28d48242efb6fede2258d7c06caa5174b1e08e52e4bd3e798531f1a41e61a

@Paul-Matthieu
https://readonlyrest-data.s3.amazonaws.com/build/1.24.0-pre3/readonlyrest-1.24.0-pre3_es6.8.10.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA5SJIWBO54AGBERLX/20200927/eu-west-1/s3/aws4_request&X-Amz-Date=20200927T184459Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=27a70379afe1e13b135b1ef908acb1e4d8018ae37132e97358da35b315b52d2a

1 Like