@Override public void enforceRIFindObjects(Context context) throws AuthzException { try { logger.debug("Entered enforceRIFindObjects"); String target = Constants.ACTION.RI_FIND_OBJECTS.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIA.uri, "", "", context); } finally { logger.debug("Exiting enforceRIFindObjects"); } }
@Override public void enforceOAIRespond(Context context) throws AuthzException { try { logger.debug("Entered enforceOAIRespond"); String target = Constants.ACTION.OAI.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, "", "", "", context); } finally { logger.debug("Exiting enforceOAIRespond"); } }
@Override public void enforceServerStatus(Context context) throws AuthzException { try { logger.debug("Entered enforceServerStatus"); String target = Constants.ACTION.SERVER_STATUS.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, "", "", "", context); } finally { logger.debug("Exiting enforceServerStatus"); } }
@Override public void enforceRIFindObjects(Context context) throws AuthzException { try { logger.debug("Entered enforceRIFindObjects"); String target = Constants.ACTION.RI_FIND_OBJECTS.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIA.uri, "", "", context); } finally { logger.debug("Exiting enforceRIFindObjects"); } }
@Override public void enforceServerStatus(Context context) throws AuthzException { try { logger.debug("Entered enforceServerStatus"); String target = Constants.ACTION.SERVER_STATUS.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, "", "", "", context); } finally { logger.debug("Exiting enforceServerStatus"); } }
@Override public void enforceOAIRespond(Context context) throws AuthzException { try { logger.debug("Entered enforceOAIRespond"); String target = Constants.ACTION.OAI.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, "", "", "", context); } finally { logger.debug("Exiting enforceOAIRespond"); } }
@Override public void enforceFindObjects(Context context) throws AuthzException { try { logger.debug("Entered enforceFindObjects"); String target = Constants.ACTION.FIND_OBJECTS.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIA.uri, "", "", context); } finally { logger.debug("Exiting enforceFindObjects"); } }
@Override public void enforceUpload(Context context) throws AuthzException { try { logger.debug("Entered enforceUpload"); String target = Constants.ACTION.UPLOAD.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, "", "", "", context); } finally { logger.debug("Exiting enforceUpload"); } }
@Override public void enforceReloadPolicies(Context context) throws AuthzException { try { logger.debug("Entered enforceReloadPolicies"); String target = Constants.ACTION.RELOAD_POLICIES.uri; context.setResourceAttributes(null); context.setActionAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, "", "", "", context); } finally { logger.debug("Exiting enforceReloadPolicies"); } }
@Override public void enforceFindObjects(Context context) throws AuthzException { try { logger.debug("Entered enforceFindObjects"); String target = Constants.ACTION.FIND_OBJECTS.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIA.uri, "", "", context); } finally { logger.debug("Exiting enforceFindObjects"); } }
@Override public void enforceUpload(Context context) throws AuthzException { try { logger.debug("Entered enforceUpload"); String target = Constants.ACTION.UPLOAD.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, "", "", "", context); } finally { logger.debug("Exiting enforceUpload"); } }
@Override public void enforceReloadPolicies(Context context) throws AuthzException { try { logger.debug("Entered enforceReloadPolicies"); String target = Constants.ACTION.RELOAD_POLICIES.uri; context.setResourceAttributes(null); context.setActionAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, "", "", "", context); } finally { logger.debug("Exiting enforceReloadPolicies"); } }
@Override public void enforceDescribeRepository(Context context) throws AuthzException { try { logger.debug("Entered enforceDescribeRepository"); String target = Constants.ACTION.DESCRIBE_REPOSITORY.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIA.uri, "", "", context); } finally { logger.debug("Exiting enforceDescribeRepository"); } }
@Override public void enforceDescribeRepository(Context context) throws AuthzException { try { logger.debug("Entered enforceDescribeRepository"); String target = Constants.ACTION.DESCRIBE_REPOSITORY.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIA.uri, "", "", context); } finally { logger.debug("Exiting enforceDescribeRepository"); } }
/** * Creates a new audit record and adds it to the digital object audit trail. */ private void addAuditRecord(Context context, DOWriter w, String action, String componentID, String justification, Date nowUTC) throws ServerException { AuditRecord audit = new AuditRecord(); audit.id = w.newAuditRecordID(); audit.processType = "Fedora API-M"; audit.action = action; audit.componentID = componentID; audit.responsibility = context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri); audit.date = nowUTC; audit.justification = justification; w.getAuditRecords().add(audit); }
@Override public void enforceGetObjectHistory(Context context, String pid) throws AuthzException { try { logger.debug("Entered enforceGetObjectHistory"); String target = Constants.ACTION.GET_OBJECT_HISTORY.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIA.uri, pid, extractNamespace(pid), context); } finally { logger.debug("Exiting enforceGetObjectHistory"); } }
/** * Creates a new audit record and adds it to the digital object audit trail. */ private void addAuditRecord(Context context, DOWriter w, String action, String componentID, String justification, Date nowUTC) throws ServerException { AuditRecord audit = new AuditRecord(); audit.id = w.newAuditRecordID(); audit.processType = "Fedora API-M"; audit.action = action; audit.componentID = componentID; audit.responsibility = context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri); audit.date = nowUTC; audit.justification = justification; w.getAuditRecords().add(audit); }
@Override public final void enforcePurgeObject(Context context, String pid) throws AuthzException { try { logger.debug("Entered enforcePurgeObject"); String target = Constants.ACTION.PURGE_OBJECT.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIM.uri, pid, extractNamespace(pid), context); } finally { logger.debug("Exiting enforcePurgeObject"); } }
@Override public void enforceGetObjectHistory(Context context, String pid) throws AuthzException { try { logger.debug("Entered enforceGetObjectHistory"); String target = Constants.ACTION.GET_OBJECT_HISTORY.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIA.uri, pid, extractNamespace(pid), context); } finally { logger.debug("Exiting enforceGetObjectHistory"); } }
@Override public final void enforcePurgeObject(Context context, String pid) throws AuthzException { try { logger.debug("Entered enforcePurgeObject"); String target = Constants.ACTION.PURGE_OBJECT.uri; context.setActionAttributes(null); context.setResourceAttributes(null); xacmlPep.enforce(context.getSubjectValue(Constants.SUBJECT.LOGIN_ID.uri), target, Constants.ACTION.APIM.uri, pid, extractNamespace(pid), context); } finally { logger.debug("Exiting enforcePurgeObject"); } }