tju-yxq opened a new pull request, #4156:
URL: https://github.com/apache/rocketmq-dashboard/pull/4156

   ## What is the purpose of the change
   
   The K8s certificate page tracks certificate expiry — issuer, validity 
window, days remaining, and status — but the inventory cannot be exported. 
Operators preparing a security review, compliance audit, or certificate renewal 
plan currently have to copy certificate rows manually.
   
   Certificate expiry reporting is a routine compliance requirement: auditors 
and security teams ask for "all certificates and their expiry dates" as a 
standard deliverable.
   
   This change adds CSV export to the certificate page, exporting the inventory 
matching the current search/type filter. Details: #4155
   
   ## Brief changelog
   
   **What it does**
   
   - Adds an Export button to the certificate toolbar.
   - Exports the inventory matching the **current search/type filter**, not 
just the visible page.
   - Exports the audit-relevant fields: ID, k8s ID, cluster, type, issuer, 
notBefore, notAfter, days remaining, status, and SANs.
   - Does **not** export certificate PEM content or private key PEM — those are 
secrets and must not appear in exports.
   - Uses the shared `buildCsv`/`downloadCsv` helpers, so cells are quoted and 
spreadsheet formula injection is prevented.
   - Shows a loading state while the export runs and surfaces errors.
   
   **Deliberately no backend change**
   
   The existing list endpoint already returns the complete inventory with all 
audit-relevant fields, so the export reuses it instead of adding a duplicate 
server-side export endpoint.
   
   **Tests**
   
   - `K8sCertsPage.test.tsx`: regression coverage that the export button 
downloads a CSV containing all filtered certificates with their expiry 
metadata, and that PEM fields are absent from the output.
   
   ## Verifying this change
   
   - `npm test -- K8sCertsPage.test.tsx --run` in `web` — 8 tests passed
   - `npm run lint -- --quiet` in `web` — 0 errors
   - `npm run build` in `web` — passed (Vite)
   - `git diff --check` — passed
   
   The GitHub Actions status is not being described as green here; the checks 
above are local validation on this branch.
   
   - [x] Make sure there is a [Github 
issue](https://github.com/apache/rocketmq/issues) filed for the change. This PR 
addresses only #4155.
   - [x] The pull request title follows the change type and scope.
   - [x] This description covers what the PR does, how, and why.
   - [x] A regression test verifies the export downloads a CSV with the 
expected fields and without PEM content.
   - [x] Frontend tests, lint, and build were run locally on this branch.
   - [ ] Apache Individual Contributor License Agreement (not required for this 
change size).
   
   


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