Interface IPolicyDecisionPoint
-
- All Superinterfaces:
IMyDataComponent
public interface IPolicyDecisionPoint extends IMyDataComponent
The PolicyDecisionPoint draws decisions based on the currently deployed policies.- Author:
- Fraunhofer IESE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddToBlacklist(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.AuthorizationDecisiondecisionRequest(Event event)Notifies the PDP about a certain event.List<AuthorizationDecision>decisionRequests(List<Event> events)Notifies the PDP about multiple events.booleandeploy(Policy policy, java.time.ZoneId zoneIdOfSolution)Deploys a policy.booleanevaluate(Event event)Evaluate an event.booleanevaluate(Set<Event> events)Evaluate multiple events.booleanisInFailureMode()booleanisWhitelistModeEnabled()Whitelist modeSet<String>listDeployedPolicies()Provides 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, java.time.ZoneId zoneIdOfSolution)Updates a policy.booleanupdatePolicyAndId(Policy policyWithNewId, java.time.ZoneId zoneIdOfSolution, PolicyId oldPolicyId)Update policyId-
Methods inherited from interface de.fraunhofer.iese.mydata.component.interfaces.IMyDataComponent
getHealth, getId, reset
-
-
-
-
Method Detail
-
addToBlacklist
boolean addToBlacklist(Set<SolutionId> ids) throws IOException
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
boolean clearAllCaches(@Nullable SolutionId solutionId) throws IOExceptionClears 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
List<AuthorizationDecision> decisionRequests(List<Event> events) throws IOException
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, java.time.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
boolean evaluate(Event event) throws IOException
Evaluate an event.- Parameters:
event- the event- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
evaluate
boolean evaluate(Set<Event> events) throws IOException
Evaluate multiple events.- Parameters:
events- the events- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
listDeployedPolicies
Set<String> listDeployedPolicies() throws IOException
Provides a list of currently deployed policy names.- Returns:
- list of currently deployed policy names
- Throws:
IOException- if there occurs a connection problem.
-
removeFromBlacklist
boolean removeFromBlacklist(Set<SolutionId> ids) throws IOException
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
boolean revokePolicy(PolicyId policyId) throws IOException, ResourceUpdateException
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
void setFailureMode(boolean active) throws IOExceptionSets the failure mode.- Parameters:
active- the new failure mode- Throws:
IOException- Signals that an I/O exception has occurred.
-
updatePolicy
boolean updatePolicy(Policy policy, java.time.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 policyorg.w3c.dom.DOMExceptionIllegalArgumentException
-
updatePolicyAndId
boolean updatePolicyAndId(Policy policyWithNewId, java.time.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
-
-