// Example policy file for RingoJS // Run RingoJS with the -p or --policy option to activate this: // ringo -p file:/.../ringo.policy // replacing "..." with the absolute path of the policy file. // // The following URLs provide more information: // http://java.sun.com/j2se/1.4.2/docs/guide/security/PolicyFiles.html // http://java.sun.com/j2se/1.4.2/docs/guide/security/permissions.html grant codeBase "file:${ringo.home}/run.jar" { permission java.security.AllPermission; }; grant codeBase "file:${ringo.home}/lib/-" { permission java.security.AllPermission; }; grant codeBase "file:${ringo.home}/modules/-" { permission java.security.AllPermission; }; grant codeBase "file:${ringo.home}/apps/-" { permission java.security.AllPermission; }; grant codeBase "file:${ringo.home}/packages/-" { permission java.security.AllPermission; }; // example sandbox setup grant codeBase "file:${ringo.home}/sandbox/-" { permission java.io.FilePermission "${ringo.home}/modules/-", "read"; permission java.io.FilePermission "${ringo.home}/packages/-", "read"; permission java.io.FilePermission "${ringo.home}/sandbox/-", "read"; permission java.io.FilePermission "${ringo.home}/sandbox/db/-", "read,write"; permission java.util.PropertyPermission "*", "read"; permission java.lang.RuntimePermission "getenv.*"; // permission java.net.SocketPermission "*:80", "connect"; // permission org.ringojs.security.RingoRuntimePermission "accessJava"; // permission org.ringojs.security.RingoRuntimePermission "spawnThread"; };