[ 
https://issues.apache.org/jira/browse/NIFI-1884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15290458#comment-15290458
 ] 

ASF GitHub Bot commented on NIFI-1884:
--------------------------------------

Github user alopresto commented on the pull request:

    https://github.com/apache/nifi/pull/452#issuecomment-220227038
  
    @bbende thanks for the explanation. I suppose I am more familiar with, and 
conditioned to assume, the models used in many database-backed frameworks where 
the user and group models are canonical -- while there may be many `User` 
objects instantiated that describe "Andy LoPresto", they all refer to the same 
record in persistent storage, and modifying one (and saving it) updates the 
record that all point to. In addition, it would not be necessary to clone a 
retrieved record in order to modify it. 
    
    Example (using Rails/Grails-esque syntax, but easily replaceable with 
`authorizer.getUser(id)`): 
    ```
    User andy = User.getByUsername("alopresto")
    logger.info(andy.getFirstName()) // "Andrew"
    andy.setFirstName("Andy")
    andy.update()
    ```
    
    In addition, while updating the relationship can be done from either end 
(i.e. adding a user to _n_ groups is easier by modifying the one user instead 
of retrieving and modifying _n_ groups, while removing all users from a 
specific group would use the opposite operation), it seems like the model 
proposed above duplicates a lot of data during each operation. Is there a 
reason for this? It seems likely there is a tradeoff I am missing. 
    
    I also have questions about resolving uniqueness constraints, ID 
mutability, locks, merge conflicts, etc. on updates, but it seems that these 
details are delegated to the `authorizer` implementation?


> Add User & Group API
> --------------------
>
>                 Key: NIFI-1884
>                 URL: https://issues.apache.org/jira/browse/NIFI-1884
>             Project: Apache NiFi
>          Issue Type: Sub-task
>          Components: Core Framework
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Minor
>             Fix For: 1.0.0
>
>
> Define the API for  managing users, groups, and policies.
> This is to advance the work described in this feature proposal:
>  https://cwiki.apache.org/confluence/display/NIFI/Support+Authorizer+API
> The parent JIRA for all authorization work is NIFI-1550.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to