/** {@inheritDoc} */ @Override public AccessControlList getQueueAdmins(String queueName) throws IOException { return new AccessControlList("*"); }
@Override public Writable newInstance() { return new AccessControlList(); } });
public Builder setAdmins(String admins) { if (admins != null) { setContextAttribute(ADMINS_ACL, new AccessControlList(admins)); } return this; }
String aclKey = getAclKey(entry.getKey()); if (!proxyUserAcl.containsKey(aclKey)) { proxyUserAcl.put(aclKey, new AccessControlList( allMatchKeys.get(aclKey + CONF_USERS) , allMatchKeys.get(aclKey + CONF_GROUPS)));
for (Service service : services) { AccessControlList acl = new AccessControlList( conf.get(service.getServiceKey(), defaultAcl) ); AccessControlList blockedAcl = new AccessControlList( conf.get(service.getServiceKey() + BLOCKED, defaultBlockedAcl));
.setACL(new AccessControlList("userA,userB groupC,groupD")).build(); myServer.setAttribute(HttpServer.CONF_CONTEXT_ATTRIBUTE, conf); myServer.start();
private DFSZKFailoverController(Configuration conf, NNHAServiceTarget localTarget) { super(conf, localTarget); this.localNNTarget = localTarget; // Setup ACLs adminAcl = new AccessControlList( conf.get(DFSConfigKeys.DFS_ADMIN, " ")); LOG.info("Failover controller configured for NameNode " + localTarget); }
.setName("datanode") .setConf(confForInfoServer) .setACL(new AccessControlList(conf.get(DFS_ADMIN, " "))) .hostName(getHostnameForSpnegoPrincipal(confForInfoServer)) .addEndpoint(URI.create("http://localhost:" + proxyPort))
.setConf(conf).setACL(new AccessControlList(conf.get(DFS_ADMIN, " "))) .setSecurityEnabled(UserGroupInformation.isSecurityEnabled()) .setUsernameConfKey(spnegoUserNameKey)
/** * @see org.apache.hadoop.mapreduce.protocol.ClientProtocol#getQueueAdmins(String) */ public AccessControlList getQueueAdmins(String queueName) throws IOException { return new AccessControlList(" ");// no queue admins for local job runner }
@Override public void init(Configuration conf) { adminAcl = new AccessControlList(conf.get(YarnConfiguration.YARN_ADMIN_ACL, YarnConfiguration.DEFAULT_YARN_ADMIN_ACL)); }
private DFSZKFailoverController(Configuration conf, NNHAServiceTarget localTarget) { super(conf, localTarget); this.localNNTarget = localTarget; // Setup ACLs adminAcl = new AccessControlList( conf.get(DFSConfigKeys.DFS_ADMIN, " ")); LOG.info("Failover controller configured for NameNode " + localTarget); }
public void addApplication(ApplicationId appId, Map<ApplicationAccessType, String> acls) { Map<ApplicationAccessType, AccessControlList> finalMap = new HashMap<ApplicationAccessType, AccessControlList>(acls.size()); for (Entry<ApplicationAccessType, String> acl : acls.entrySet()) { finalMap.put(acl.getKey(), new AccessControlList(acl.getValue())); } this.applicationACLS.put(appId, finalMap); }
public Map<QueueACL, AccessControlList> getQueueAcls() { Map<QueueACL, AccessControlList> acls = new HashMap<QueueACL, AccessControlList>(); for (QueueACL acl : QueueACL.values()) { acls.put(acl, new AccessControlList("*")); } return acls; }
public Map<QueueACL, AccessControlList> getQueueAcls() { Map<QueueACL, AccessControlList> acls = new HashMap<QueueACL, AccessControlList>(); for (QueueACL acl : QueueACL.values()) { acls.put(acl, new AccessControlList("*")); } return acls; }
@Override public void refreshAdminAcls() throws IOException { UserGroupInformation user = checkAcls("refreshAdminAcls"); Configuration conf = createConf(); adminAcl = new AccessControlList(conf.get(JHAdminConfig.JHS_ADMIN_ACL, JHAdminConfig.DEFAULT_JHS_ADMIN_ACL)); HSAuditLogger.logSuccess(user.getShortUserName(), "refreshAdminAcls", HISTORY_ADMIN_SERVER); }
public void testWildCardAccessControlList() throws Exception { AccessControlList acl; acl = new AccessControlList("*"); assertTrue(acl.isAllAllowed()); acl = new AccessControlList(" * "); assertTrue(acl.isAllAllowed()); acl = new AccessControlList(" *"); assertTrue(acl.isAllAllowed()); acl = new AccessControlList("* "); assertTrue(acl.isAllAllowed()); }
public AccessControlList getAcl(String queue, QueueACL acl) { String queuePrefix = getQueuePrefix(queue); // The root queue defaults to all access if not defined // Sub queues inherit access if not defined String defaultAcl = queue.equals(ROOT) ? ALL_ACL : NONE_ACL; String aclString = get(queuePrefix + getAclKey(acl), defaultAcl); return new AccessControlList(aclString); }
@Test public void testWildCardAccessControlList() throws Exception { AccessControlList acl; acl = new AccessControlList("*"); assertTrue(acl.isAllAllowed()); acl = new AccessControlList(" * "); assertTrue(acl.isAllAllowed()); acl = new AccessControlList(" *"); assertTrue(acl.isAllAllowed()); acl = new AccessControlList("* "); assertTrue(acl.isAllAllowed()); }
@Test public void testWildCardAccessControlList() throws Exception { AccessControlList acl; acl = new AccessControlList("*"); assertTrue(acl.isAllAllowed()); acl = new AccessControlList(" * "); assertTrue(acl.isAllAllowed()); acl = new AccessControlList(" *"); assertTrue(acl.isAllAllowed()); acl = new AccessControlList("* "); assertTrue(acl.isAllAllowed()); }