Skip to content

feat(web): re-key a subordinate CA live through the manager#59

Merged
Bugs5382 merged 2 commits into
mainfrom
feat/29-rekey-live
Jul 20, 2026
Merged

feat(web): re-key a subordinate CA live through the manager#59
Bugs5382 merged 2 commits into
mainfrom
feat/29-rekey-live

Conversation

@Bugs5382

Copy link
Copy Markdown
Contributor

What and why

Wires the node re-key wizard to the manager's single orchestrated FleetService.RekeyNode RPC. In live mode one action re-keys a subordinate CA end to end: the new rekeyNode(nodeName, profileName) helper makes a single RekeyNode call (the manager runs the ferry server-side, the web does not orchestrate steps), then refetches the fleet and certificate sets unfiltered so the node's new identity and chain appear without a reload. The wizard shows a pending state, renders the re-keyed subject/issuer CN and chain length on success, and surfaces an RPC error inline (no native popup) without advancing.

Mock mode keeps its existing stepped walkthrough and drives no RPC; calling the live helper in mock mode is a clear error rather than a silent fallback. Follows the merged S1/S2 live-write pattern (RevokeCertificate/IssueLeaf). Includes the regenerated fleet_pb.ts carrying the RekeyNode client method.

Closes #58

Part of #24

Verification

  • Lint clean
  • Tests pass
  • Build succeeds

How this was verified

  • npm run lint (eslint + prettier) clean, npm test (151 tests pass), npm run build succeeds, task license (0/114 changed).
  • New src/lib/rekey.test.ts covers the live call/refetch, error propagation, and mock-mode refusal; the wizard test covers the mock demo (no RPC), live success rendering the new identity, and inline error without advancing.

Merge order

Consumes the manager's RekeyNode RPC; the generated fleet_pb.ts matches CryptOS-PKI/api#56. Merge after api#56 and the manager PR.

@Bugs5382 Bugs5382 added this to the v1.0.0 milestone Jul 19, 2026
@Bugs5382 Bugs5382 added the enhancement New feature (feat). Minor version bump. label Jul 19, 2026
@Bugs5382 Bugs5382 self-assigned this Jul 19, 2026
A root has no parent to sign a rotation CSR; the manager refuses it. Show an
explanation instead of the re-key action for root nodes.
@Bugs5382
Bugs5382 merged commit 9276b05 into main Jul 20, 2026
12 checks passed
@Bugs5382
Bugs5382 deleted the feat/29-rekey-live branch July 20, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature (feat). Minor version bump.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(web): re-key a subordinate CA live through the manager

1 participant