Package de.fraunhofer.iese.mydata.pep
Class DefaultPolicyEnforcementPoint
java.lang.Object
de.fraunhofer.iese.mydata.pep.DefaultPolicyEnforcementPoint
- All Implemented Interfaces:
IMyDataComponent
,IPolicyEnforcementPoint
- Direct Known Subclasses:
PolicyEnforcementPoint
This class should be used with Spring auto registration
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultPolicyEnforcementPoint
(IMyDataEnvironment myDataEnvironment, DecisionEnforcer decisionEnforcer) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Publish the event and enforce theAuthorizationDecision
toEvent
void
enforceDecision
(Event event, AuthorizationDecision authorizationDecision) Impose theAuthorizationDecision
authorizationDecision onEvent
event.getDecision
(Event event) getId()
boolean
Default initializer that establishes the connection to PDP.boolean
reset()
Reset the PDP connection.
-
Field Details
-
myDataEnvironment
-
-
Constructor Details
-
DefaultPolicyEnforcementPoint
public DefaultPolicyEnforcementPoint(IMyDataEnvironment myDataEnvironment, DecisionEnforcer decisionEnforcer) Constructor- Parameters:
myDataEnvironment
- the IMyDataEnvironment the PEP belongs todecisionEnforcer
- concrete implementation of decisionEnforcer
-
-
Method Details
-
enforce
public void enforce(Event event) throws EvaluationUndecidableException, InhibitException, IOException Publish the event and enforce theAuthorizationDecision
toEvent
- Specified by:
enforce
in interfaceIPolicyEnforcementPoint
- Parameters:
event
- The event to publish.- Throws:
EvaluationUndecidableException
- if PDP can't decide.InhibitException
- if event is not allowedIOException
- if connection to PDP is not established
-
enforceDecision
public void enforceDecision(Event event, AuthorizationDecision authorizationDecision) throws InhibitException Impose theAuthorizationDecision
authorizationDecision onEvent
event.- Specified by:
enforceDecision
in interfaceIPolicyEnforcementPoint
- Parameters:
event
- on which authorizationDecision to be imposeauthorizationDecision
- the decision to enforce on event- Throws:
InhibitException
- if event is not allowed
-
getDecision
public AuthorizationDecision getDecision(Event event) throws EvaluationUndecidableException, IOException - Specified by:
getDecision
in interfaceIPolicyEnforcementPoint
- Throws:
EvaluationUndecidableException
IOException
-
getId
- Specified by:
getId
in interfaceIMyDataComponent
- Returns:
- The id of the component.
-
initialize
Default initializer that establishes the connection to PDP.- Specified by:
initialize
in interfaceIPolicyEnforcementPoint
- Throws:
NoSuchEntityException
IOException
-
reset
Reset the PDP connection.- Specified by:
reset
in interfaceIMyDataComponent
- Returns:
- true, if successful.
- Throws:
NoSuchEntityException
IOException
-
getHealth
- Specified by:
getHealth
in interfaceIMyDataComponent
-