@@ -161,7 +161,7 @@ public class IndexAuthorizationReadOnlyIntTests {
161161 /**
162162 * This key identifies assertion reference data for index search/read permissions of individual users for the new privilege evaluation
163163 */
164- static final TestSecurityConfig .User .MetadataKey <IndexMatcher > READ_NEXT_GEN = new TestSecurityConfig .User .MetadataKey <>(
164+ static final TestSecurityConfig .User .MetadataKey <IndexMatcher > READ_V4 = new TestSecurityConfig .User .MetadataKey <>(
165165 "read_nextgen" ,
166166 IndexMatcher .class
167167 );
@@ -193,7 +193,7 @@ public class IndexAuthorizationReadOnlyIntTests {
193193 .on ("index_a*" )
194194 )//
195195 .reference (READ , limitedTo (index_a1 , index_a2 , index_a3 , index_ax ))//
196- .reference (READ_NEXT_GEN , limitedTo (index_a1 , index_a2 , index_a3 , index_ax ))//
196+ .reference (READ_V4 , limitedTo (index_a1 , index_a2 , index_a3 , index_ax ))//
197197 .reference (GET_ALIAS , limitedToNone ());
198198
199199 /**
@@ -208,7 +208,7 @@ public class IndexAuthorizationReadOnlyIntTests {
208208 .on ("index_b*" )
209209 )//
210210 .reference (READ , limitedTo (index_b1 , index_b2 , index_b3 ))//
211- .reference (READ_NEXT_GEN , limitedTo (index_b1 , index_b2 , index_b3 ))//
211+ .reference (READ_V4 , limitedTo (index_b1 , index_b2 , index_b3 ))//
212212 .reference (GET_ALIAS , limitedToNone ());
213213
214214 /**
@@ -223,7 +223,7 @@ public class IndexAuthorizationReadOnlyIntTests {
223223 .on ("index_b1" )
224224 )//
225225 .reference (READ , limitedTo (index_b1 ))//
226- .reference (READ_NEXT_GEN , limitedTo (index_b1 ))//
226+ .reference (READ_V4 , limitedTo (index_b1 ))//
227227 .reference (GET_ALIAS , limitedToNone ());
228228
229229 /**
@@ -238,7 +238,7 @@ public class IndexAuthorizationReadOnlyIntTests {
238238 .on ("index_c*" )
239239 )//
240240 .reference (READ , limitedTo (index_c1 , alias_c1 ))//
241- .reference (READ_NEXT_GEN , limitedTo (index_c1 ))//
241+ .reference (READ_V4 , limitedTo (index_c1 ))//
242242 .reference (GET_ALIAS , limitedToNone ());
243243
244244 /**
@@ -254,7 +254,7 @@ public class IndexAuthorizationReadOnlyIntTests {
254254 .on ("alias_ab1*" )
255255 )//
256256 .reference (READ , limitedTo (index_a1 , index_a2 , index_a3 , index_b1 , alias_ab1 ))//
257- .reference (READ_NEXT_GEN , limitedTo (index_a1 , index_a2 , index_a3 , index_b1 , alias_ab1 ))//
257+ .reference (READ_V4 , limitedTo (index_a1 , index_a2 , index_a3 , index_b1 , alias_ab1 ))//
258258 .reference (GET_ALIAS , limitedTo (index_a1 , index_a2 , index_a3 , index_b1 , alias_ab1 ));
259259
260260 /**
@@ -270,7 +270,7 @@ public class IndexAuthorizationReadOnlyIntTests {
270270 .on ("alias_c1" )
271271 )//
272272 .reference (READ , limitedTo (index_c1 , alias_c1 ))//
273- .reference (READ_NEXT_GEN , limitedTo (index_c1 , alias_c1 ))//
273+ .reference (READ_V4 , limitedTo (index_c1 , alias_c1 ))//
274274 .reference (GET_ALIAS , limitedTo (index_c1 , alias_c1 ));
275275 /**
276276 * Same as LIMITED_USER_A with the addition of read privileges for index_hidden* and .index_hidden*
@@ -284,7 +284,7 @@ public class IndexAuthorizationReadOnlyIntTests {
284284 .on ("index_a*" , "index_hidden*" , ".index_hidden*" )
285285 )//
286286 .reference (READ , limitedTo (index_a1 , index_a2 , index_a3 , index_ax , index_hidden , index_hidden_dot ))//
287- .reference (READ_NEXT_GEN , limitedTo (index_a1 , index_a2 , index_a3 , index_ax , index_hidden , index_hidden_dot ))//
287+ .reference (READ_V4 , limitedTo (index_a1 , index_a2 , index_a3 , index_ax , index_hidden , index_hidden_dot ))//
288288 .reference (GET_ALIAS , limitedToNone ());
289289
290290 /**
@@ -310,7 +310,7 @@ public class IndexAuthorizationReadOnlyIntTests {
310310 .on (".system_index_plugin" )
311311 )//
312312 .reference (READ , limitedTo (index_c1 , alias_c1 , system_index_plugin , alias_with_system_index ))//
313- .reference (READ_NEXT_GEN , limitedTo (index_c1 , alias_c1 , system_index_plugin ))//
313+ .reference (READ_V4 , limitedTo (index_c1 , alias_c1 , system_index_plugin ))//
314314 .reference (GET_ALIAS , limitedTo (index_c1 , alias_c1 , system_index_plugin , alias_with_system_index ));
315315 /**
316316 * This user has no privileges for indices that are used in this test. But they have privileges for other indices.
@@ -327,7 +327,7 @@ public class IndexAuthorizationReadOnlyIntTests {
327327 .on ("index_does_not_exist_*" )
328328 )//
329329 .reference (READ , limitedToNone ())//
330- .reference (READ_NEXT_GEN , limitedToNone ())//
330+ .reference (READ_V4 , limitedToNone ())//
331331 .reference (GET_ALIAS , limitedToNone ());
332332
333333 /**
@@ -340,7 +340,7 @@ public class IndexAuthorizationReadOnlyIntTests {
340340 .clusterPermissions ("cluster_composite_ops_ro" , "cluster_monitor" )
341341 )//
342342 .reference (READ , limitedToNone ())//
343- .reference (READ_NEXT_GEN , limitedToNone ())//
343+ .reference (READ_V4 , limitedToNone ())//
344344 .reference (GET_ALIAS , limitedToNone ());
345345 /**
346346 * A user with "*" privileges on "*"; as it is a regular user, they are still subject to system index
@@ -356,7 +356,7 @@ public class IndexAuthorizationReadOnlyIntTests {
356356
357357 )//
358358 .reference (READ , limitedTo (ALL_INDICES_AND_ALIASES_EXCEPT_SYSTEM_INDICES ).and (index_ax ))//
359- .reference (READ_NEXT_GEN , limitedTo (ALL_INDICES_AND_ALIASES_EXCEPT_SYSTEM_INDICES ).and (index_ax ))//
359+ .reference (READ_V4 , limitedTo (ALL_INDICES_AND_ALIASES_EXCEPT_SYSTEM_INDICES ).and (index_ax ))//
360360 .reference (GET_ALIAS , limitedTo (ALL_INDICES_AND_ALIASES_EXCEPT_SYSTEM_INDICES ).and (index_ax ));
361361
362362 /**
@@ -367,7 +367,7 @@ public class IndexAuthorizationReadOnlyIntTests {
367367 .description ("super unlimited (admin cert)" )//
368368 .adminCertUser ()//
369369 .reference (READ , unlimitedIncludingOpenSearchSecurityIndex ())//
370- .reference (READ_NEXT_GEN , unlimitedIncludingOpenSearchSecurityIndex ())//
370+ .reference (READ_V4 , unlimitedIncludingOpenSearchSecurityIndex ())//
371371 .reference (GET_ALIAS , unlimitedIncludingOpenSearchSecurityIndex ());
372372
373373 static final List <TestSecurityConfig .User > USERS = ImmutableList .of (
@@ -794,7 +794,7 @@ public void search_staticIndices_systemIndex_alias() throws Exception {
794794 containsExactly (system_index_plugin ).at ("hits.hits[*]._index" ).reducedBy (user .reference (READ )).whenEmpty (isForbidden ())
795795 );
796796 } else {
797- if (user .reference (READ_NEXT_GEN ).covers (alias_with_system_index )) {
797+ if (user .reference (READ_V4 ).covers (alias_with_system_index )) {
798798 assertThat (httpResponse , isOk ());
799799 assertThat (httpResponse , containsExactly (system_index_plugin ).at ("hits.hits[*]._index" ));
800800 } else {
@@ -1184,7 +1184,7 @@ public void search_termsAggregation_index() throws Exception {
11841184 }
11851185 }""" );
11861186
1187- if (clusterConfig == ClusterConfig .NEXT_GEN_PRIVILEGES_EVALUATION ) {
1187+ if (clusterConfig == ClusterConfig .V4_PRIVILEGES_EVALUATION ) {
11881188 if (user == LIMITED_USER_NONE ) {
11891189 assertThat (httpResponse , isForbidden ("/error/root_cause/0/reason" , "no permissions for [indices:data/read/search]" ));
11901190 } else if (user == LIMITED_USER_OTHER_PRIVILEGES ) {
@@ -1454,7 +1454,7 @@ public void mget_alias() throws Exception {
14541454 containsExactly (index_c1 ).at ("docs[?(@.found == true)]._index" ).reducedBy (user .reference (READ )).whenEmpty (isOk ())
14551455 );
14561456 } else {
1457- if (user .reference (READ_NEXT_GEN ).covers (alias_c1 )) {
1457+ if (user .reference (READ_V4 ).covers (alias_c1 )) {
14581458 assertThat (httpResponse , containsExactly (index_c1 ).at ("docs[?(@.found == true)]._index" ));
14591459 } else {
14601460 assertThat (httpResponse , containsExactly ().at ("docs[?(@.found == true)]._index" ));
@@ -1482,7 +1482,7 @@ public void get_alias() throws Exception {
14821482 if (clusterConfig .legacyPrivilegeEvaluation ) {
14831483 assertThat (httpResponse , containsExactly (index_c1 ).at ("_index" ).reducedBy (user .reference (READ )).whenEmpty (isForbidden ()));
14841484 } else {
1485- if (user .reference (READ_NEXT_GEN ).covers (alias_c1 )) {
1485+ if (user .reference (READ_V4 ).covers (alias_c1 )) {
14861486 assertThat (httpResponse , containsExactly (index_c1 ).at ("_index" ));
14871487 } else {
14881488 assertThat (httpResponse , isForbidden ("/error/root_cause/0/reason" , "no permissions for [indices:data/read/get]" ));
@@ -1991,7 +1991,7 @@ public void resolve_wildcard() throws Exception {
19911991 containsExactly (index_a1 , index_a2 , index_a3 , index_b1 , index_b2 , index_b3 , index_c1 , alias_ab1 , alias_c1 ).at (
19921992 "$.*[*].name"
19931993 )
1994- .reducedBy (user .reference (clusterConfig .legacyPrivilegeEvaluation ? READ : READ_NEXT_GEN ))
1994+ .reducedBy (user .reference (clusterConfig .legacyPrivilegeEvaluation ? READ : READ_V4 ))
19951995 .whenEmpty (clusterConfig .allowsEmptyResultSets ? isOk () : isForbidden ())
19961996 );
19971997 } else {
@@ -2022,7 +2022,7 @@ public void resolve_wildcard_includeHidden() throws Exception {
20222022 assertThat (
20232023 httpResponse ,
20242024 containsExactly (ALL_INDICES_AND_ALIASES ).at ("$.*[*].name" )
2025- .reducedBy (user .reference (clusterConfig .legacyPrivilegeEvaluation ? READ : READ_NEXT_GEN ))
2025+ .reducedBy (user .reference (clusterConfig .legacyPrivilegeEvaluation ? READ : READ_V4 ))
20262026 .whenEmpty (clusterConfig .allowsEmptyResultSets ? isOk () : isForbidden ())
20272027 );
20282028 } else {
0 commit comments