File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -342,11 +342,7 @@ ResolvedIndices resolveIndicesAndAliases(
342342 // Always parse selectors, but do so lazily so that we don't spend a lot of time splitting strings each resolution
343343 isAllIndices = IndexNameExpressionResolver .isAllIndices (indicesList (indicesRequest .indices ()), (expr ) -> {
344344 var unprefixed = crossProjectModeDecider .resolvesCrossProject (replaceable )
345- ? CrossProjectIndexExpressionsRewriter .rewriteIndexExpression (
346- expr ,
347- authorizedProjects .originProjectAlias (),
348- authorizedProjects .allProjectAliases ()
349- ).localExpression ()
345+ ? RemoteClusterAware .splitIndexName (expr )[1 ]
350346 : expr ;
351347 return unprefixed != null ? IndexNameExpressionResolver .splitSelectorExpression (unprefixed ).v1 () : null ;
352348 });
@@ -400,12 +396,13 @@ ResolvedIndices resolveIndicesAndAliases(
400396 replaceable .getProjectRouting (),
401397 authorizedProjects
402398 );
403- remoteIndices = CrossProjectIndexExpressionsRewriter .rewriteIndexExpression (
399+ final var expr = CrossProjectIndexExpressionsRewriter .rewriteIndexExpression (
404400 indexExpression ,
405401 resolvedProjects .originProjectAlias (),
406402 resolvedProjects .allProjectAliases ()
407- ).remoteExpressions ();
408- if (resolvedProjects .originProject () == null ) {
403+ );
404+ remoteIndices = expr .remoteExpressions ();
405+ if (resolvedProjects .originProject () == null || expr .localExpression () == null ) {
409406 shouldExcludeLocalResolution = true ;
410407 }
411408 }
You can’t perform that action at this time.
0 commit comments