@Override public Service[] getServices() { return new Service [] { new Service("security.client.protocol.acl", AuthenticationProtos.AuthenticationService.BlockingInterface.class)}; } });
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( conf.get(serviceHostsKey + BLOCKED, defaultBlockedMachineList)); newMachineLists.put(service.getProtocol(), new MachineList[] {machineList, blockedMachineList});
AccessControlList acl = new AccessControlList( policyConf.get(service.getServiceKey(), AccessControlList.WILDCARD_ACL_VALUE) ); newAllowPermissions.add(service.getPermission()); if (LOG.isDebugEnabled()) { LOG.debug("Policy - " + service.getPermission() + " * "); addPermission(newPermissions, new User(user), service.getPermission()); addPermission(newPermissions, new Group(group), service.getPermission());
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(); }
Service[] hdfsServices = new HDFSPolicyProvider().getServices(); for (Service service : hdfsServices) { if (!protocolsWithAcls.contains(service.getProtocol())) fail("service authorization manager has no entry for protocol " + service.getProtocol()); hdfsServices = new HDFSPolicyProvider().getServices(); for (Service service : hdfsServices) { if (!protocolsWithAcls.contains(service.getProtocol())) fail("service authorization manager has no entry for protocol " + service.getProtocol());
@Override public Service[] getServices() { if (services != null) return services; synchronized (servicesLock) { if (services != null) return services; Service[] parentSvc = super.getServices(); Service[] result = Arrays.copyOf(parentSvc, parentSvc.length + 1); result[parentSvc.length] = new Service( TezConstants.TEZ_AM_SECURITY_SERVICE_AUTHORIZATION_TASK_UMBILICAL, LlapTaskUmbilicalProtocol.class); return (services = result); } } }
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( conf.get(serviceHostsKey + BLOCKED, defaultBlockedMachineList)); newMachineLists.put(service.getProtocol(), new MachineList[] {machineList, blockedMachineList});
@Override public Service[] getServices() { return new Service[] { new Service( YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONHISTORY_PROTOCOL, ApplicationHistoryProtocolPB.class) }; }
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( conf.get(serviceHostsKey + BLOCKED, defaultBlockedMachineList)); newMachineLists.put(service.getProtocol(), new MachineList[] {machineList, blockedMachineList});
@Override public Service[] getServices() { return new Service[] { new Service( YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONHISTORY_PROTOCOL, ApplicationHistoryProtocolPB.class) }; }
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( conf.get(serviceHostsKey + BLOCKED, defaultBlockedMachineList)); newMachineLists.put(service.getProtocol(), new MachineList[] {machineList, blockedMachineList});
@Override public Service[] getServices() { return new Service[] { new Service( YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_APPLICATIONHISTORY_PROTOCOL, ApplicationHistoryProtocolPB.class) }; }
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( conf.get(serviceHostsKey + BLOCKED, defaultBlockedMachineList)); newMachineLists.put(service.getProtocol(), new MachineList[] {machineList, blockedMachineList});
@Override public Service[] getServices() { return new Service[] { new Service(ACL_CONFIG, TestProtocol.class) }; }
@Override public Service[] getServices() { return (new Service[]{ new Service(StreamingContainerUmbilicalProtocol.class .getName(), StreamingContainerUmbilicalProtocol.class) }); }
@Override public Service[] getServices() { return new Service [] { new Service("security.client.protocol.acl", AuthenticationProtos.AuthenticationService.BlockingInterface.class)}; } });
@Override public Service[] getServices() { return new Service[] { new Service(ACL_CONFIG, TestProtocol.class) }; }
@Override public Service[] getServices() { return new Service[] { new Service(ACL_CONFIG, TestProtocol.class) }; }