Interface IPolicyDecisionPoint
- All Superinterfaces:
IMyDataComponent
The PolicyDecisionPoint draws decisions based on the currently deployed policies.
- Author:
- Fraunhofer IESE
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddToBlacklist(Set<SolutionId> ids) Adds a solution the to blacklist.booleanclearAllCaches(SolutionId solutionId) Clears all caches of the PDP (response and connector caches) about data related to the specified solution or any if solutionId==null.decisionRequest(Event event) Notifies the PDP about a certain event.decisionRequests(List<Event> events) Notifies the PDP about multiple events.booleanDeploys a policy.booleanEvaluate an event.booleanEvaluate multiple events.booleanbooleanWhitelist modeProvides a list of currently deployed policy names.booleanremoveFromBlacklist(Set<SolutionId> ids) Removes a solution from the blacklist.booleanrevokePolicy(PolicyId policyId) Revokes a policy.voidsetFailureMode(boolean active) Sets the failure mode.booleanupdatePolicy(Policy policy, ZoneId zoneIdOfSolution) Updates a policy.booleanupdatePolicyAndId(Policy policyWithNewId, ZoneId zoneIdOfSolution, PolicyId oldPolicyId) Update policyIdMethods inherited from interface de.fraunhofer.iese.mydata.component.interfaces.IMyDataComponent
getHealth, getId, reset
-
Method Details
-
addToBlacklist
Adds a solution the to blacklist.- Parameters:
ids- the ids- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
clearAllCaches
Clears all caches of the PDP (response and connector caches) about data related to the specified solution or any if solutionId==null.- Parameters:
solutionId- can be null to clear any data from the caches- Returns:
- true, if cache was cleaned
- Throws:
IOException- if there occurs a connection problem.
-
decisionRequest
AuthorizationDecision decisionRequest(Event event) throws IOException, EvaluationUndecidableException Notifies the PDP about a certain event. Based on the event, the policies are evaluated and decision is drawn.- Parameters:
event- the occurred event- Returns:
- the
AuthorizationDecisionwith respect to the event and deployed policies - Throws:
IOException- if there occurs a connection problem.EvaluationUndecidableException- if PDP can't evaluate the event due to internal ambiguity.
-
decisionRequests
Notifies the PDP about multiple events. Based on the events, the policies are evaluated and decision is drawn.- Parameters:
events- the occurred events- Returns:
- the
AuthorizationDecisions with respect to the event and deployed policies - Throws:
IOException- if there occurs a connection problem.
-
deploy
boolean deploy(Policy policy, ZoneId zoneIdOfSolution) throws IOException, ConflictingPolicyException Deploys a policy.- Parameters:
policy- the policy to deployzoneIdOfSolution- zoneId of solution- Returns:
- true if the policy is deployed, false otherwise
- Throws:
IOException- if there occurs a connection problem.ConflictingPolicyException- if multiple policy with same component_id are found in PMP
-
evaluate
Evaluate an event.- Parameters:
event- the event- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
evaluate
Evaluate multiple events.- Parameters:
events- the events- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
listDeployedPolicies
Provides a list of currently deployed policy names.- Returns:
- list of currently deployed policy names
- Throws:
IOException- if there occurs a connection problem.
-
removeFromBlacklist
Removes a solution from the blacklist.- Parameters:
ids- the ids- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
revokePolicy
Revokes a policy.- Parameters:
policyId- the name of the policy to be revoked- Returns:
- true if the policy is revoked, false otherwise
- Throws:
IOException- if there occurs a connection problem.ResourceUpdateException- fails to revoke the policy
-
isInFailureMode
boolean isInFailureMode() -
setFailureMode
Sets the failure mode.- Parameters:
active- the new failure mode- Throws:
IOException- Signals that an I/O exception has occurred.
-
updatePolicy
boolean updatePolicy(Policy policy, ZoneId zoneIdOfSolution) throws IOException, ResourceUpdateException Updates a policy.- Parameters:
policy- the policy to be updatedzoneIdOfSolution- zoneId of solution- Returns:
- true if the policy is updated, false otherwise
- Throws:
IOException- if there occurs a connection problem.ResourceUpdateException- fails to update the policyDOMExceptionIllegalArgumentException
-
updatePolicyAndId
boolean updatePolicyAndId(Policy policyWithNewId, ZoneId zoneIdOfSolution, PolicyId oldPolicyId) throws IOException, ResourceUpdateException Update policyId- Parameters:
policyWithNewId- the policy with the new idzoneIdOfSolution- zoneId of solutionoldPolicyId- the previous policy id- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.ResourceUpdateException- the policy update exception
-
isWhitelistModeEnabled
boolean isWhitelistModeEnabled()Whitelist mode- Returns:
- true if whitelist mode is enabled, false is blacklist mode
-