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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPolicyEnforcementPoint(IMyDataEnvironment myDataEnvironment, DecisionEnforcer decisionEnforcer) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidPublish the event and enforce theAuthorizationDecisiontoEventvoidenforceDecision(Event event, AuthorizationDecision authorizationDecision) Impose theAuthorizationDecisionauthorizationDecision onEventevent.getDecision(Event event) getId()booleanDefault initializer that establishes the connection to PDP.booleanreset()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 theAuthorizationDecisiontoEvent- Specified by:
enforcein 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 theAuthorizationDecisionauthorizationDecision onEventevent.- Specified by:
enforceDecisionin 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:
getDecisionin interfaceIPolicyEnforcementPoint- Throws:
EvaluationUndecidableExceptionIOException
-
getId
- Specified by:
getIdin interfaceIMyDataComponent- Returns:
- The id of the component.
-
initialize
Default initializer that establishes the connection to PDP.- Specified by:
initializein interfaceIPolicyEnforcementPoint- Throws:
NoSuchEntityExceptionIOException
-
reset
Reset the PDP connection.- Specified by:
resetin interfaceIMyDataComponent- Returns:
- true, if successful.
- Throws:
NoSuchEntityExceptionIOException
-
getHealth
- Specified by:
getHealthin interfaceIMyDataComponent
-