blackboard.platform.security
Class BbPolicy

java.lang.Object
  extended by java.security.Policy
      extended by blackboard.platform.security.BbPolicy

public class BbPolicy
extends java.security.Policy

Blackboard-specific security policy. This is used during system startup to create permissions for the Blackboard web applications and system extensions.

Since:
Blackboard 6.0
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Constructor Summary
BbPolicy(java.security.Policy defaultPolicy)
           
 
Method Summary
 void addCodeSource(java.security.CodeSource codeSource, java.security.PermissionCollection perms)
          Used to set the permissions associated with all code sources used in the application.
static java.security.Permissions getDefaultPermissions()
           
 java.security.PermissionCollection getPermissions(java.security.CodeSource codesource)
          Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source.
 void refresh()
          Refreshes/reloads the policy configuration.
 void removeCodeSource(java.security.CodeSource codeSource)
          Removes the specified code source from the list of policy entries
 
Methods inherited from class java.security.Policy
getPermissions, getPolicy, implies, setPolicy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BbPolicy

public BbPolicy(java.security.Policy defaultPolicy)
         throws InitializationException
Throws:
InitializationException
Method Detail

addCodeSource

public void addCodeSource(java.security.CodeSource codeSource,
                          java.security.PermissionCollection perms)
Used to set the permissions associated with all code sources used in the application. Basically, all known Blackboard web applications are blessed with AllPermission. Code sources associated with user-installed extensions are associated only with the permissions declared in the extension manifest, and acknowledged by the administrator at installation time.

Throws:
InitializationException - This exception will be thrown if some error occurs reading the permission definitions, or the file system components for installed web applications.

removeCodeSource

public void removeCodeSource(java.security.CodeSource codeSource)
Removes the specified code source from the list of policy entries

Parameters:
codeSource - Code source to remove

getPermissions

public java.security.PermissionCollection getPermissions(java.security.CodeSource codesource)
Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source.

Specified by:
getPermissions in class java.security.Policy
Parameters:
codesource - the CodeSource associated with the caller. This encapsulates the original location the code (where the code came from) and the public key(s) of its signer.
Returns:
the set of permissions allowed for code from codesource according to the policy.
Throws:
java.lang.SecurityException - if the current thread does not have permission to call getPermissions on the policy object.

refresh

public void refresh()
Refreshes/reloads the policy configuration. The behavior of this method depends on the implementation. For example, calling refresh on a file-based policy will cause the file to be re-read.

Specified by:
refresh in class java.security.Policy
Throws:
java.lang.SecurityException - if the current thread does not have permission to refresh this Policy object.

getDefaultPermissions

public static java.security.Permissions getDefaultPermissions()


Copyright © 2003 Blackboard, Inc. All Rights Reserved.