tju-yxq opened a new issue, #2582:
URL: https://github.com/apache/rocketmq-dashboard/issues/2582
## Problem
`GET /api/acl/users/page` currently uses a full-list read for Apache
instances:
```java
List<AclUserVO> users = (isTencentInstance(instanceId)
? tencentAclService.listUsers(instanceId) :
aclRepository.findUsers()).stream()
...
int from = ...
int to = ...
return PageResult.of(users.subList(from, to), users.size(), page, pageSize);
```
For Apache users, this:
1. reads every row from `rmq_acl_user`;
2. decodes every secret;
3. filters and sorts all users in memory;
4. finally slices one page.
The paginated endpoint is therefore O(total ACL users), not O(pageSize).
This is inconsistent with `GET /api/acl/rules`, which already performs
filtering, ordering, and pagination in SQL.
## Expected behavior
- For Apache instances, `GET /api/acl/users/page` should paginate at the
database level.
- Apply keyword filtering in SQL against username and access key.
- Use deterministic ordering: `gmt_create DESC, id DESC`, matching the
current frontend-visible order.
- Read and decode credentials only for the returned page.
- Return the existing `items / total / page / size` contract.
- Preserve masked credentials in the page response.
- Keep the Tencent role path unchanged because Tencent role discovery
remains a paginated remote API collection without a local database.
- Keep the existing unpaginated endpoint for callers that intentionally need
the full inventory.
## Verification scope
Tests should prove that the repository uses `selectPage` rather than
`selectList`, the SQL contains username/access-key filtering and deterministic
ordering, the service delegates to the repository page method for Apache users,
and credentials remain masked.
--
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]