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

   ## Summary
   
   Adds ACL user and rule management for Tencent Cloud RocketMQ 5.x instances 
on the `rocketmq-studio` branch, mapping the Tencent `provider/tencent` 
(Trocket v20230308 OpenAPI) role management to the ACL page. Fixes #2047.
   
   ## Changes
   
   **Role management (Tencent provider)**
   - New `TencentAclService` wraps `DescribeRoleList` / `CreateRole` / 
`ModifyRole` / `DeleteRole`.
   - Each role maps to a cluster-wide ACL rule: principal = role name, resource 
= `*`, resourceType = `Cluster`, actions derived from `PermRead` (SUB) / 
`PermWrite` (PUB), version `1.0`, scope `cluster`.
   - `listUsers` / `listRules` page through `DescribeRoleList`; role 
`AccessKey` / `SecretKey` are surfaced as masked credentials and the owning 
`cloudInstanceId` is exposed in the associated-clusters field.
   
   **Routing by instance**
   - `/api/acl/users` and `/api/acl/rules` accept an optional `instanceId`; 
TENCENT instances use the Tencent role API, all other vendors (APACHE / ALIYUN) 
keep the existing local MySQL store.
   - `instanceId` is threaded through the ACL DTOs (including 
`DeleteRequestDTO`) so the frontend passes the selected instance on every call.
   - `AclService.capabilities` reports `stateSource=TENCENT_ROLE` with remote 
read/write supported for Tencent instances.
   
   **Frontend**
   - `api/acl.ts` / `services/aclService.ts` / `pages/instance/acl.tsx` thread 
`selectedInstanceId` into every ACL call.
   - The associated-clusters selector now offers the instance list (value = 
`cloudInstanceId ?? id`) so Tencent roles surface their owning instance.
   
   ## Testing
   - Backend: 68 ACL tests pass (`AclServiceTest`, `AclControllerTest`); `mvn 
clean package` succeeds.
   - Frontend: `tsc -b` and `npm run build` pass.
   - Manually verified against a real Tencent Cloud RocketMQ 5.x instance: role 
list renders on the user tab (masked AK/SK + associated instance 
`rmq-16qg4akaop`) and the rule tab shows the cluster-wide `*` rule with 
`PUB`/`SUB` actions, version `1.0`, scope `cluster`.
   
   ## Notes
   - Role read/write permissions default to `true` on creation (no separate 
read/write toggles in the add-user form yet).
   - Scoped to `rocketmq-studio`.


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