Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/572#discussion_r68293664
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/main/java/org/apache/nifi/cluster/coordination/http/replication/ThreadPoolRequestReplicator.java
 ---
    @@ -210,6 +212,15 @@ public AsyncClusterResponse 
replicate(Set<NodeIdentifier> nodeIds, String method
             final Map<String, String> updatedHeaders = new HashMap<>(headers);
             
updatedHeaders.put(RequestReplicator.CLUSTER_ID_GENERATION_SEED_HEADER, 
UUID.randomUUID().toString());
             updatedHeaders.put(RequestReplicator.REPLICATION_INDICATOR_HEADER, 
"true");
    +
    +        // If the user is authenticated, add them as a proxied entity so 
that when the receiving NiFi receives the request,
    +        // it knows that we are acting as a proxy on behalf of the current 
user.
    +        final NiFiUser user = NiFiUserUtils.getNiFiUser();
    +        if (user != null && !user.equals(NiFiUser.ANONYMOUS)) {
    +            final String proxiedEntitiesChain = 
ProxiedEntitiesUtils.buildProxiedEntitiesChainString(NiFiUserUtils.getNiFiUser());
    --- End diff --
    
    Might as well use the user obtained on line 218.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to