| 
                  Java Security - Specification
                   An Introduction to the Internals  | 
            
| 
                   
                      
                     Prof. David Bernstein
                       | 
            
| Computer Science Department | 
| bernstdh@jmu.edu | 
               
            
         
            
         
         
            
         SecurityManager and 
              AccessController
                     
         
            
         Permission is just allowed or disallowed)abstract boolean implies(Permission other)
              returns true
              if this 
                        Permission
              implies other (i.e., if other
              is a subset of this)
         
            
         Permission objects represent positive permissions
              (i.e., approvals) so the absence of a particular permission
              is implicitly a denialPermission objects are immutable
                     
         
            
         
Permission Class
         
            
         public abstract String getActions():
      String representation of the
              actions (usually comma-delimited)public abstract boolean implies(Permission other):
      true if this 
              object's actions imply the other object's
              actions (i.e., if other is a subset of 
              this)
         
            
         PermissionCollection is not parameterized
              but the formal parameter of the add() method is a
              Permission
                     newPermissionCollection()
              in the Permission class to construct the
              PermissionCollection
                     
         
            
         Permission can't be
              denied by anotherimplies() method in 
              the PermissionCollection class can
              use short-circuiting
         
            
         CodeSource Class
         
            
         public CodeSource(URL url, Certificate[] certs)
                     public boolean implies(CodeSource other):
      true if other is a
              subset of this
              (e.g., http://cs.jmu.edu/ is a subset
              of http://jmu.edu/) and all
              of other's certificates are included
              in this'sPrincipal Interface
         
            
         
         
            
         ProtectionDomain objects are normally created
              by a ClassLoader
                     ProtectionDomain is only created the first time
              a CodeSource is encountered (so all classes 
              with the same CodeSource are mapped to the same
              ProtectionDomain)null class loader)
         
            
         CodeSource and ClassLoader) 
              not individual objectsPermission objects may be bound to
              a ProtectionDomain at load-time (e.g., by the
              ClassLoader)Permission objects may not be bound to a
              ProtectionDomain until
              the ProtectionDomain is used for a security
              check (e.g., by the Policy)