@@ -781,7 +781,7 @@ public void testCheckRestrictedIndexPatternPermission() throws Exception {
781781 randomIntBetween (2 , XPackPlugin .ASYNC_RESULTS_INDEX .length () - 2 )
782782 );
783783 Role role = Role .builder (RESTRICTED_INDICES , "role" )
784- .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , false , patternPrefix + "*" )
784+ .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , false , false , patternPrefix + "*" )
785785 .build ();
786786 RBACAuthorizationInfo authzInfo = new RBACAuthorizationInfo (role , null );
787787
@@ -892,7 +892,7 @@ public void testCheckRestrictedIndexPatternPermission() throws Exception {
892892 );
893893
894894 role = Role .builder (RESTRICTED_INDICES , "role" )
895- .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , true , patternPrefix + "*" )
895+ .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , true , false , patternPrefix + "*" )
896896 .build ();
897897 authzInfo = new RBACAuthorizationInfo (role , null );
898898 response = hasPrivileges (
@@ -917,8 +917,8 @@ public void testCheckExplicitRestrictedIndexPermissions() throws Exception {
917917 final boolean restrictedIndexPermission = randomBoolean ();
918918 final boolean restrictedMonitorPermission = randomBoolean ();
919919 Role role = Role .builder (RESTRICTED_INDICES , "role" )
920- .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , restrictedIndexPermission , ".sec*" )
921- .add (FieldPermissions .DEFAULT , null , IndexPrivilege .MONITOR , restrictedMonitorPermission , ".security*" )
920+ .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , restrictedIndexPermission , false , ".sec*" )
921+ .add (FieldPermissions .DEFAULT , null , IndexPrivilege .MONITOR , restrictedMonitorPermission , false , ".security*" )
922922 .build ();
923923 RBACAuthorizationInfo authzInfo = new RBACAuthorizationInfo (role , null );
924924
@@ -975,8 +975,8 @@ public void testCheckExplicitRestrictedIndexPermissions() throws Exception {
975975
976976 public void testCheckRestrictedIndexWildcardPermissions () throws Exception {
977977 Role role = Role .builder (RESTRICTED_INDICES , "role" )
978- .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , false , ".sec*" )
979- .add (FieldPermissions .DEFAULT , null , IndexPrivilege .MONITOR , true , ".security*" )
978+ .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , false , false , ".sec*" )
979+ .add (FieldPermissions .DEFAULT , null , IndexPrivilege .MONITOR , true , false , ".security*" )
980980 .build ();
981981 RBACAuthorizationInfo authzInfo = new RBACAuthorizationInfo (role , null );
982982
@@ -1013,8 +1013,8 @@ public void testCheckRestrictedIndexWildcardPermissions() throws Exception {
10131013 );
10141014
10151015 role = Role .builder (RESTRICTED_INDICES , "role" )
1016- .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , true , ".sec*" )
1017- .add (FieldPermissions .DEFAULT , null , IndexPrivilege .MONITOR , false , ".security*" )
1016+ .add (FieldPermissions .DEFAULT , null , IndexPrivilege .INDEX , true , false , ".sec*" )
1017+ .add (FieldPermissions .DEFAULT , null , IndexPrivilege .MONITOR , false , false , ".security*" )
10181018 .build ();
10191019 authzInfo = new RBACAuthorizationInfo (role , null );
10201020
@@ -1297,6 +1297,7 @@ public void testBuildUserPrivilegeResponse() {
12971297 Collections .singleton (query ),
12981298 IndexPrivilege .READ ,
12991299 randomBoolean (),
1300+ false ,
13001301 "index-4" ,
13011302 "index-5"
13021303 )
@@ -1912,6 +1913,7 @@ public void testChildSearchActionAuthorizationIsNotSkippedWhenRoleHasDLS() {
19121913 Set .of (query ),
19131914 IndexPrivilege .READ ,
19141915 randomBoolean (),
1916+ false ,
19151917 indices
19161918 )
19171919 .build ()
0 commit comments