org.mmbase.security
Class MMBaseCop

java.lang.Object
  extended by java.lang.SecurityManager
      extended by org.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 34900 2009-05-01 16:29:42Z michiel $
Author:
Eduard Witteveen
Javadoc:

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
protected  void copyActions(ActionRepository source, ActionRepository destination)
           
 ActionRepository getActionRepository()
           
 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

copyActions

protected void copyActions(ActionRepository source,
                           ActionRepository destination)
Since:
MMBase-1.9

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.

getActionRepository

public ActionRepository getActionRepository()
Since:
MMBase-1.9

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 2.0-SNAPSHOT - null