NIFI-9038: Fix fingerprinting group access control policies for Remote
Port

This closes #5300

Signed-off-by: David Handermann <exceptionfactory@apache.org>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java
index 6cd55cd..ffaf032 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java
@@ -359,7 +359,6 @@
         appendFirstValue(builder, DomUtils.getChildNodesByTagName(processGroupElem, "defaultBackPressureObjectThreshold"));
         appendFirstValue(builder, DomUtils.getChildNodesByTagName(processGroupElem, "defaultBackPressureDataSizeThreshold"));
 
-
         final Element versionControlInfo = DomUtils.getChild(processGroupElem, "versionControlInformation");
         if (versionControlInfo == null) {
             builder.append("NO_VERSION_CONTROL_INFORMATION");
@@ -567,6 +566,7 @@
         appendFirstValue(builder, DomUtils.getChildNodesByTagName(portElem, "name"));
         appendFirstValue(builder, DomUtils.getChildNodesByTagName(portElem, "allowRemoteAccess"));
 
+        // user access control
         final NodeList userAccessControlNodeList = DomUtils.getChildNodesByTagName(portElem, "userAccessControl");
         if (userAccessControlNodeList == null || userAccessControlNodeList.getLength() == 0) {
             builder.append("NO_USER_ACCESS_CONTROL");
@@ -581,7 +581,8 @@
             }
         }
 
-        final NodeList groupAccessControlNodeList = DomUtils.getChildNodesByTagName(portElem, "userAccessControl");
+        // group access control
+        final NodeList groupAccessControlNodeList = DomUtils.getChildNodesByTagName(portElem, "groupAccessControl");
         if (groupAccessControlNodeList == null || groupAccessControlNodeList.getLength() == 0) {
             builder.append("NO_GROUP_ACCESS_CONTROL");
         } else {
@@ -682,7 +683,6 @@
         return builder;
     }
 
-
     private StringBuilder addConnectionFingerprint(final StringBuilder builder, final Element connectionElem) throws FingerprintException {
         // id
         appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, "id"));
@@ -895,21 +895,11 @@
     }
 
     private String getValue(final Node node, final String defaultValue) {
-        final String value;
-        if (node.getTextContent() == null || StringUtils.isBlank(node.getTextContent())) {
-            value = defaultValue;
-        } else {
-            value = node.getTextContent().trim();
-        }
-        return value;
+        return StringUtils.isBlank(node.getTextContent()) ? defaultValue : node.getTextContent().trim();
     }
 
     private String getValue(final String value, final String defaultValue) {
-        if (StringUtils.isBlank(value)) {
-            return defaultValue;
-        } else {
-            return value;
-        }
+        return StringUtils.isBlank(value) ? defaultValue : value;
     }
 
     private String getFirstValue(final NodeList nodeList) {
@@ -917,13 +907,7 @@
     }
 
     private String getFirstValue(final NodeList nodeList, final String defaultValue) {
-        final String value;
-        if (nodeList == null || nodeList.getLength() == 0) {
-            value = defaultValue;
-        } else {
-            value = getValue(nodeList.item(0));
-        }
-        return value;
+        return nodeList == null || nodeList.getLength() == 0 ? defaultValue : getValue(nodeList.item(0));
     }
 
     private StringBuilder appendFirstValue(final StringBuilder builder, final NodeList nodeList) {
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/fingerprint/FingerprintFactoryTest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/fingerprint/FingerprintFactoryTest.java
index 01fe76e..f8961d8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/fingerprint/FingerprintFactoryTest.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/fingerprint/FingerprintFactoryTest.java
@@ -159,6 +159,51 @@
     }
 
     @Test
