use of org.apache.ignite.plugin.security.SecurityPermission.CACHE_PUT in project ignite by apache.
the class EntryProcessorPermissionCheckTest method test.
/**
*/
@Test
public void test() throws Exception {
IgniteEx verifierNode = startGrid("verifier_node", SecurityPermissionSetBuilder.create().appendCachePermissions(CACHE_NAME, CACHE_READ).appendCachePermissions(FORBIDDEN_CACHE, CACHE_READ).build(), false);
IgniteEx srvNode = startGrid("server_node", SecurityPermissionSetBuilder.create().appendCachePermissions(CACHE_NAME, CACHE_READ, CACHE_PUT).appendCachePermissions(FORBIDDEN_CACHE, EMPTY_PERMS).build(), false);
IgniteEx clientNode = startGrid("client_node", SecurityPermissionSetBuilder.create().appendCachePermissions(CACHE_NAME, CACHE_PUT, CACHE_READ).appendCachePermissions(FORBIDDEN_CACHE, EMPTY_PERMS).build(), true);
awaitPartitionMapExchange();
Stream.of(srvNode, clientNode).forEach(n -> operations(n).forEach(c -> {
runOperation(verifierNode, c);
runForbiddenOperation(verifierNode, c);
}));
}
Aggregations