package i5.las2peer.classLoaders.policies;

/**
 * Policy aimed for production use: Restricts access from the service to the node and some JDK methods.
 *
 */
public class RestrictivePolicy extends ClassLoaderPolicy {
	public RestrictivePolicy() {
		super();
		
		allow("i5.las2peer.api");
		allow("java.lang");
		allow("java.util");
		deny("java.lang.System");
		deny("java.lang.Runtime");
		deny("java.lang.Thread");
		deny("java.lang.Process");
		deny("java.lang.ProcessBuilder");
		deny("java.lang.SecurityManager");
		deny("java.lang.instrument");
		deny("java.lang.management");
		deny("java.util.concurrent.ThreadPoolExecutor");
	}
}

@@ -252,18 +252,26 @@
 uper();%0A
+%0A
 %09%09
+// Core
 %0A%09%09allow
@@ -290,16 +290,349 @@
 r.api%22);
+ // las2peer API%0A%09%09%0A%09%09// RESTMapper%0A%09%09allow(%22i5.las2peer.restMapper%22); // las2peer RESTMapper%0A%09%09allow(%22javax.ws.rs%22); // REST annotations%0A%09%09allow(%22io.swagger.annotations%22); // Swagger annotations%0A%09%09// Jersey does not need to be added here, features in the las2peer bundle should be registered%0A%09%09// in the RESTMapper class%0A%09%09%0A%09%09// JDK
 %0A%09%09allow
@@ -664,24 +664,45 @@
 ava.util%22);%0A
+%09%09allow(%22java.net%22);%0A
 %09%09deny(%22java

refine RestrictivePolicy