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

Allow direct access to individual cluster nodes' UI behind proxy and ensure writing & loading of valid flow.xml.gz

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.13.2
    • Fix Version/s: None
    • Component/s: Core Framework

      Description

      Enable direct access to individual cluster nodes' UI when they are behind a proxy. New property "nifi.web.context.root" is added to nifi.properties and is set to be the web context root to which all NiFi webapps should be deployed.

      For example, for a cluster with two nodes should have "nifi.web.context.root" set to "/node1" for node 1 and "/node2" for node 2. Consequently, the URL to the UI of node 1 and 2 are http://<hostname>:<port>/node1/nifi and http://<hostname>:<port>/node2/nifi respectively, where hostname and port are those of a proxy and the same for both nodes. And so are all NiFi framework webapps and extension UIs, e.g. /node1/nifi-api, /node1/nifi-docs.

      This functionality requires reverse proxy in Apache's mod_proxy config file. Each node has a separate <Location> entry like this:

      <Location "/node1/nifi">
      RequestHeader add X-ProxyScheme "http"
      RequestHeader add X-ProxyHost "proxy-host"
      RequestHeader add X-ProxyPort "proxy-port"
      ProxyPass http://node1-host[:port]/node1/nifi
      ProxyPassReverse http://node1-host[:port]/node1/nifi
      </Location>
      <Location "/node1/nifi-api">
      RequestHeader add X-ProxyScheme "http"
      RequestHeader add X-ProxyHost "proxy-host"
      RequestHeader add X-ProxyPort "proxy-port"
      ProxyPass http://node1-host[:port]/node1/nifi-api
      ProxyPassReverse http://node1-host[:port]/node1/nifi-api
      </Location>

      <Location "/node2/nifi">
      RequestHeader add X-ProxyScheme "http"
      RequestHeader add X-ProxyHost "proxy-host"
      RequestHeader add X-ProxyPort "proxy-port"
      ProxyPass http://node2-host[:port]/node2/nifi
      ProxyPassReverse http://node2-host[:port]/node2/nifi
      </Location>
      <Location "/node2/nifi-api">
      RequestHeader add X-ProxyScheme "http"
      RequestHeader add X-ProxyHost "proxy-host"
      RequestHeader add X-ProxyPort "proxy-port"
      ProxyPass http://node2-host[:port]/node2/nifi-api
      ProxyPassReverse http://node2-host[:port]/node2/nifi-api
      </Location>

      Where proxy-host and proxy-port are those of the proxy server.

      In addition, this issue also looks at minor improvement in writing and reading of flow.xml.gz to prevent it from being corrupt or invalid when running in a cluster environment in version 1.11.4.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                phuthientran Phu-Thien Tran
                Reporter:
                phuthientran Phu-Thien Tran
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: