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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0, 3.1.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: