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

ASF GitHub Bot commented on QPID-8565:
--------------------------------------

mklaca edited a comment on pull request #110:
URL: https://github.com/apache/qpid-broker-j/pull/110#issuecomment-950683148


   Hi Alex,
   
   - The original code contains  the class AclRulePredicates that consists of 
multiple rule predicates. I am not keen on renaming everything. I would like to 
keep some naming continuity in the code.
   - The RulePredicate interface is very similar to the 
java.util.function.Predicate interface.
   - Two rule predicates/conditions can be combined with AND or OR operation. 
If I renamed the RulePredicate#and method to RulePredicate#combine than it 
would be misleading because it does not specify how they are combined.
   - 'Some' rule condition/predicate requires at least some non-null value. 
'Any' rule condition/predicate should accept any value including null.
   - RulePredicate#and method chains two predicates into one. It has an 
important optimization that prevents creating a useless long chain of 
predicates that always match for any input.
   ```
           if (other instanceof Any)
           {
               return this;
           }
   ```


-- 
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: dev-unsubscr...@qpid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Broker-J] Enhancement of ACL rule predicates evaluation
> --------------------------------------------------------
>
>                 Key: QPID-8565
>                 URL: https://issues.apache.org/jira/browse/QPID-8565
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Broker-J
>            Reporter: Marek Laca
>            Priority: Minor
>              Labels: Broker, Java
>
> The access control plugin checks the rights of the user to perform an action 
> on the broker's component. The access control plugin iterates through the ACL 
> rules and checks their predicates. The user action is denied or allowed based 
> on the test result.
> The aim of this task are refactoring of the code that is required for the 
> [QPID-8487|https://issues.apache.org/jira/browse/QPID-8487] and 
> [QPID-8488|https://issues.apache.org/jira/browse/QPID-8488], improving the 
> test of the ACL rule predicates and removing useless classes. Changes should 
> not have any impact on the functionality of the access control plugin.
> The ObjectProperties class has two responsibilities, it holds the rule 
> predicates and also the objects properties that are checked. The 
> responsibilities of ObjectProperties class should be split because the code 
> should honor the principle of one responsibility per class.
> The Rule class is treated as immutable but the immutability is not enforce by 
> the code.
> The Action, AclAction and ClientAction classes are only data holders that 
> don't have any real responsibility.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to