feat: add KMS backend positioning badge, Vault TLS form, and rekey sweep UI - #209
Open
reatang wants to merge 3 commits into
Open
feat: add KMS backend positioning badge, Vault TLS form, and rekey sweep UI#209reatang wants to merge 3 commits into
reatang wants to merge 3 commits into
Conversation
Console side of the SSE/KMS P1 batch (rustfs/backlog#2034), pairing with server PRs #6633 (backend positioning), #6638 (Vault TLS/mTLS) and #6644/#6654 (object rewrap + bulk rekey pipeline): - Show a destructive badge when the running backend reports capabilities.production_supported === false, and label the Local/Static select options as dev/testing only. The capability matrix is fetched from GET /kms/status only while KMS is running; older servers omit it and render nothing. - Add an Advanced TLS group to the Vault connection form (custom CA, mTLS client cert/key, all server-local PEM paths). Blank values are omitted from the configure payload because older servers deny unknown fields; cert and key are validated as a pair; stored state is surfaced via the has_custom_ca / has_client_identity booleans and paths are never echoed back. - Add a rekey sweep card (start with optional bucket list and prefix, 3s progress polling with terminal-state stop, cooperative cancel, failed>0 highlighted with idempotent re-run guidance). The card is gated on a served capability matrix so old servers without the rekey routes never see it, and the 404 empty state is distinguished from a missing route by the response body. - 43 new locale entries across all 14 locales; drop one unreferenced key. - Verified against a freshly built rustfs main: capabilities shape, 501 on non-rewrap backends, 404 empty-state body, and unknown-field rejection all match.
The rekey card reused the existing "Completed" and "Failed" keys, but
those belong to the tasks panel and carry a ({count}) placeholder in
every locale, so the badge rendered as "已完成({count})". "Scanned" was
also untranslated in ja-JP/fr-FR. Switch to sweep-specific keys
(Sweep completed / Sweep cancelled / Versions scanned / Versions failed)
and drop the now-unreferenced "Cancelled" key. Caught during in-browser
verification against a local VaultTransit backend.
Member
…x-5f9d51 # Conflicts: # i18n/locales/ar-MA.json # i18n/locales/de-DE.json # i18n/locales/en-US.json # i18n/locales/es-ES.json # i18n/locales/fr-FR.json # i18n/locales/id-ID.json # i18n/locales/it-IT.json # i18n/locales/ja-JP.json # i18n/locales/ko-KR.json # i18n/locales/pt-BR.json # i18n/locales/ru-RU.json # i18n/locales/tr-TR.json # i18n/locales/vi-VN.json # i18n/locales/zh-CN.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Console side of the SSE/KMS P1 batch (handoff: rustfs/backlog#2034), pairing with server-side changes already merged into rustfs/rustfs main — rustfs/rustfs#6633 (backend positioning), rustfs/rustfs#6638 (Vault TLS/mTLS), rustfs/rustfs#6644 / rustfs/rustfs#6654 (object-level rewrap + bulk rekey pipeline).
T1 — Backend positioning badge. The KMS status card shows a destructive badge when the running backend reports
capabilities.production_supported === false(Local/Static). The capability matrix comes fromGET /kms/statusand is only fetched while KMS is running; older servers omit the field entirely and no badge is rendered (absence means "unknown", never "false"). The Local/Static options in the backend select are labeled "(dev/testing only)".T2 — Vault TLS / mTLS form. New collapsible "Advanced TLS" group in the Vault connection section:
ca_cert_path,client_cert_path,client_key_path(server-local PEM paths; helper text notes that in a multi-node cluster the same path must exist on every node). Client cert and key are validated as a pair on the client (mirroring the server rule), and validation errors auto-expand the group and focus the offending field. Blank values are omitted from the configure payload entirely — older servers usedeny_unknown_fields, so a console upgrade changes nothing for users who don't touch these fields. Stored state is surfaced via thehas_custom_ca/has_client_identitybooleans; paths are never echoed back, and the UI states explicitly that saving with blank fields removes the stored TLS settings.T3 — Bulk rekey sweep UI. New "Rekey Existing Objects" card: start a sweep (optional comma-separated bucket list + object-key prefix, with a confirmation dialog warning about scan cost), poll progress every 3s while running (stops on terminal states), cooperative cancel, and the five per-version counters.
failed > 0is highlighted with guidance that the sweep is idempotent — re-running retries only the failed versions. The whole card is gated on a served capability matrix, so old servers without the rekey routes never see it; on servers whererewrap !== true(Local/Static/AWS) the card explains the backend doesn't support rewrapping instead of offering a start button. The 404 "no sweep has run" empty state is distinguished from a 404 missing route by the JSON error body; 409 (already running) and 501 (unsupported) get distinct, non-error-modal presentations.i18n: 46 new entries across all 14 locales; two now-unreferenced keys removed. The rekey badge/counter keys are sweep-specific because the existing
Completed/Failedkeys belong to the tasks panel and carry({count})placeholders.Type of Change
Testing
sse-rekey.test.ts(404/409/501 discrimination, start-request assembly),sse-kms-p1-safety.test.js(source assertions pinning the three compatibility rules), and extendedsse-config.test.ts(TLS paths are never refilled from status).pnpm type-check,pnpm lint,pnpm format:checkclean for all touched files.cargo build --bin rustfs): capabilities shape, 501 on non-rewrap backends, 404 empty-state body, and unknown-field rejection all match the implementation.scanned=2, already_current=2) → rotate key → sweep (scanned=2, rewrapped=2) → idempotent re-run. In-browser: start/confirm/poll/terminal-state flow, pair-validation error focusing, and the empty-payload rule verified.Checklist
Related Issues
Closes rustfs/backlog#2034
Screenshots (if applicable)
UI states were verified live against a local VaultTransit-backed server (status card without badge, Advanced TLS group, rekey card through running → completed); screenshots intentionally omitted per reviewer agreement.
Additional Notes
Compatibility rules followed throughout: new status fields are optional (absence renders nothing), blank TLS inputs never enter the payload, and the rekey UI is capability-gated so servers without the routes never show it. A pre-existing
format:checkfailure incomponents/object/tiff-viewer.tsxexists on main and is not touched here.