public interface IAuthzManager
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 |
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 |
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 |
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 |
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
|
java.lang.String getName()
java.lang.String getImplName()
An example of an implementation name will be:
com.netscape.cms.BasicAclAuthz
void accessInit(java.lang.String accessInfo) throws EBaseException
accessInit
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
accessInfo
- the access info string in the format specified in the authorization managerEBaseException
- error parsing the accessInfoAuthzToken authorize(IAuthToken authToken, java.lang.String resource, java.lang.String operation) throws EAuthzInternalError, EAuthzAccessDenied
authToken
- the authToken associated with a user.resource
- - the protected resource nameoperation
- - the protected resource operation nameEAuthzInternalError
- if an internal error occurred.EAuthzAccessDenied
- if access deniedAuthzToken authorize(IAuthToken authToken, java.lang.String expression) throws EAuthzInternalError, EAuthzAccessDenied
void init(java.lang.String name, java.lang.String implName, IConfigStore config) throws EBaseException
name
- 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.void shutdown()
java.lang.String[] getConfigParams() throws EBaseException
EBaseException
- If an internal error occurredIConfigStore getConfigStore()
java.util.Enumeration getACLs()
IACL getACL(java.lang.String target)
target
- The name of the ACL entryvoid updateACLs(java.lang.String id, java.lang.String rights, java.lang.String strACLs, java.lang.String desc) throws EACLsException
id
- 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.java.util.Enumeration aclEvaluatorElements()
void registerEvaluator(java.lang.String type, IAccessEvaluator evaluator)
type
- Type of evaluatorevaluator
- Value of evaluatorjava.util.Hashtable getAccessEvaluators()