Set CPS index options only when not using PIT#137728
Merged
pawankartik-elastic merged 3 commits intoelastic:mainfrom Nov 7, 2025
Merged
Set CPS index options only when not using PIT#137728pawankartik-elastic merged 3 commits intoelastic:mainfrom
pawankartik-elastic merged 3 commits intoelastic:mainfrom
Conversation
Collaborator
|
Hi @pawankartik-elastic, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
Kubik42
pushed a commit
to Kubik42/elasticsearch
that referenced
this pull request
Nov 10, 2025
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PITendpoints do not currently support CPS, and theirallowsCrossProject()method returnsfalseanyway. This prevents the Security Action Filter from rewriting the index expressions, and only those indices are used that are provided. However, when the_searchendpoint is hit with CPS enabled, along with the PIT ID obtained previously by hitting the_pit, CPS index options are applied, which causes a validation error whenTransportActioncallsvalidate().This PR prevents the CPS index options application when PIT is found in the request's body.