AccessControlList acl = new AccessControlList( conf.get(service.getServiceKey(), defaultAcl) ); AccessControlList blockedAcl = new AccessControlList( conf.get(service.getServiceKey() + BLOCKED, defaultBlockedAcl)); newAcls.put(service.getProtocol(), new AccessControlList[] {acl, blockedAcl}); String serviceHostsKey = getHostKey(service.getServiceKey()); MachineList machineList = new MachineList (conf.get(serviceHostsKey, defaultMachineList)); MachineList blockedMachineList = new MachineList(
private void rewriteHadoopPolicyFile(File policyFile) throws IOException { FileWriter fos = new FileWriter(policyFile); PolicyProvider policyProvider = new HDFSPolicyProvider(); fos.write("<configuration>\n"); for (Service service : policyProvider.getServices()) { String key = service.getServiceKey(); String value ="*"; if (key.equals("security.refresh.policy.protocol.acl")) { value = DUMMY_ACL; } fos.write("<property><name>"+ key + "</name><value>" + value + "</value></property>\n"); System.err.println("<property><name>"+ key + "</name><value>" + value + "</value></property>\n"); } fos.write("</configuration>\n"); fos.close(); }
AccessControlList acl = new AccessControlList( conf.get(service.getServiceKey(), defaultAcl) ); AccessControlList blockedAcl = new AccessControlList( conf.get(service.getServiceKey() + BLOCKED, defaultBlockedAcl)); newAcls.put(service.getProtocol(), new AccessControlList[] {acl, blockedAcl}); String serviceHostsKey = getHostKey(service.getServiceKey()); MachineList machineList = new MachineList (conf.get(serviceHostsKey, defaultMachineList)); MachineList blockedMachineList = new MachineList(
AccessControlList acl = new AccessControlList( conf.get(service.getServiceKey(), defaultAcl) ); AccessControlList blockedAcl = new AccessControlList( conf.get(service.getServiceKey() + BLOCKED, defaultBlockedAcl)); newAcls.put(service.getProtocol(), new AccessControlList[] {acl, blockedAcl}); String serviceHostsKey = getHostKey(service.getServiceKey()); MachineList machineList = new MachineList (conf.get(serviceHostsKey, defaultMachineList)); MachineList blockedMachineList = new MachineList(
AccessControlList acl = new AccessControlList( conf.get(service.getServiceKey(), defaultAcl) ); AccessControlList blockedAcl = new AccessControlList( conf.get(service.getServiceKey() + BLOCKED, defaultBlockedAcl)); newAcls.put(service.getProtocol(), new AccessControlList[] {acl, blockedAcl}); String serviceHostsKey = getHostKey(service.getServiceKey()); MachineList machineList = new MachineList (conf.get(serviceHostsKey, defaultMachineList)); MachineList blockedMachineList = new MachineList(
AccessControlList acl = new AccessControlList( conf.get(service.getServiceKey(), defaultAcl) ); AccessControlList blockedAcl = new AccessControlList( conf.get(service.getServiceKey() + BLOCKED, defaultBlockedAcl)); newAcls.put(service.getProtocol(), new AccessControlList[] {acl, blockedAcl}); String serviceHostsKey = getHostKey(service.getServiceKey()); MachineList machineList = new MachineList (conf.get(serviceHostsKey, defaultMachineList)); MachineList blockedMachineList = new MachineList(
AccessControlList acl = new AccessControlList( policyConf.get(service.getServiceKey(), AccessControlList.WILDCARD_ACL_VALUE) );