Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1782

Workflow path not found is thrown as SC_UNAUTHORIZED

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

       
      AuthorizationService.java
      ....
      Path path = new Path(appPath);
      try {
      	if (!fs.exists(path)) {
          	incrCounter(INSTR_FAILED_AUTH_COUNTER, 1);
              throw new AuthorizationException(ErrorCode.E0504, appPath);
          }
      
      BaseJobServlet.java 
      ......
      if (wfPath != null) {
                      auth.authorizeForApp(user, acl, wfPath, "workflow.xml", conf);
                  }
                  else if (coordPath != null){
                      auth.authorizeForApp(user, acl, coordPath, "coordinator.xml", conf);
                  }
                  else if (bundlePath != null){
                      auth.authorizeForApp(user, acl, bundlePath, "bundle.xml", conf);
                  }
              }
              catch (AuthorizationException ex) {
                  XLog.getLog(BaseJobServlet.class).info("AuthorizationException ", ex);
                  throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED, ex);
              }
      
      

      Path not found should be a SC_BAD_REQUEST not SC_UNAUTHORIZED.

      Attachments

        1. OOZIE-1782-V1.patch
          8 kB
          Purshotam Shah
        2. OOZIE-1782-V2.patch
          8 kB
          Purshotam Shah

        Activity

          People

            puru Purshotam Shah
            puru Purshotam Shah
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: