com.netscape.certsrv.authorization
Interface IAuthzSubsystem

All Superinterfaces:
ISubsystem

public interface IAuthzSubsystem
extends ISubsystem

An interface that represents an authorization component

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Field Summary
static java.lang.String ID
          Constant for auths.
static java.lang.String PROP_CLASS
          Constant for class.
static java.lang.String PROP_IMPL
          Constant for impl
static java.lang.String PROP_INSTANCE
          Constant for instance.
static java.lang.String PROP_PLUGIN
          Constant for pluginName.
 
Method Summary
 void add(java.lang.String name, IAuthzManager authzMgr)
          Adds (registers) the given authorization manager.
 AuthzToken authorize(java.lang.String authzMgrName, IAuthToken authToken, java.lang.String exp)
           
 AuthzToken authorize(java.lang.String authzMgrName, IAuthToken authToken, java.lang.String resource, java.lang.String operation)
          authorize the user associated with the given authToken for a given operation with the given authorization manager name
 void authzMgrAccessInit(java.lang.String authzMgrName, java.lang.String accessInfo)
          Initialize authz info - usually used for BasicAclAuthz
 void delete(java.lang.String name)
          Deletes (deregisters) the given authorization manager.
 IAuthzManager get(java.lang.String name)
          Get an authorization manager interface for the given name.
 IAuthzManager getAuthzManager(java.lang.String name)
          Gets the Authorization manager instance of the specified name.
 IAuthzManager getAuthzManagerPlugin(java.lang.String name)
          Gets a single authorization manager plugin implementation
 java.util.Enumeration getAuthzManagerPlugins()
          Gets an enumeration of authorization manager plugins.
 java.util.Enumeration getAuthzManagers()
          Gets an enumeration of authorization managers registered to the authorization component.
 java.util.Hashtable getInstances()
          Get a hashtable containing all authentication instances.
 java.util.Hashtable getPlugins()
          Get a hashtable containing all authentication plugins.
 void log(int level, java.lang.String msg)
          Log error message.
 
Methods inherited from interface com.netscape.certsrv.base.ISubsystem
getConfigStore, getId, init, setId, shutdown, startup
 

Field Detail

ID

static final java.lang.String ID
Constant for auths.

See Also:
Constant Field Values

PROP_CLASS

static final java.lang.String PROP_CLASS
Constant for class.

See Also:
Constant Field Values

PROP_IMPL

static final java.lang.String PROP_IMPL
Constant for impl

See Also:
Constant Field Values

PROP_PLUGIN

static final java.lang.String PROP_PLUGIN
Constant for pluginName.

See Also:
Constant Field Values

PROP_INSTANCE

static final java.lang.String PROP_INSTANCE
Constant for instance.

See Also:
Constant Field Values
Method Detail

authorize

AuthzToken authorize(java.lang.String authzMgrName,
                     IAuthToken authToken,
                     java.lang.String resource,
                     java.lang.String operation)
                     throws EBaseException
authorize the user associated with the given authToken for a given operation with the given authorization manager name

Parameters:
authzMgrName - The authorization manager name
authToken - the authenticaton token associated with a user
resource - the resource protected by the authorization system
operation - the operation for resource protected by the authorization system
Returns:
a authorization token.
Throws:
EBaseException - If an error occurs during authorization.

authorize

AuthzToken authorize(java.lang.String authzMgrName,
                     IAuthToken authToken,
                     java.lang.String exp)
                     throws EBaseException
Throws:
EBaseException

add

void add(java.lang.String name,
         IAuthzManager authzMgr)
Adds (registers) the given authorization manager.

Parameters:
name - The authorization manager name
authzMgr - The authorization manager instance.

delete

void delete(java.lang.String name)
Deletes (deregisters) the given authorization manager.

Parameters:
name - The authorization manager name to delete.

getAuthzManager

IAuthzManager getAuthzManager(java.lang.String name)
                              throws EBaseException
Gets the Authorization manager instance of the specified name.

Parameters:
name - The authorization manager's name.
Returns:
an authorization manager interface
Throws:
EBaseException

getAuthzManagers

java.util.Enumeration getAuthzManagers()
Gets an enumeration of authorization managers registered to the authorization component.

Returns:
a list of authorization managers

authzMgrAccessInit

void authzMgrAccessInit(java.lang.String authzMgrName,
                        java.lang.String accessInfo)
                        throws EBaseException
Initialize authz info - usually used for BasicAclAuthz

Parameters:
authzMgrName - name of the authorization manager
accessInfo - string representation of the ACL
Throws:
EBaseException - if authorization manager is not found

getAuthzManagerPlugins

java.util.Enumeration getAuthzManagerPlugins()
Gets an enumeration of authorization manager plugins.

Returns:
list of authorization manager plugins

getAuthzManagerPlugin

IAuthzManager getAuthzManagerPlugin(java.lang.String name)
Gets a single authorization manager plugin implementation

Parameters:
name - given authorization plugin name
Returns:
authorization manager plugin

log

void log(int level,
         java.lang.String msg)
Log error message.

Parameters:
level - log level
msg - error message

getPlugins

java.util.Hashtable getPlugins()
Get a hashtable containing all authentication plugins.

Returns:
all authentication plugins.

getInstances

java.util.Hashtable getInstances()
Get a hashtable containing all authentication instances.

Returns:
all authentication instances.

get

IAuthzManager get(java.lang.String name)
Get an authorization manager interface for the given name.

Parameters:
name - given authorization manager name.
Returns:
an authorization manager interface