/** * @deprecated use getResourceId() to get the id of the resource */ public String getResource() { return getResourceId(); }
/** * Creates a unique key from the request object. * */ private String getCacheKey(final PDPRequest req) { // here we try to generate a hopefull unique "cachekey" // using the id of the user // the environment attributes, // and the the resource and action id String resource = req.getTarget().getResourceId(); String action = req.getTarget().getActionId(); String env = String.valueOf(req.getEnvironment().hashCode()); SubjectPrincipalAnalyzer principalAnalyzer = new SubjectPrincipalAnalyzer(req.getTarget().getSubject()); String userid = principalAnalyzer.getUsername(); LicenseReference licref = LicensingUtils.getLicenseReference(req.getTarget().getSubject()); String licId = licref != null ? licref.getLicenseId() : ""; if (userid == null) { userid = "#anonymous#"; } String key = new StringBuffer() .append("U:").append(userid) .append(";R:").append(resource) .append(";A:").append(action) .append(";L:").append(licId) .append(";E:").append(env).toString(); if (LOG.isTraceEnabled()) { LOG.trace("generate hash-key <" + key + "> for request <" + req + ">"); } return key; }
String id = (String) allIds.getItem(t.getResourceId()).getAppItem(); if (!response.isPermit()) { notAllowedIds.add(id);
String id = (String) allIds.getItem(t.getResourceId()).getAppItem(); if (response.isPermit()) { allowedIds.add(id);
String id = (String) allIds.getItem(t.getResourceId()).getAppItem(); if (!response.isPermit()) { notAllowedIds.add(id);
String targetResource = t.getResourceId();
int lDecision = to52nDecision(lResult.getDecision()); String lResourceId = pRequest.getTarget().getResourceId(); if (!lResourceId.equals(lResult.getResourceId())) {
String targetResourceId = t.getResourceId();
String targetResourceId = t.getResourceId();
if (!response.isPermit()) { Target t = requestForResponse.getTarget(); String id = (String) targetItems.getItem(t.getResourceId()).getAppItem(); for (int i = 0; i < nl.getLength(); i++) { if (nl.item(i).getTextContent().equalsIgnoreCase(id))
String id = (String) allIds.getItem(t.getResourceId()).getAppItem(); if (!response.isPermit()) { notAllowedIds.add(id); String id = (String) allIds.getItem(t.getResourceId()).getAppItem(); if (!response.isPermit()) { notAllowedIds.add(id);
String id = (String) allIds.getItem(t.getResourceId()).getAppItem(); String reponseElemId = (String) allIds.getItem(t.getResourceId()).getAppItem();
String id = (String) allIds.getItem(t.getResourceId()).getAppItem(); String reponseElemId = (String) allIds.getItem(t.getResourceId()).getAppItem(); String reponseElemId = (String) allIds.getItem(t.getResourceId()).getAppItem();
if (!response.isPermit()) { Target t = requestForResponse.getTarget(); Node processNode = (Node) allIds.getItem(t.getResourceId()).getAppItem(); processNode.getParentNode().removeChild(processNode);
String resource = response.getRequest().getTarget().getResourceId();
if (!pdpresponse.isPermit()) { Target t = requestForResponse.getTarget(); String id = (String) allProcessIdentifiers.getItem(t.getResourceId()).getAppItem(); throw new EnforcementServiceException("Denied process <" + id + "> requested ");
String resource = (String) allIds.getItem(response.getRequest().getTarget().getResourceId()).getAppItem();
private RequestDocument convert52nRequestToXACMLRequest(final PDPRequest pRequest) throws XmlException { RequestDocument lDoc = RequestDocument.Factory.newInstance(); RequestType lRequest = lDoc.addNewRequest(); Target target = pRequest.getTarget(); convertEnvironmentToXACMLEnvironment(pRequest.getEnvironment(), lRequest); convertSubjectToXACMLSubject(target.getSubject(), lRequest); convertLicensePrincipalOfSubjectToXACMLEnvironment(target.getSubject(), lRequest); // todo: support complex resource and action attributes and not only id's convertResourceToXACMLResource(target.getResourceId(), lRequest); convertActionToXACMLAction(target.getActionId(), lRequest); // type is ignored ! return lDoc; }