org.mmbase.security
Class MMBaseCopConfig

java.lang.Object
  extended byorg.mmbase.security.MMBaseCopConfig

public class MMBaseCopConfig
extends java.lang.Object

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: MMBaseCopConfig.java,v 1.16.2.1 2004/05/24 17:11:56 michiel Exp $
Author:
Eduard Witteveen
Warning: No Java Documentation Available.

Field Summary
static java.lang.String DTD_SECURITY_1_0
          DTD resource filename of the Builder DTD version 1.0
static java.lang.String PUBLIC_ID_SECURITY_1_0
          Public ID of the Builder DTD version 1.0
 
Constructor Summary
MMBaseCopConfig(MMBaseCop mmbaseCop, java.io.File configFile)
          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(java.lang.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.
 java.lang.String getSharedSecret()
          get the shared Secret
static void registerPublicIDs()
           
 void startWatching()
          starts tracking changes on the files...
 void stopWatching()
          stops tracking changes on the files...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLIC_ID_SECURITY_1_0

public static final java.lang.String PUBLIC_ID_SECURITY_1_0
Public ID of the Builder DTD version 1.0

See Also:
Constant Field Values

DTD_SECURITY_1_0

public static final java.lang.String DTD_SECURITY_1_0
DTD resource filename of the Builder DTD version 1.0

See Also:
Constant Field Values
Constructor Detail

MMBaseCopConfig

public MMBaseCopConfig(MMBaseCop mmbaseCop,
                       java.io.File configFile)
                throws java.io.IOException,
                       java.lang.NoSuchMethodException,
                       SecurityException
The constructor, will load the classes for authorization and authentication with their config files, as specied in the xml from configUrl

Parameters:
mmbaseCop - The MMBaseCop for which this is a configurator
configFile - Configuration file ('security.xml')
Throws:
java.io.IOException - When reading the file failed
java.lang.NoSuchMethodException - When a tag was not specified
SecurityException - When the class could not be loaded
Method Detail

registerPublicIDs

public static void registerPublicIDs()

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(java.lang.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

stopWatching

public void stopWatching()
stops tracking changes on the files...


startWatching

public void startWatching()
starts tracking changes on the files...


getSharedSecret

public java.lang.String getSharedSecret()
get the shared Secret

Returns:
the shared Secret


MMBase build 1.7.1.20041002