Wang1rrr opened a new pull request, #5524:
URL: https://github.com/apache/rocketmq-dashboard/pull/5524

   <!-- Make sure the base branch is `rocketmq-studio`: that is the RocketMQ 
Studio trunk. -->
   
   ### Which Issue(s) This PR Fixes
   
   No issue. This replaces #4797, which the stale bot closed before review and 
which can no longer be reopened. It is rebased onto the current trunk and adds 
the audit-page labels that #4797 was missing.
   
   ### Brief Description
   
   `CloudCredentialService.getCredential` and `AclService.getUserCredentials` 
are the only server endpoints that return a plaintext secret. Both are 
admin-only (`AuthInterceptor.isAdminOnlyGetPath`), so this is not a privilege 
gap. But neither records an audit row, while every create/update/delete on the 
same resources does. A secret disclosure is therefore indistinguishable from no 
activity in the operation audit.
   
   - Record `REVEAL_CLOUD_CREDENTIAL` and `REVEAL_ACL_USER_CREDENTIALS`. The 
detail names the credential and instance, never the secret. `recordAudit` keeps 
swallowing sink failures, so an audit outage cannot fail a read that already 
succeeded.
   - Give `AclService.getUserCredentials` a single exit so the Tencent vendor 
path, which returned early, is audited as well.
   - On the audit page, add presentation entries (security / settings 
categories) and zh/en `audit.op.*` labels for both codes, so they don't render 
as raw identifiers. The risk classification is unchanged; whether a reveal 
should count as a high-risk signal is left to the maintainers.
   
   ### How Did You Test This Change?
   
   - `cd server && mvn -B -ntp test` on JDK 21: 3325 tests, 0 failures. The 
MySQL-backed integration classes ran against MySQL 8 and the H2-backed ones 
without the URL override.
   - `AclServiceTest` (80 tests) and `CloudCredentialServiceTest` (18 tests) 
cover the Apache and Tencent reveal paths and assert that the recorded detail 
never carries the secret.
   - `cd web && npx vitest run src/pages/ops src/i18n`: 109 tests pass, 
including the new `auditPresentation` case. `eslint` and `tsc -b` are clean on 
the touched files.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / 
`refactor:` / `chore:` / `docs:` / `perf:`)
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/`
   - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks)
   - [ ] New source files carry the ASF license header (no new files)
   - [ ] Documentation touched where behaviour changed (no documented audit 
vocabulary)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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