Class BasicGroupAuthz
java.lang.Object
org.dogtagpki.server.authorization.AuthzManager
com.netscape.cms.authorization.BasicGroupAuthz
- All Implemented Interfaces:
IExtendedPluginInfo
-
Field Summary
FieldsFields inherited from class AuthzManager
config, engine, implName, nameFields inherited from interface IExtendedPluginInfo
HELP_TEXT, HELP_TOKEN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccessInit(String accessInfo) accessInitis for servlets who want to initialize their own authorization information before full operation.Get all registered evaluators.Check if the user is authorized to perform the given operation on the given resource.Return a table of evaluatorsGet individual ACL entry for the given name of entry.getACLs()Get ACL entriesString[]Get configuration parameters for this implementation.String[]This method returns an array of strings.voidinit(String name, String implName, AuthzManagerConfig config) Initialize this authorization manager.voidregisterEvaluator(String type, AccessEvaluator evaluator) Register new evaluatorvoidshutdown()Prepare this authorization manager for a graceful shutdown.voidupdateACLs(String id, String rights, String strACLs, String desc) Update ACLs in the databaseMethods inherited from class AuthzManager
getCMSEngine, getConfigStore, getImplName, getName, setCMSEngine
-
Field Details
-
logger
public static org.slf4j.Logger logger -
extendedPluginInfo
-
configParams
-
-
Constructor Details
-
BasicGroupAuthz
public BasicGroupAuthz()
-
-
Method Details
-
getExtendedPluginInfo
Description copied from interface:IExtendedPluginInfoThis method returns an array of strings. Each element of the array represents a configurable parameter, or some other meta-info (such as help-token) there is an entry indexed on that parameter name Where: type_info is either 'string', 'number', 'boolean', 'password' or 'choice(ch1,ch2,ch3,...)' If the marker 'required' is included after the type_info, the parameter will has some visually distinctive marking in the UI. 'description' is a short sentence describing the parameter 'choice' is rendered as a drop-down list. The first parameter in the list will be activated by default 'boolean' is rendered as a checkbox. The resulting parameter will be either 'true' or 'false' 'string' allows any characters 'number' allows only numbers 'password' is rendered as a password field (the characters are replaced with *'s when being types. This parameter is not passed through to the plugin. It is instead inserted directly into the password cache keyed on the instance name. The value of the parameter 'bindPWPrompt' (see example below) is set to the key. In addition to the configurable parameters, the following magic parameters may be defined: HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin HELP_TEXT;helptext - a general help string describing the plugin For example: "username;string;The username you wish to login as" "bindPWPrompt;password;Enter password to bind as above user with" "algorithm;choice(RSA,DSA);Which algorithm do you want to use" "enable;boolean;Do you want to run this plugin" "port;number;Which port number do you want to use"- Specified by:
getExtendedPluginInfoin interfaceIExtendedPluginInfo
-
accessInit
Description copied from class:AuthzManageraccessInitis 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: Example: resTurnKnob:left,right:allow(left) group="lefties":door knobs for lefties
- Specified by:
accessInitin classAuthzManager- Parameters:
accessInfo- the access info string in the format specified in the authorization manager- Throws:
EBaseException- error parsing the accessInfo
-
authorize
public AuthzToken authorize(AuthToken authToken, String resource, String operation) throws EAuthzInternalError, EAuthzAccessDenied Description copied from class:AuthzManagerCheck if the user is authorized to perform the given operation on the given resource.- Specified by:
authorizein classAuthzManager- Parameters:
authToken- the authToken associated with a user.resource- - the protected resource nameoperation- - the protected resource operation name- Returns:
- authzToken if the user is authorized
- Throws:
EAuthzInternalError- if an internal error occurred.EAuthzAccessDenied- if access denied
-
authorize
public AuthzToken authorize(AuthToken authToken, String expression) throws EAuthzInternalError, EAuthzAccessDenied - Specified by:
authorizein classAuthzManager- Throws:
EAuthzInternalErrorEAuthzAccessDenied
-
init
Description copied from class:AuthzManagerInitialize this authorization manager.- Specified by:
initin classAuthzManager- 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()Description copied from class:AuthzManagerPrepare this authorization manager for a graceful shutdown. Called when the server is exiting for any cleanup needed.- Specified by:
shutdownin classAuthzManager
-
getConfigParams
Description copied from class:AuthzManagerGet configuration parameters for this implementation. The configuration parameters returned is passed to the console so configuration for instances of this implementation can be made through the console.- Specified by:
getConfigParamsin classAuthzManager- Returns:
- a list of names for configuration parameters.
- Throws:
EBaseException- If an internal error occurred
-
getACLs
Description copied from class:AuthzManagerGet ACL entries- Specified by:
getACLsin classAuthzManager- Returns:
- collection of ACL entries.
-
getACL
Description copied from class:AuthzManagerGet individual ACL entry for the given name of entry.- Specified by:
getACLin classAuthzManager- Parameters:
target- The name of the ACL entry- Returns:
- The ACL entry.
-
updateACLs
Description copied from class:AuthzManagerUpdate ACLs in the database- Specified by:
updateACLsin classAuthzManager- Parameters:
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 resource- Throws:
EACLsException- when update fails.
-
aclEvaluatorElements
Description copied from class:AuthzManagerGet all registered evaluators.- Specified by:
aclEvaluatorElementsin classAuthzManager- Returns:
- All registered evaluators.
-
registerEvaluator
Description copied from class:AuthzManagerRegister new evaluator- Specified by:
registerEvaluatorin classAuthzManager- Parameters:
type- Type of evaluatorevaluator- Value of evaluator
-
getAccessEvaluators
Description copied from class:AuthzManagerReturn a table of evaluators- Specified by:
getAccessEvaluatorsin classAuthzManager- Returns:
- A table of evaluators
-