You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by bbende <gi...@git.apache.org> on 2017/12/01 20:49:00 UTC

[GitHub] nifi-registry pull request #45: NIFIREG-60 NiFi Proxy Identity Support

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

    https://github.com/apache/nifi-registry/pull/45#discussion_r154445195
  
    --- Diff: nifi-registry-framework/src/main/java/org/apache/nifi/registry/security/authorization/file/FileAccessPolicyProvider.java ---
    @@ -517,28 +522,22 @@ private void populateInitialAdmin(final Authorizations authorizations) {
             }
         }
     
    -//    /**
    -//     * Creates a user for each node and gives the nodes write permission to /proxy.
    -//     *
    -//     * @param authorizations the overall authorizations
    -//     */
    -//    private void populateNodes(Authorizations authorizations) {
    -//        for (String nodeIdentity : nodeIdentities) {
    -//            final User node = userGroupProvider.getUserByIdentity(nodeIdentity);
    -//            if (node == null) {
    -//                throw new AuthorizerCreationException("Unable to locate node " + nodeIdentity + " to seed policies.");
    -//            }
    -//
    -//            // grant access to the proxy resource
    -//            addUserToAccessPolicy(authorizations, ResourceType.Proxy.getValue(), node.getIdentifier(), WRITE_CODE);
    -//
    -//            // grant the user read/write access data of the root group
    -//            if (rootGroupId != null) {
    -//                addUserToAccessPolicy(authorizations, ResourceType.Data.getValue() + ResourceType.ProcessGroup.getValue() + "/" + rootGroupId, node.getIdentifier(), READ_CODE);
    -//                addUserToAccessPolicy(authorizations, ResourceType.Data.getValue() + ResourceType.ProcessGroup.getValue() + "/" + rootGroupId, node.getIdentifier(), WRITE_CODE);
    -//            }
    -//        }
    -//    }
    +    /**
    +     * Creates a user for each NiFi client and gives each one write permission to /proxy.
    +     *
    +     * @param authorizations the overall authorizations
    +     */
    +    private void populateNodes(Authorizations authorizations) {
    --- End diff --
    
    Looks like this needs to get called from the load method similar to populateInitialAdmin


---