JMU
The Java Security Architecture
An Overview of the Internals


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


The Participants
The Participants (cont.)
The Participants (cont.)
The Participants (cont.)
Steps Taken when Running a Program
  1. A .class file is read and the bytecodes are (statically) verified
  2. The file's origin is determined and, if one exists, the signature is verified (and the information is encapsulated in a CodeSource object)
  3. The set of static persmissions is determined based on the origin (and encapsulated in Permission objects)
  4. A ProtectionDomain object is created or re-used
  5. The class is loaded (using a ClassLoader)
  6. Objects are instantiated and used; when a security check is invoked and one or more methods of the class is in the call chain, an AccessController is used
    • The Policy is (constructed if necessary and) consulted and the set of permissions to be granted is determined based on the ProtectionDomain
  7. The set of permissions is consulted to determine if the execution can continue (if not, a SecurityException java.lang.SecurityException is thrown)
Desirable Features of this Architecture