Pages

Tuesday, July 17, 2012

Sandbox model in Java

The Original Sandbox Model 
The original security model provided by the Java platform is known as the sandbox model, which existed in order to provide a very restricted environment in which to run untrusted code obtained from the open network. The essence of the sandbox model is that local code is trusted to have full access to vital system resources (such as the file system) while downloaded remote code (an applet) is not trusted and can access only the limited resources provided inside the sandbox.


Compilers and a bytecode verifier ensure that only legitimate Java bytecode are executed. The bytecode verifier, together with the Java Virtual Machine, guarantees language safety at run time.

A classloader defines a local name space, which can be used to ensure that an untrusted applet cannot interfere with the running of other programs.

Finally, access to crucial system resources is mediated by the Java Virtual Machine and is checked in advance by a SecurityManager class that restricts the actions of a piece of untrusted code to the bare minimum.

JDK 1.1 introduced the concept of a "signed applet", as illustrated by the figure below. In that release, a correctly digitally signed applet is treated as if it is trusted local code if the signature key is recognized as trusted by the end system that receives the applet. Signed applets, together with their signatures, are delivered in the JAR (Java Archive) format. In JDK 1.1, unsigned applets still run in the sandbox.


1 comment:

  1. Does your website have a contact page? I'm having
    problems locating it but, I'd like to send you an email.
    I've got some suggestions forr your blog you might be interested
    in hearing. Either way, great site and I lopk forward to seeing it develop over time.


    Here is my blog post :: EGO-T Electronic Cig Offers Genuine Experience

    ReplyDelete