# Re: [Q] Classloaders as a way to implement Security

Marianne Mueller (mrm@Eng)
Sun, 27 Jul 1997 17:44:36 -0700

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Marianne Mueller: "Re: Java Security question..."
- Previous message: Marianne Mueller: "Re: Can't find algorithms"
- Maybe in reply to: Tabrez Syed: "[Q] Classloaders as a way to implement Security"

    Date: Sun, 27 Jul 1997 17:44:36 -0700

    Message-Id: <199707280044.RAA09524@puffin.eng.sun.com>

    From: Marianne Mueller <mrm@Eng>

    To: tabrez@cs.utexas.edu

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

Hi,

In general it's not recommended that you create a custom class loader
(although I understand you might be doing this as part of research
project.) Check out the Java Language Spec and also the VM spec, for
information on the Java type system and the class loading algorithms.
(These are available as books from Addison Wesley.)

In the next major release of the JDK (public early access release
should be in autumn 1997), we are removing the tight correlation
between the classloader and the implementation of the security policy.

The system enforces security policy that is specified in an external
policy file, and it does so by enforcing ProtectionDomains. Each
class belongs to one and only one ProtectionDomain, which has a set of
permissions. The permissions are initialized from the external policy
configuration. In this way, we removed the explicit dependence on the
classloader and the classloaderdepth.

About your situation:

I don't see any deep problems with your experimental JDK; the main
drawback is that it won't be portable/interoperable with the standard
JDK. There shouldn't be any appreciable performance hit for using a
classloader for all classes, although as you point out this might
result in multiple copies of the same class being loaded into the
JVM.

The table that maintains a mapping between the classes and the
ProtectionDomain they belong to is an internal table that is not
exposed to any user code and that does not have any external APIs.
Each ProtectionDomain is tagged by the (URL,key) pair.

I don't understand what you mean by this:

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?

Marianne

- Next message: Marianne Mueller: "Re: Java Security question..."
- Previous message: Marianne Mueller: "Re: Can't find algorithms"
- Maybe in reply to: Tabrez Syed: "[Q] Classloaders as a way to implement Security"