+    public void testPublicPortWithAccessPoliciesFingerprint()  throws IOException {
+        final String fingerprint = fingerprintFactory.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"), null);
+        // user access control
+        assertTrue(fingerprint.contains("user1"));
+        // group access control
+        assertTrue(fingerprint.contains("group1"));
+        // policies fingerprinted
+        assertTrue(fingerprint.contains("user1group1"));
+    }
+
+    @Test
+    public void testPublicPortWithDifferentFingerprintInAccessPolicies() throws IOException, ParserConfigurationException, SAXException {
+        final String f1 = fingerprintFactory.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"), null);
+        assertEquals(2, StringUtils.countMatches(f1, "user1group1"));
+
+        final DocumentBuilder docBuilder = XmlUtils.createSafeDocumentBuilder(false);
+        final Document document = docBuilder.parse(new File("src/test/resources/nifi/fingerprint/public-port-with-no-policies.xml"));
+        final Element rootProcessGroup = document.getDocumentElement();
+
+        final StringBuilder sb = new StringBuilder();
+        fingerprintFactory.addProcessGroupFingerprint(sb, rootProcessGroup, new FlowEncodingVersion(1, 0));
+
+        final String f2 = sb.toString();
+        assertEquals(2, StringUtils.countMatches(f1, "NO_USER_ACCESS_CONTROLNO_GROUP_ACCESS_CONTROL"));
+
+        // actual -> Public-IntrueNO_USER_ACCESS_CONTROLNO_GROUP_ACCESS_CONTROL
+        // expected -> Public-Intrueuser1group1
+        assertNotEquals(StringUtils.countMatches(f1, "user1group1"), StringUtils.countMatches(f2, "user1group1"));
+    }
+
+    @Test
+    public void testPublicPortWithNoAccessPoliciesFingerprint() throws ParserConfigurationException, IOException, SAXException {
+        final DocumentBuilder docBuilder = XmlUtils.createSafeDocumentBuilder(false);
+        final Document document = docBuilder.parse(new File("src/test/resources/nifi/fingerprint/public-port-with-no-policies.xml"));
+        final Element rootProcessGroup = document.getDocumentElement();
+
+        final StringBuilder sb = new StringBuilder();
+        fingerprintFactory.addProcessGroupFingerprint(sb, rootProcessGroup, new FlowEncodingVersion(1, 0));
+
+        final String fingerprint = sb.toString();
+        assertTrue(fingerprint.contains("NO_USER_ACCESS_CONTROL"));
+        assertTrue(fingerprint.contains("NO_GROUP_ACCESS_CONTROL"));
+    }
+
+    @Test
     public void testSchemaValidation() throws IOException {
         FingerprintFactory fp = new FingerprintFactory(null, getValidatingDocumentBuilder(), extensionManager, null);
         fp.createFingerprint(getResourceBytes("/nifi/fingerprint/validating-flow.xml"), null);
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow1a.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow1a.xml
index 2896767..422aa7f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow1a.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow1a.xml
@@ -15,12 +15,27 @@
 -->
 <flowController>
     <maxThreadCount>15</maxThreadCount>
+    <parameterContexts>
+        <parameterContext>
+            <id>8dafcb3b-82cb-30d4-b9e2-0174454e312e</id>
+            <name>Parameter Context 1</name>
+            <description/>
+            <parameter>
+                <name>Parameter Name</name>
+                <description/>
+                <sensitive>false</sensitive>
+                <value>Parameter Value</value>
+            </parameter>
+        </parameterContext>
+    </parameterContexts>
     <rootGroup>
         <id>e3909250-331d-420b-a9b3-cc54ad459401</id>
         <name>NiFi Flow</name>
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2df</id>
             <name>GenerateFlowFile</name>
@@ -47,6 +62,10 @@
                 <name>file.size</name>
                 <value>5</value>
             </property>
+            <property>
+                <name>generate-ff-custom-text</name>
+                <value>#{Custom_Text}</value>
+            </property>
             <annotationData/>
         </processor>
         <processor>
@@ -69,6 +88,8 @@
             <position x="0.0" y="0.0"/>
             <style>process-group</style>
             <comment/>
+            <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+            <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
             <processor>
                 <id>34caa1d6-cf14-4ec0-9f18-12859c37d55d</id>
                 <name>LogAttribute</name>
@@ -90,6 +111,17 @@
                 <comments/>
                 <running>false</running>
             </inputPort>
+            <inputPort>
+                <id>f37849cc-0177-1000-0000-00007d8cb44d</id>
+                <name>Public-In</name>
+                <position x="0.0" y="0.0"/>
+                <comments/>
+                <scheduledState>STOPPED</scheduledState>
+                <maxConcurrentTasks>1</maxConcurrentTasks>
+                <allowRemoteAccess>true</allowRemoteAccess>
+                <userAccessControl>user1</userAccessControl>
+                <groupAccessControl>group1</groupAccessControl>
+            </inputPort>
             <outputPort>
                 <id>a65695bb-a938-4d3d-bf5d-f70a335268ec</id>
                 <name>Out</name>
@@ -98,6 +130,17 @@
                 <comments/>
                 <running>false</running>
             </outputPort>
+            <outputPort>
+                <id>fa543349-0178-1000-ffff-ffffd7f12ba4</id>
+                <name>Public-Out</name>
+                <position x="0.0" y="0.0"/>
+                <comments/>
+                <scheduledState>STOPPED</scheduledState>
+                <maxConcurrentTasks>1</maxConcurrentTasks>
+                <allowRemoteAccess>true</allowRemoteAccess>
+                <userAccessControl>user1</userAccessControl>
+                <groupAccessControl>group1</groupAccessControl>
+            </outputPort>
             <connection>
                 <id>b25c3c8f-8dfe-4dda-950e-b6edfb6c99f4</id>
                 <name>In Connection</name>
@@ -167,5 +210,6 @@
             <maxWorkQueueSize>0</maxWorkQueueSize>
             <flowFileExpiration>0 s</flowFileExpiration>
         </connection>
+        <parameterContextId>8dafcb3b-82cb-30d4-b9e2-0174454e312e</parameterContextId>
     </rootGroup>
 </flowController>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow1b.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow1b.xml
index e8d95db..1904ac1 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow1b.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow1b.xml
@@ -15,12 +15,27 @@
 -->
 <flowController>
     <maxThreadCount>15</maxThreadCount>
+    <parameterContexts>
+        <parameterContext>
+            <id>8dafcb3b-82cb-30d4-b9e2-0174454e312e</id>
+            <name>Parameter Context 1</name>
+            <description/>
+            <parameter>
+                <name>Parameter Name</name>
+                <description/>
+                <sensitive>false</sensitive>
+                <value>Parameter Value</value>
+            </parameter>
+        </parameterContext>
+    </parameterContexts>
     <rootGroup>
         <id>e3909250-331d-420b-a9b3-cc54ad459401</id>
         <name>NiFi Flow</name>
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2df</id>
             <name>GenerateFlowFile1</name>
@@ -49,6 +64,10 @@
                 <name>file.size</name>
                 <value>5</value>
             </property>
+            <property>
+                <name>generate-ff-custom-text</name>
+                <value>#{Custom_Text}</value>
+            </property>
             <annotationData/>
         </processor>
         <processor>
@@ -71,6 +90,8 @@
             <position x="0.0" y="0.0"/>
             <style>process-group</style>
             <comment/>
+            <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+            <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
             <processor>
                 <id>34caa1d6-cf14-4ec0-9f18-12859c37d55d</id>
                 <name>LogAttribute</name>
@@ -92,6 +113,17 @@
                 <comments>foobar</comments>
                 <running>false</running>
             </inputPort>
+            <inputPort>
+                <id>f37849cc-0177-1000-0000-00007d8cb44d</id>
+                <name>Public-In</name>
+                <position x="0.0" y="1.0"/>
+                <comments>Public Port for Site to Site</comments>
+                <scheduledState>STOPPED</scheduledState>
+                <maxConcurrentTasks>1</maxConcurrentTasks>
+                <allowRemoteAccess>true</allowRemoteAccess>
+                <userAccessControl>user1</userAccessControl>
+                <groupAccessControl>group1</groupAccessControl>
+            </inputPort>
             <outputPort>
                 <id>a65695bb-a938-4d3d-bf5d-f70a335268ec</id>
                 <name>Out</name>
@@ -100,6 +132,17 @@
                 <comments/>
                 <running>false</running>
             </outputPort>
+            <outputPort>
+                <id>fa543349-0178-1000-ffff-ffffd7f12ba4</id>
+                <name>Public-Out</name>
+                <position x="0.0" y="1.0"/>
+                <comments/>
+                <scheduledState>RUNNING</scheduledState>
+                <maxConcurrentTasks>1</maxConcurrentTasks>
+                <allowRemoteAccess>true</allowRemoteAccess>
+                <userAccessControl>user1</userAccessControl>
+                <groupAccessControl>group1</groupAccessControl>
+            </outputPort>
             <connection>
                 <id>b25c3c8f-8dfe-4dda-950e-b6edfb6c99f4</id>
                 <name>In Connection</name>
@@ -169,5 +212,6 @@
             <maxWorkQueueSize>0</maxWorkQueueSize>
             <flowFileExpiration>0 s</flowFileExpiration>
         </connection>
+        <parameterContextId>8dafcb3b-82cb-30d4-b9e2-0174454e312e</parameterContextId>
     </rootGroup>
 </flowController>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow2.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow2.xml
index bab1778..407af89 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow2.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow2.xml
@@ -21,6 +21,8 @@
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2dd</id>
             <name>GenerateFlowFile</name>
@@ -69,6 +71,8 @@
             <position x="0.0" y="0.0"/>
             <style>process-group</style>
             <comment/>
+            <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+            <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
             <processor>
                 <id>34caa1d6-cf14-4ec0-9f18-12859c37d55d</id>
                 <name>LogAttribute</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-bundle-1.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-bundle-1.xml
index 24ae13e..1f4f70f 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-bundle-1.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-bundle-1.xml
@@ -21,6 +21,8 @@
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2df</id>
             <name>GenerateFlowFile</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-bundle-2.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-bundle-2.xml
index 09c4c1e..bfce550 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-bundle-2.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-bundle-2.xml
@@ -21,6 +21,8 @@
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2df</id>
             <name>GenerateFlowFile</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-missing-bundle.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-missing-bundle.xml
index 7dc3001..926efb9 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-missing-bundle.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-missing-bundle.xml
@@ -21,6 +21,8 @@
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2df</id>
             <name>GenerateFlowFile</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-no-bundle.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-no-bundle.xml
index 5a320cb..a451a07 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-no-bundle.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow3-with-no-bundle.xml
@@ -21,6 +21,8 @@
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2df</id>
             <name>GenerateFlowFile</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow4-with-different-bundle.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow4-with-different-bundle.xml
index eec5b6f..315a97c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow4-with-different-bundle.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow4-with-different-bundle.xml
@@ -21,6 +21,8 @@
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2df</id>
             <name>GenerateFlowFile</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow4.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow4.xml
index a0bfd6e..d02080a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow4.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/flow4.xml
@@ -21,6 +21,8 @@
         <position x="0.0" y="0.0"/>
         <style/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>d89ada5d-35fb-44ff-83f1-4cc00b48b2df</id>
             <name>GenerateFlowFile</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/initial.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/initial.xml
index ef37e51..37063c8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/initial.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/initial.xml
@@ -23,6 +23,8 @@
         <name>NiFi Flow</name>
         <position x="0.0" y="0.0"/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>f3214b1c-016f-1000-0000-00001b1546be</id>
             <name>GetFTP</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/modified.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/modified.xml
index 922d0f9..b50e205 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/modified.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/modified.xml
@@ -23,6 +23,8 @@
         <name>NiFi Flow</name>
         <position x="0.0" y="0.0"/>
         <comment/>
+        <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+        <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
         <processor>
             <id>f3214b1c-016f-1000-0000-00001b1546be</id>
             <name>GetFTP</name>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/public-port-with-no-policies.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/public-port-with-no-policies.xml
new file mode 100644
index 0000000..b0830c0
--- /dev/null
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/public-port-with-no-policies.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<rootGroup>
+    <id>1234</id>
+    <name>NiFi Flow</name>
+    <position x="0.0" y="0.0"/>
+    <style/>
+    <comment/>
+    <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+    <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
+    <inputPort>
+        <id>f37849cc-0177-1000-0000-00007d8cb44d</id>
+        <name>Public-In</name>
+        <position x="0.0" y="0.0"/>
+        <comments/>
+        <scheduledState>STOPPED</scheduledState>
+        <maxConcurrentTasks>1</maxConcurrentTasks>
+        <allowRemoteAccess>true</allowRemoteAccess>
+    </inputPort>
+    <outputPort>
+        <id>fa543349-0178-1000-ffff-ffffd7f12ba4</id>
+        <name>Public-Out</name>
+        <position x="0.0" y="0.0"/>
+        <comments/>
+        <scheduledState>STOPPED</scheduledState>
+        <maxConcurrentTasks>1</maxConcurrentTasks>
+        <allowRemoteAccess>true</allowRemoteAccess>
+    </outputPort>
+</rootGroup>
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/validating-flow.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/validating-flow.xml
index 123266d..54efe86 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/validating-flow.xml
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/resources/nifi/fingerprint/validating-flow.xml
@@ -21,6 +21,8 @@
     <name>NiFi Flow</name>
     <position x="0.0" y="0.0"/>
     <comment/>
+    <flowfileConcurrency>UNBOUNDED</flowfileConcurrency>
+    <flowfileOutboundPolicy>STREAM_WHEN_AVAILABLE</flowfileOutboundPolicy>
     <processor>
       <id>28a67671-015a-1000-77dd-8130e16012ec</id>
       <name>PutFile</name>