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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #7420
   
   ### Brief Description
   
   - `CloudCredentialService.create` trims `name` / `accessKey` / `secretKey` 
before validation and persistence, so a hand-pasted key can no longer be stored 
with breaking whitespace and the vendor+accessKey uniqueness check can no 
longer be bypassed by padding. `update` applies the same trim to the rotated 
secret, the name and the remark.
   - `CloudCredentialService.update` rejects an update that carries none of 
`name` / `secretKey` / `remark` (400) instead of performing a write that only 
bumps `gmt_modified`, evicts cached cloud clients and records an audit row.
   
   4 new JUnit tests were added and verified to fail on the pre-fix code (2 
failures + 2 errors) and pass afterwards (23/23 green in 
CloudCredentialServiceTest; CloudCredentialControllerTest, 
CloudCredentialSchemaMigrationTest, CreateCloudCredentialDTOTest and 
MybatisPlusCloudCredentialRepositoryTest stay green). Note: 
CloudCredentialPartialUpdateIntegrationTest requires a live MySQL instance and 
cannot start on this build host (context fails on DB access before any 
assertion) - it is unaffected by this change (the name-only partial update it 
pins is preserved).
   


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