Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-8415

TimelineWebServices.getEntity should throw ForbiddenException instead of 404 when ACL checks fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0, 3.1.1
    • None
    • None
    • Reviewed

    Description

      private TimelineEntity doGetEntity(
            String entityType,
            String entityId,
            EnumSet<Field> fields,
            UserGroupInformation callerUGI) throws YarnException, IOException {
          TimelineEntity entity = null;
          entity =
              store.getEntity(entityId, entityType, fields);
          if (entity != null) {
            addDefaultDomainIdIfAbsent(entity);
            // check ACLs
            if (!timelineACLsManager.checkAccess(
                callerUGI, ApplicationAccessType.VIEW_APP, entity)) {
                entity = null;   //Should differentiate from an entity get failure vs ACL check failure here by throwing an Exception.*
            }
          }
          return entity;
        }
      

      Attachments

        1. YARN-8415.3.patch
          5 kB
          Suma Shivaprasad
        2. YARN-8415.2.patch
          5 kB
          Suma Shivaprasad
        3. YARN-8415.1.patch
          5 kB
          Suma Shivaprasad

        Activity

          People

            suma.shivaprasad Suma Shivaprasad
            ssathish@hortonworks.com Sumana Sathish
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: