Class RBACAuthorization
java.lang.Object
com.tremolosecurity.az.RBACAuthorization
- All Implemented Interfaces:
CustomAuthorization
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn ths current workflowvoid
Initializes the custom AZ rule with the configurationboolean
isAuthorized
(AuthInfo subject, String... params) Determines if the subject in the parameter is authorized by this rulelistPossibleApprovers
(String... params) Provides a list of subjects that could be authorized based on this rule.void
Sets the config manager for access to Unison resources, run on each de-serializationvoid
setWorkflow
(Workflow wf) Sets the workflow this rule will be a part of.
-
Constructor Details
-
RBACAuthorization
public RBACAuthorization()
-
-
Method Details
-
init
Description copied from interface:CustomAuthorization
Initializes the custom AZ rule with the configuration- Specified by:
init
in interfaceCustomAuthorization
- Parameters:
config
- Name/Value pairs- Throws:
AzException
-
loadConfigManager
Description copied from interface:CustomAuthorization
Sets the config manager for access to Unison resources, run on each de-serialization- Specified by:
loadConfigManager
in interfaceCustomAuthorization
- Parameters:
cfg
-- Throws:
AzException
-
setWorkflow
Description copied from interface:CustomAuthorization
Sets the workflow this rule will be a part of. Called after cloning an instance of the rule for a particular workflow- Specified by:
setWorkflow
in interfaceCustomAuthorization
- Parameters:
wf
-- Throws:
AzException
-
isAuthorized
Description copied from interface:CustomAuthorization
Determines if the subject in the parameter is authorized by this rule- Specified by:
isAuthorized
in interfaceCustomAuthorization
- Parameters:
subject
- Subject to be testedparams
- List of optional values specific to this call- Returns:
- True if authorized, False if not
- Throws:
AzException
-
listPossibleApprovers
Description copied from interface:CustomAuthorization
Provides a list of subjects that could be authorized based on this rule. The value of each list item should be the distinguished name of the user in Unison- Specified by:
listPossibleApprovers
in interfaceCustomAuthorization
- Parameters:
params
- List of optional values specific to this call- Returns:
- Throws:
AzException
-
getWorkflow
Description copied from interface:CustomAuthorization
Return ths current workflow- Specified by:
getWorkflow
in interfaceCustomAuthorization
- Returns:
-