public class BasicGroupAuthz extends java.lang.Object implements IAuthzManager, IExtendedPluginInfo
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String[] |
configParams |
protected static java.util.Vector<java.lang.String> |
extendedPluginInfo |
HELP_TEXT, HELP_TOKEN| Constructor and Description |
|---|
BasicGroupAuthz() |
| Modifier and Type | Method and Description |
|---|---|
void |
accessInit(java.lang.String accessInfo)
accessInit is for servlets who want to initialize their
own authorization information before full operation. |
java.util.Enumeration<IAccessEvaluator> |
aclEvaluatorElements()
Get all registered evaluators.
|
AuthzToken |
authorize(IAuthToken authToken,
java.lang.String expression) |
AuthzToken |
authorize(IAuthToken authToken,
java.lang.String resource,
java.lang.String operation)
Check if the user is authorized to perform the given operation on the
given resource.
|
java.util.Hashtable<java.lang.String,IAccessEvaluator> |
getAccessEvaluators()
Return a table of evaluators
|
IACL |
getACL(java.lang.String target)
Get individual ACL entry for the given name of entry.
|
java.util.Enumeration<ACL> |
getACLs()
Get ACL entries
|
java.lang.String[] |
getConfigParams()
Get configuration parameters for this implementation.
|
IConfigStore |
getConfigStore()
Get the configuration store for this authorization manager.
|
java.lang.String[] |
getExtendedPluginInfo(java.util.Locale locale)
This method returns an array of strings.
|
java.lang.String |
getImplName()
Get implementation name of authorization manager plugin.
|
java.lang.String |
getName()
Get the name of this authorization manager instance.
|
void |
init(java.lang.String name,
java.lang.String implName,
IConfigStore config)
Initialize this authorization manager.
|
void |
registerEvaluator(java.lang.String type,
IAccessEvaluator evaluator)
Register new evaluator
|
void |
shutdown()
Prepare this authorization manager for a graceful shutdown.
|
void |
updateACLs(java.lang.String id,
java.lang.String rights,
java.lang.String strACLs,
java.lang.String desc)
Update ACLs in the database
|
protected static java.util.Vector<java.lang.String> extendedPluginInfo
protected static java.lang.String[] configParams
public java.lang.String[] getExtendedPluginInfo(java.util.Locale locale)
IExtendedPluginInfogetExtendedPluginInfo in interface IExtendedPluginInfopublic java.lang.String getName()
IAuthzManagergetName in interface IAuthzManagerpublic java.lang.String getImplName()
IAuthzManagerAn example of an implementation name will be:
com.netscape.cms.BasicAclAuthz
getImplName in interface IAuthzManagerpublic void accessInit(java.lang.String accessInfo)
throws EBaseException
IAuthzManageraccessInit is for servlets who want to initialize their
own authorization information before full operation. It is supposed
to be called from the authzMgrAccessInit() method of the AuthzSubsystem.
The accessInfo format is determined by each individual authzmgr. For example, for BasicAclAuthz, The accessInfo is the resACLs, whose format should conform to the following:
:right-1[,right-n]:[allow,deny](right(s))=:
Example: resTurnKnob:left,right:allow(left) group="lefties":door knobs for lefties
accessInit in interface IAuthzManageraccessInfo - the access info string in the format specified in the authorization managerEBaseException - error parsing the accessInfopublic AuthzToken authorize(IAuthToken authToken, java.lang.String resource, java.lang.String operation) throws EAuthzInternalError, EAuthzAccessDenied
IAuthzManagerauthorize in interface IAuthzManagerauthToken - the authToken associated with a user.resource - - the protected resource nameoperation - - the protected resource operation nameEAuthzInternalError - if an internal error occurred.EAuthzAccessDenied - if access deniedpublic AuthzToken authorize(IAuthToken authToken, java.lang.String expression) throws EAuthzInternalError, EAuthzAccessDenied
authorize in interface IAuthzManagerEAuthzInternalErrorEAuthzAccessDeniedpublic void init(java.lang.String name,
java.lang.String implName,
IConfigStore config)
throws EBaseException
IAuthzManagerinit in interface IAuthzManagername - The name of this authorization manager instance.implName - The name of the authorization manager plugin.config - The configuration store for this authorization manager.EBaseException - If an initialization error occurred.public void shutdown()
IAuthzManagershutdown in interface IAuthzManagerpublic java.lang.String[] getConfigParams()
throws EBaseException
IAuthzManagergetConfigParams in interface IAuthzManagerEBaseException - If an internal error occurredpublic IConfigStore getConfigStore()
IAuthzManagergetConfigStore in interface IAuthzManagerpublic java.util.Enumeration<ACL> getACLs()
IAuthzManagergetACLs in interface IAuthzManagerpublic IACL getACL(java.lang.String target)
IAuthzManagergetACL in interface IAuthzManagertarget - The name of the ACL entrypublic void updateACLs(java.lang.String id,
java.lang.String rights,
java.lang.String strACLs,
java.lang.String desc)
throws EACLsException
IAuthzManagerupdateACLs in interface IAuthzManagerid - The name of the ACL entry (ie, resource id)rights - The allowable rights for this resourcestrACLs - The value of the ACL entrydesc - The description for this resourceEACLsException - when update fails.public java.util.Enumeration<IAccessEvaluator> aclEvaluatorElements()
IAuthzManageraclEvaluatorElements in interface IAuthzManagerpublic void registerEvaluator(java.lang.String type,
IAccessEvaluator evaluator)
IAuthzManagerregisterEvaluator in interface IAuthzManagertype - Type of evaluatorevaluator - Value of evaluatorpublic java.util.Hashtable<java.lang.String,IAccessEvaluator> getAccessEvaluators()
IAuthzManagergetAccessEvaluators in interface IAuthzManager