-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from metafacture/addSecurityManager
Add security manager
- Loading branch information
Showing
3 changed files
with
96 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
|
||
// Standard extensions get all permissions by default | ||
|
||
grant codeBase "file:${{java.ext.dirs}}/*" { | ||
permission java.security.AllPermission; | ||
}; | ||
|
||
// default permissions granted to all domains | ||
|
||
grant { | ||
// Allows any thread to stop itself using the java.lang.Thread.stop() | ||
// method that takes no argument. | ||
// Note that this permission is granted by default only to remain | ||
// backwards compatible. | ||
// It is strongly recommended that you either remove this permission | ||
// from this policy file or further restrict it to code sources | ||
// that you specify, because Thread.stop() is potentially unsafe. | ||
// See the API specification of java.lang.Thread.stop() for more | ||
// information. | ||
permission java.lang.RuntimePermission "stopThread"; | ||
|
||
// allows anyone to listen on dynamic ports | ||
permission java.net.SocketPermission "localhost:0", "listen"; | ||
|
||
// "standard" properies that can be read by anyone | ||
|
||
permission java.util.PropertyPermission "java.version", "read"; | ||
permission java.util.PropertyPermission "java.vendor", "read"; | ||
permission java.util.PropertyPermission "java.vendor.url", "read"; | ||
permission java.util.PropertyPermission "java.class.version", "read"; | ||
permission java.util.PropertyPermission "os.name", "read"; | ||
permission java.util.PropertyPermission "os.version", "read"; | ||
permission java.util.PropertyPermission "os.arch", "read"; | ||
permission java.util.PropertyPermission "file.separator", "read"; | ||
permission java.util.PropertyPermission "path.separator", "read"; | ||
permission java.util.PropertyPermission "line.separator", "read"; | ||
|
||
permission java.util.PropertyPermission "java.specification.version", "read"; | ||
permission java.util.PropertyPermission "java.specification.vendor", "read"; | ||
permission java.util.PropertyPermission "java.specification.name", "read"; | ||
|
||
permission java.util.PropertyPermission "java.vm.specification.version", "read"; | ||
permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; | ||
permission java.util.PropertyPermission "java.vm.specification.name", "read"; | ||
permission java.util.PropertyPermission "java.vm.version", "read"; | ||
permission java.util.PropertyPermission "java.vm.vendor", "read"; | ||
permission java.util.PropertyPermission "java.vm.name", "read"; | ||
|
||
// permissions for metafacture playground | ||
|
||
permission java.io.FilePermission "${user.dir}/-", "write, read, delete"; | ||
permission java.io.FilePermission "${java.io.tmpdir}/-", "write, read, delete"; | ||
permission java.io.FilePermission "${user.home}/-", "read"; | ||
|
||
// Please adapt these paths to all parent paths of your user home directory | ||
// Some Fix Code searches a .project file to determine an encoding | ||
// It's no problem when there's no .project file, but it's a problem | ||
// when there's no access in generell to this file | ||
permission java.io.FilePermission "/Users/.project", "read"; | ||
permission java.io.FilePermission "/.project", "read"; | ||
|
||
permission java.util.PropertyPermission "*", "read"; | ||
permission java.util.PropertyPermission "jetty.git.hash", "write"; | ||
|
||
permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; | ||
|
||
permission java.lang.RuntimePermission "getenv.*"; | ||
permission java.lang.RuntimePermission "createClassLoader"; | ||
permission java.lang.RuntimePermission "getClassLoader"; | ||
permission java.lang.RuntimePermission "setContextClassLoader"; | ||
permission java.lang.RuntimePermission "getContextClassLoader"; | ||
permission java.lang.RuntimePermission "accessDeclaredMembers"; | ||
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc"; | ||
permission java.lang.RuntimePermission "classLoader"; | ||
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.loader"; | ||
|
||
permission java.lang.management.ManagementPermission "control"; | ||
|
||
permission java.net.SocketPermission "localhost:1024-", "accept, listen, resolve"; | ||
permission java.net.SocketPermission "*", "accept, connect, resolve"; | ||
}; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters