@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 reloadPolicies(Context context) throws Exception { enforceReloadPolicies(context); xacmlPep.newPdp(); }
@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 reloadPolicies(Context context) throws Exception { enforceReloadPolicies(context); xacmlPep.newPdp(); }
@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 postInitModule() throws ModuleInitializationException { try { getServer().getStatusFile() .append(ServerState.STARTING, "Initializing XACML Authorization Module"); xacmlPep = getServer().getBean(PolicyEnforcementPoint.class.getName(), PolicyEnforcementPoint.class); xacmlPep.newPdp(); } catch (Throwable e1) { throw new ModuleInitializationException(e1.getMessage(), getRole(), e1); } }
@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 postInitModule() throws ModuleInitializationException { try { getServer().getStatusFile() .append(ServerState.STARTING, "Initializing XACML Authorization Module"); xacmlPep = getServer().getBean(PolicyEnforcementPoint.class.getName(), PolicyEnforcementPoint.class); xacmlPep.newPdp(); } catch (Throwable e1) { throw new ModuleInitializationException(e1.getMessage(), getRole(), e1); } }
@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 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 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 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"); } }
@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"); } }