Class BasicAclAuthz
java.lang.Object
com.netscape.cms.authorization.AAclAuthz
com.netscape.cms.authorization.BasicAclAuthz
- All Implemented Interfaces:
IExtendedPluginInfo, IAuthzManager
A class for basic acls authorization manager
- Version:
- $Revision$, $Date$
-
Nested Class Summary
Nested classes/interfaces inherited from class AAclAuthz
AAclAuthz.EvaluationOrder -
Field Summary
Fields inherited from class AAclAuthz
ACLS_ATTR, logger, mConfigParams, mExtendedPluginInfo, PROP_CLASS, PROP_EVAL, PROP_IMPLFields inherited from interface IExtendedPluginInfo
HELP_TEXT, HELP_TOKEN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(String name, String implName, AuthzManagerConfig config) Initializesvoidshutdown()graceful shutdownMethods inherited from class AAclAuthz
accessInit, aclEvaluatorElements, aclResElements, addACLs, authorize, authorize, checkAllowEntries, checkDenyEntries, checkPermission, checkPermission, evaluateACLs, getAccessEvaluators, getACL, getACLs, getConfigParams, getConfigStore, getEntries, getExtendedPluginInfo, getImplName, getName, getNodes, getOrder, getTargetNames, isTypeUnique, registerEvaluator, updateACLsModifier and TypeMethodDescriptionvoidaccessInit(String accessInfo) accessInitis for servlets who want to initialize their own authorization information before full operation.gets an enumeration of access evaluatorsgets an enumeration of resourcesvoidParse ACL resource attributes, then update the ACLs memory store This is intended to be used if storing ACLs on ldap is not desired, and the caller is expected to call this method to add resource and acl info into acls memory store.authorize(IAuthToken authToken, String expression) authorize(IAuthToken authToken, String resource, String operation) check the authorization permission for the user associated with authToken on operation Example: For example, if UsrGrpAdminServlet needs to authorize the caller it would do be done in the following fashion: try { authzTok = mAuthz.authorize( "DirAclAuthz", authToken, RES_GROUP, "read"); } catch (EBaseException e) { logger.warn("authorize call: " + e.getMessage(), e); }protected booleancheckAllowEntries(IAuthToken authToken, Iterable<String> nodes, String perm) protected voidcheckDenyEntries(IAuthToken authToken, Iterable<String> nodes, String perm) throw EACLsException if a deny entry is matchedvoidcheckPermission(IAuthToken authToken, String name, String perm) Checks if the permission is granted or denied with id from authtoken gotten from authentication that precedes authorization.protected voidcheckPermission(String name, String perm) Checks if the permission is granted or denied in the current execution context.booleanevaluateACLs(IAuthToken authToken, String exp) gets the access evaluatorsGet individual ACL entry for the given name of entry.getACLs()Get ACL entriesString[]Returns a list of configuration parameter names.Returns the configuration store used by this Authz mgrgetEntries(ACLEntry.Type entryType, Iterable<String> nodes, String operation) String[]getExtendedPluginInfo(Locale locale) gets the plugin name of this authorization manager.getName()gets the name of this authorization manager instancestatic AAclAuthz.EvaluationOrdergetOrder()protected Enumeration<String> booleanisTypeUnique(String type) is this resource name uniquevoidregisterEvaluator(String type, IAccessEvaluator evaluator) Registers new handler for the given attribute type in the expressions.voidupdateACLs(String id, String rights, String strACLs, String desc) This one only updates the memory.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IExtendedPluginInfo
getExtendedPluginInfoModifier and TypeMethodDescriptionString[]getExtendedPluginInfo(Locale locale) This method returns an array of strings.
-
Constructor Details
-
BasicAclAuthz
public BasicAclAuthz()Default constructor
-
-
Method Details
-
init
Description copied from class:AAclAuthzInitializes- Specified by:
initin interfaceIAuthzManager- Overrides:
initin classAAclAuthz- Parameters:
name- The name of this authorization manager instance.implName- The name of the authorization manager plugin.config- The configuration store for this authorization manager.- Throws:
EBaseException- If an initialization error occurred.
-
shutdown
public void shutdown()graceful shutdown- Specified by:
shutdownin interfaceIAuthzManager- Specified by:
shutdownin classAAclAuthz
-