Java Security Manager

A Java class that allows applications to implement a security policy.

Usually, the JavaSecurityManager becomes visible when it denies access to a resource like local files:

 java.security.AccessControlException: access denied (java.io.FilePermission /foo.xml read) 
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
    at java.security.AccessController.checkPermission(AccessController.java:401)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
    at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
    at java.io.File.exists(File.java:678)
    at com.badguys.BadCode$BadThread.run(BadCode.java:32)

However, the most common example can be seen with Java applets which are prevented from: If there is a security manager in place, the following operations will be checked:

Java applications, by default, won't use a security manager unless a policy file has been specified at the time of application launch. To specify a java policy read up on the following syntax:

 java -Djava.security.manager -Djava.security.policy=someURL SomeApp

The system policy file is by default located at java.home/lib/security/java.policy

see more at: http://java.sun.com/j2se/1.4.2/docs/guide/security/PolicyFiles.html


An attempt to implement something similar in the RubyLanguage is being made in the SecuredRuby project.


Is there something similar in Smalltalk?


contributors: AnonymousDonors, EricHerman


EditText of this page (last edited August 3, 2011) or FindPage with title or text search