nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markap14 <...@git.apache.org>
Subject [GitHub] nifi pull request #572: NIFI-2059: Ensure that we properly pass along proxie...
Date Thu, 23 Jun 2016 19:35:35 GMT
Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/572#discussion_r68300367
  
    --- 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 --
    
    And another good call.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message