org.mmbase.security
Class MMBaseCop

java.lang.Object
  extended byjava.lang.SecurityManager
      extended byorg.mmbase.security.MMBaseCop

public class MMBaseCop
extends SecurityManager

This class is the main class of the security system. It loads the authentication and authorization classes if needed, and they can be requested from this manager.

Version:
$Id: MMBaseCop.java,v 1.22 2005/09/16 13:14:48 michiel Exp $
Author:
Eduard Witteveen
Warning: No Java Documentation Available.

Field Summary
 
Fields inherited from class java.lang.SecurityManager
inCheck
 
Constructor Summary
MMBaseCop()
          The constructor, will load the classes for authorization and authentication with their config files, as specied in the xml from configUrl
 
Method Summary
 boolean checkSharedSecret(String received)
          checks if the received shared secret is equals to your own shared secret
 boolean getActive()
          Returns the authorization class, which should be used(for optimizations)
 Authentication getAuthentication()
          Returns the authentication class, which should be used.
 Authorization getAuthorization()
          Returns the authorization class, which should be used.
 String getSharedSecret()
          get the shared Secret
 void reload()
          reload, will load the classes for authorization and authentication with their config files, as specied in the xml from configUrl
 
Methods inherited from class java.lang.SecurityManager
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPermission, checkPermission, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MMBaseCop

public MMBaseCop()
          throws IOException,
                 NoSuchMethodException,
                 SecurityException
The constructor, will load the classes for authorization and authentication with their config files, as specied in the xml from configUrl

Throws:
IOException - When reading the file failed
NoSuchMethodException - When a tag was not specified
SecurityException - When the class could not be loaded
Method Detail

reload

public void reload()
            throws IOException,
                   NoSuchMethodException,
                   SecurityException
reload, will load the classes for authorization and authentication with their config files, as specied in the xml from configUrl

Throws:
IOException - When reading the file failed
NoSuchMethodException - When a tag was not specified
SecurityException - When the class could not be loaded

getAuthentication

public Authentication getAuthentication()
Returns the authentication class, which should be used.

Returns:
The authentication class which should be used.

getAuthorization

public Authorization getAuthorization()
Returns the authorization class, which should be used.

Returns:
The authorization class which should be used.

getActive

public boolean getActive()
Returns the authorization class, which should be used(for optimizations)

Returns:
trueWhen the SecurityManager should be used. falseWhen not.

checkSharedSecret

public boolean checkSharedSecret(String received)
checks if the received shared secret is equals to your own shared secret

Parameters:
received - shared secret
Returns:
true if received shared secret equals your own shared secret

getSharedSecret

public String getSharedSecret()
get the shared Secret

Returns:
the shared Secret


MMBase build 1.8.1.20060716