use of ddf.security.pdp.realm.xacml.processor.PdpException in project ddf by codice.
the class XacmlPdp method isPermitted.
protected boolean isPermitted(RequestType xacmlRequest) {
boolean permitted;
ResponseType xacmlResponse;
try {
LOGGER.debug("Calling PDP to evaluate XACML request.");
xacmlResponse = pdp.evaluate(xacmlRequest);
LOGGER.debug("Received response from PDP.");
permitted = xacmlResponse != null && xacmlResponse.getResult().get(0).getDecision() == DecisionType.PERMIT;
LOGGER.debug("Permitted: {}", permitted);
} catch (PdpException e) {
LOGGER.debug(e.getMessage(), e);
permitted = false;
}
return permitted;
}
Aggregations