pvillard31 commented on code in PR #11570:
URL: https://github.com/apache/nifi/pull/11570#discussion_r4147061802


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/ClusterReplicationComponentLifecycle.java:
##########
@@ -680,6 +739,183 @@ private boolean waitForControllerServiceValidation(final 
NiFiUser user, final UR
         return false;
     }
 
+    private ListingRequestResult createFlowFileListingRequest(final NiFiUser 
user, final URI originalUri, final String connectionId,
+                                                              final 
Set<NodeIdentifier> expectedNodes) throws LifecycleManagementException {
+        final URI createListingRequestUri;
+        try {
+            createListingRequestUri = new URI(originalUri.getScheme(), 
originalUri.getUserInfo(), originalUri.getHost(), originalUri.getPort(),
+                "/nifi-api/flowfile-queues/" + connectionId + 
"/listing-requests", null, originalUri.getFragment());
+        } catch (final URISyntaxException e) {
+            throw new RuntimeException(e);
+        }
+
+        try {
+            final AsyncClusterResponse clusterResponse = 
replicateFlowFileListingRequest(expectedNodes, user, HttpMethod.POST, 
createListingRequestUri);

Review Comment:
   Agreed. Queue observation now uses a replicated GET 
/nifi-api/connections/{id} instead of a FlowFile-listing request. The GET 
checks component READ without exposing FlowFile contents. An opt-in system-test 
authorizer denies Read Source Data: queue listing is denied, but the registry 
Update drains successfully on standalone and clustered NiFi.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to