123123213weqw opened a new pull request, #7063: URL: https://github.com/apache/rocketmq-dashboard/pull/7063
Supersedes #5351 (stale-closed, authored by @btlqql — credited below) — same feature, with all three review asks applied and the branch merged onto the current `rocketmq-studio` (clean; 4 acl-package commits landed since the original). Co-authored-by: btlqql <[email protected]> ## The feature `GET /api/acl/users/export` streams the ACL user inventory as CSV (BOM header, masked access key, no secret column), bounded at 10,000 rows with a 400 beyond it — for access review. ## Review asks from #5351, applied 1. **docs/api-spec.md**: quick-reference row added (chronological-append convention) plus a new §7.x section documenting params, the CSV `data` contract (BOM, quoted columns, no Secret Key column), the one-shot Tencent behaviour, and the 10,000 bound with its 400. 2. **Tencent amplification**: new `AclService.exportUsersCsv(instanceId, keyword)` — Tencent instances make exactly **one** `tencentAclService.listUsers` call (the filter/sort chain was extracted and is now shared with `pageUsers`, byte-identical behaviour, so the export structurally matches the table's filtered view). Apache instances walk the repository page query internally at max page size 100, per the CloudCredentialService precedent. 3. **Layering**: the walk, the bound (`requireWithinExportBound` → 400) and the CSV rendering all live in `AclService`; the controller is a thin delegate returning `Result<String>` the frontend reads as `{ data }` + downloadCsv. The old `AclUserCsvExporter` controller helper is gone. **Auth call (as requested, explicit):** the endpoint stays reader-accessible. The rows are exactly the masked `/users/page` rows with no secret column, and all ten existing export endpoints behave the same — no new data reaches non-admin readers. ## Tests The original three mutation-sensitive cases moved to `AclServiceTest` against the real service (repository fixtures now carry raw credentials, so the secret-leak regression is exercised end to end), a controller delegation test pins the thin-delegate shape, and new cases pin the Tencent one-shot property (`times(1)` provider call for 151 rows, and the 10,001-row bound rejection) on both backends. Suite: 247/247, zero checkstyle violations. cc @lizhimins -- 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]
