Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-12696

Fix authorization issues when requesting FlowAnalysisResults

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-M3
    • None
    • None

    Description

      When requesting FlowAnalysisResults the authorization logic performed has a couple of issues:

      1. Doesn't handle exceptions thrown when the a component producing a result is tested to be a Port. The logic goes through possible component types and when reaches Ports it throws an exception.
      2. As the logic goest through possible components, the mismatching ones throw ResourceNotFoundExceptions. These are captured but this is a bad practice in general. Throwing and capturing exceptions in non-exceptional cases is bad from both design and performance perspective.
      3. The number of possible components checked is too limited. If a component is unrecognized, the corresponding violation will have a PermissionDTO attached with canRead and canWrite set to false, essentially rendering the result unavailable and thus leading to a false negative.

      Attachments

        Issue Links

          Activity

            People

              tpalfy Tamas Palfy
              tpalfy Tamas Palfy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m