This page contains notes about Applet Security which are of particular interest to Applet Developers. Look here for information about:
Javakey Restriction
Loading Multiple Applets from a Single CODEBASE
Details on Applet Security Levels
This has no effect on users who download your applet, unless they also use the javakey utility to mark the certificate as trusted.
For information about using javakey, see the Javakey page for Solaris or for Windows.
The following table provides information about allowed applet behavior at each security level. The information provided here is a detailed list of allowed applet behavior, some of which might only be understood by Java applet developers. For a more general overview of what the security levels provide, see the previous page on applet security.
Note that in addition to the tangible protections described below, Java and HotJava work together to enforce other constraints on applets to make them run in a safe fashion. For example, applets are not permitted to send messages to windows that cause them to be closed (except windows the applet has created on its own).
Applet Security Restriction Level | ||||
Untrusted | High | Medium | Low | |
Read Files | No | No1 | Warn1 | Yes |
Write Files | No | No | Warn | Yes |
Delete Files | No | No | Warn | Yes |
Access HotJava Browser Properties | No | Limited2 | Warn | Yes |
Manipulate Threads | No | Limited3 | Limited3 | Limited3 |
Exit HotJava | No | No | No | No |
Start Local Applications | No | No | Warn | Warn |
Link to Local Libraries or DLLs | No | No | No | Yes |
Listen on Network Port | No | Limited4 | Warn | Yes |
Accept Network Connection | No | Limited5 | Warn7 | Yes |
Connect to Another Computer | No | Limited6 | Warn7 | Yes |
Create Windows | No | Yes8 | Yes8 | Yes |
Access Clipboard | No | No | No | Yes |
Access Print Queue | No | No | No | Yes |
Access AWT Event Queue | No | No | No | Yes |
Permissions listed as "Warn" have the following behavior:
Each time one of the applets that fits a particular permission set (that is, from a single signer or from a particular site) attempts to access the controlled resource (for example, read a file) HotJava checks its list of granted permissions. If the specific permission has been granted, it is allowed. If it has not been granted, the user is queried through a dialog box to choose from either allowing this specific action (read the specified file), allowing all similar actions (read any file), or block the action (deny reading this file this time).
Footnotes:
1: Applets with Medium or High security that are loaded using the file: protocol have read access (without warning) to files in the directory where they were loaded from.
2: Individual properties can be exposed to High security applets by creating another property with a name in the form of <propertyname>.applet=true. For example, to allow applets access to the user.name property, add an additional property user.name.applet=true. See Customizing the HotJava Browser for information about editing the properties file. The default standard set of properties that applets have access to are java.version, java.vendor, java.vendor.url, java.class.version, os.name, os.version, os.arch, file.separator, path.separator, and line.separator.
3: Applets with Low, Medium, or High security may manipulate their own thread priorities.
4: Applets with High security may listen on ports 1024 and higher.
5: Applets with High security may accept connections from their originating site, but no others.
6: Applets with High security may connect to their originating site, but no others.
7: User is warned and can deny permission when an applet attempts any network access except when connecting to the applet's original site.
8: Windows created by applets with High or Medium security will show a warning banner.
Additional Restrictions and Permissions:
The current preferred method to set read and write permissions is to use the Advanced Applet Security user interface.
These access control lists are null by default. You can explicitly set access to individual files or directories by updating these properties in your HotJava Browser properties file. See Customizing the HotJava Browser for information about modifying your properties file.
If you allow an applet to read a directory, it can read all the files in that directory, including any files in any subdirectories of that directory. Also bear in mind that if you open up your file system for writing by applets, there is no way to limit the amount of disk space an applet might use.
Back to HotJava Browser Applet Security