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

   ### Description
   
   `createK8sCert()` and `updateK8sCert()` copy SAN arrays when returning mock 
certificate records, but the mock store still saves `data.san` directly.
   
   Locations:
   - `web/src/services/clusterService.ts:85`
   - `web/src/services/clusterService.ts:97`
   
   A caller that keeps the original request object can mutate the SAN array 
after the service call and change the stored mock certificate outside the 
service boundary. That makes the mock K8s certificate service behave 
differently from an API-backed store and can leak state between page 
actions/tests.
   
   ### Impact
   
   K8s certificate management can show mutated SAN values that were never 
submitted through a create/update operation. This makes the Track 1 
control-plane mock contract less reliable and can hide bugs in the real API 
integration path.
   
   ### Suggested fix
   
   Copy SAN arrays before writing them into the mock store for both create and 
update paths, and add regression coverage that mutating the original request 
array does not mutate stored certificate state.
   


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