zjncs opened a new issue, #6700:
URL: https://github.com/apache/rocketmq-dashboard/issues/6700

   ## Problem
   
   The broker push added in #6693 reads each account's rules with a single 
bounded page:
   
   ```java
   List<AclRuleVO> rules = aclRepository.findRulePage(
           principalOf(user.getUsername()), null, null, null, null, 1,
           MAX_RULES_PER_ACCOUNT).getItems();
   ```
   
   `MAX_RULES_PER_ACCOUNT` is 200 and nothing on the write side caps an account 
at 200 rules (the rule API pages at up to 100 per call, `createRule` has no 
per-account limit), so an account with more than 200 stored rules is **silently 
truncated**: the rules beyond the first page never reach the broker, 
`policyCount` reports 200 as if it were the whole account, and `skipped` stays 
empty — the result VO's own contract ("every account/broker pair reports its 
own result so a single unreachable broker cannot hide the successes") is broken 
by omission, and the operator has no way to notice that part of the policy set 
is not enforced.
   
   ## Expected behavior
   
   The push reads every stored rule of the account — page through the 
repository until its own total is covered — so `policyCount` and the written 
policy entries reflect the full account.
   
   ## Evidence
   
   Reproduced with the server tests (`cd server && mvn test 
-Dtest=AclServiceTest#pushAclToBrokerPagesThroughEveryStoredRuleBeyondTheFirstPageTest`):
 a mocked repository answers page 1 with 200 rules and `total=203`; the current 
push reports `policyCount=200`, writes 200 entries and never asks for page 2.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to