Package org.apache.hadoop.security.authorize

Examples of org.apache.hadoop.security.authorize.AccessControlList


    return clientCache.getClient(arg0.getJobID()).killTask(arg0, arg1);
  }

  @Override
  public AccessControlList getQueueAdmins(String arg0) throws IOException {
    return new AccessControlList("*");
  }
View Full Code Here


          } else if ("schedulingMode".equals(field.getTagName())) {
            String text = ((Text)field.getFirstChild()).getData().trim();
            queueModes.put(queueName, parseSchedulingMode(text));
          } else if ("aclSubmitApps".equals(field.getTagName())) {
            String text = ((Text)field.getFirstChild()).getData().trim();
            acls.put(QueueACL.SUBMIT_APPLICATIONS, new AccessControlList(text));
          } else if ("aclAdministerApps".equals(field.getTagName())) {
            String text = ((Text)field.getFirstChild()).getData().trim();
            acls.put(QueueACL.ADMINISTER_QUEUE, new AccessControlList(text));
          }
        }
        queueAcls.put(queueName, acls);
        if (maxQueueResources.containsKey(queueName) && minQueueResources.containsKey(queueName)
            && Resources.lessThan(maxQueueResources.get(queueName),
View Full Code Here

      if (queueAcls.containsKey(queue)) {
        out.putAll(queueAcls.get(queue));
      }
    }
    if (!out.containsKey(QueueACL.ADMINISTER_QUEUE)) {
      out.put(QueueACL.ADMINISTER_QUEUE, new AccessControlList("*"));
    }
    if (!out.containsKey(QueueACL.SUBMIT_APPLICATIONS)) {
      out.put(QueueACL.SUBMIT_APPLICATIONS, new AccessControlList("*"));
    }
    return out;
  }
View Full Code Here

    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);
  }
View Full Code Here

      // write "queue admins of the queue to which job is being submitted"
      // to job file.
      String queue = conf.get(MRJobConfig.QUEUE_NAME,
          JobConf.DEFAULT_QUEUE_NAME);
      AccessControlList acl = submitClient.getQueueAdmins(queue);
      conf.set(toFullPropertyName(queue,
          QueueACL.ADMINISTER_JOBS.getAclName()), acl.getAclString());

      // removing jobtoken referrals before copying the jobconf to HDFS
      // as the tasks don't need this setting, actually they may break
      // because of it if present as the referral will point to a
      // different job.
View Full Code Here

   * @return AccessControlList instance
   */
  public static AccessControlList getAdminAcls(Configuration conf,
      String configKey) {
    try {
      AccessControlList adminAcl =
        new AccessControlList(conf.get(configKey, " "));
      adminAcl.addUser(UserGroupInformation.getCurrentUser().
                       getShortUserName());
      return adminAcl;
    } catch (Exception ex) {
      throw new RuntimeException(ex);
    }
View Full Code Here

  }

  @Override
  public boolean checkAccess(UserGroupInformation callerUGI,
      JobACL jobOperation) {
    AccessControlList jobACL = jobACLs.get(jobOperation);
    return aclsManager.checkAccess(callerUGI, jobOperation, username, jobACL);
  }
View Full Code Here

  @Override
  public
      boolean checkAccess(UserGroupInformation callerUGI, JobACL jobOperation) {
    Map<JobACL, AccessControlList> jobACLs = jobInfo.getJobACLs();
    AccessControlList jobACL = jobACLs.get(jobOperation);
    return aclsMgr.checkAccess(callerUGI, jobOperation,
        jobInfo.getUsername(), jobACL);
  }
View Full Code Here

  @BeforeClass
  public static void setup() throws InterruptedException, IOException {
    Store store = StoreFactory.getStore(conf);
    conf.setBoolean(YarnConfiguration.YARN_ACL_ENABLE, true);
    AccessControlList adminACL = new AccessControlList("");
    adminACL.addGroup(SUPER_GROUP);
    conf.set(YarnConfiguration.YARN_ADMIN_ACL, adminACL.getAclString());
    resourceManager = new MockRM(conf) {
      protected ClientRMService createClientRMService() {
        return new ClientRMService(getRMContext(), this.scheduler,
            this.rmAppManager, this.applicationACLsManager, null);
      };
View Full Code Here

    return userClient;
  }

  private void verifyOwnerAccess() throws Exception {

    AccessControlList viewACL = new AccessControlList("");
    viewACL.addGroup(FRIENDLY_GROUP);
    AccessControlList modifyACL = new AccessControlList("");
    modifyACL.addUser(FRIEND);
    ApplicationId applicationId = submitAppAndGetAppId(viewACL, modifyACL);

    final GetApplicationReportRequest appReportRequest = recordFactory
        .newRecordInstance(GetApplicationReportRequest.class);
    appReportRequest.setApplicationId(applicationId);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.security.authorize.AccessControlList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.