Commit e5eeeb7
Set CPS index options only when not using PIT (elastic#137728)
PIT endpoints do not currently support CPS, and their `allowsCrossProject()`
method returns `false` anyway. This prevents the Security Action Filter from
rewriting the index expressions, and only those indices are used that are provided.
However, when the `_search` endpoint is hit with CPS enabled, along with the PIT
ID obtained previously by hitting the `_pit` endpoint, CPS index options are applied,
which causes a validation error when `TransportAction` calls `validate()`.
This change prevents the CPS index options application when PIT is found in the
request's body.1 parent f90df8c commit e5eeeb7
File tree
2 files changed
+6
-1
lines changed- docs/changelog
- server/src/main/java/org/elasticsearch/rest/action/search
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
0 commit comments