public static SecurityWrapper GetCurrentSecurityLevel(ProxyLoader pl, ServletContext app, HttpServletRequest request, HttpServletResponse response) throws Exception { if (pl == null) { pl = ProxyLoader.getInstance(app); } PCS pcs = pl.GetPCS(app, request, response); GetGlobalPolicyResponseMsg globalPolicy = pcs.getGlobalPolicy(new GetGlobalPolicyRequestMsg()); return globalPolicy.getClassification(); }
private SecurityWrapper getCurrentOperatingClassificationLevel() { try { SecurityWrapper t = getGlobalPolicyFromDB().getClassification(); log.log(Level.INFO, "PCS, current security classification is " + Utility.ICMClassificationToString(t.getClassification()) + " " + t.getCaveats()); return t; } catch (Exception ex) { log.log(Level.ERROR, "Unable to determine current classification level. Is the database available?", ex); } throw new IllegalAccessError(); }