[7.x] Mirror privileges over data streams to their backing indices #58991
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.
This PR comprises the core of data streams security integration. It changes the authorization code to extend any privileges granted on a data stream to all of its backing indices. It also introduces an
includeDataStreams()
flag on any requests implementingIndicesRequest
so that they can indicate how data streams should be considered during the authz process for each request. For requests whereincludeDataStreams()
isfalse
, authz will not include any data streams in the list of authorized indices for that request. For requests whereincludeDataStreams()
istrue
, authz will include any matching data streams along with their respective backing indices in the list of authorized indices.Note that @albertzaharovits's comment below (#58381 (comment)) includes another description of the way in which the authz code expands wildcards for requests that include data streams and those that do not.
Relates to #53100
Backport of #58381