# [Q] Classloaders as a way to implement Security

Tabrez Syed (tabrez@cs.utexas.edu)
Sat, 26 Jul 1997 16:46:47 -0500 (CDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Rukaiya Sogiawala: "Java Security question..."
- Previous message: Guy Rosen: "Re: JCE international"
- Next in thread: Marianne Mueller: "Re: [Q] Classloaders as a way to implement Security"

    Date: Sat, 26 Jul 1997 16:46:47 -0500 (CDT)

    From: Tabrez Syed <tabrez@cs.utexas.edu>

    To: java-security@web2.javasoft.com

    Subject: [Q] Classloaders as a way to implement Security

Hello All,

I have some questions about implementing security policies and would
appreciate any comments you can send me.

My question is about Java Security based on the Security Manager
implementation. I have the following implementation:

I create an unique class loader called CustomClassLoader for every program
that I want to run in my system. Each CustomClassLoader has a private data
member called SecurityPolicy which has a list of the resources allowed or
disallowed to the program loaded by the classloader.

When my Security Manager is called it retrieves the classloader associated
with the class making the call and looks at the SecurityPolicy object.
Based on the rules in the SecurityPolicy object the call is allowed or
disallowed.

Each class loader loads only those classes that are needed by the program.

The downside to this approach is that the same class might be loaded into
memory more than once by different classloaders. But the advantage is that
it is a simple method of distinguishing between different programs making the
same call. All programs, irrespective of whether they are in the same filesystem
or across a network are loaded using a classloader and they are accorded
only the privileges specified in the SecurityPolicy object associated with
the classloader.

My first question is:

Are there any problems with this implementation? Are there any performance
issues assocaited with deploying multiple classloaders.

Secondly:

I understand that each class is annotated with a reference to its
classloader. This fact is the basis of the entire implementation. Is there
a case where this is not true?

Thirdly:

Having perused the new Security Architecture in the JDK 1.2 specs I noticed
that the SecureClassLoader will first check to see if the class is already
loaded before loading it. In the case that there are multiple instances of
the Secure Class loader what annotation will be given to the Class
when two class loaders requires that one class be loaded?

Thanks in Advance for all your Help

Tabrez

________________________________________________________________
You cannot achieve the impossible without attempting the absurd.
________________________________________________________________
Tabrez Syed
Dept. of Computer Sciences UPE Events Chair
University of Texas at Austin
URL: http://www.cs.utexas.edu/users/tabrez

- Next message: Rukaiya Sogiawala: "Java Security question..."
- Previous message: Guy Rosen: "Re: JCE international"
- Next in thread: Marianne Mueller: "Re: [Q] Classloaders as a way to implement Security"