GeezerVison is showing github.com — cert: wire JWK legs into format convert|verify (#13727) by developing-today-fleet[bot] · Pull Request #16174 · developing-today/code
Conversation
Implements the JWK format conversion and verification legs for fleet cert format convert|verify:
Changes
-
convert --to jwk: Exports a public-only JWK for Ed25519 and P-256 keys.
--in <key.pk8>: reads a validated PKCS#8 key file
--bundle <dir>: finds exactly one matching private-key identity in the bundle
- Writes canonical public JWK (no
d member), rejects RSA/ML-DSA
- Output created owner-only, never overwrites existing file
-
convert --from jwk --to pem|der: Imports a strict public-only JWK as SPKI PEM/DER.
- Rejects JWKs carrying
d (private member) or unknown members
- Rejects RSA/ML-DSA (no registered public JWK form in the crate's algorithm registry)
-
verify --in <key.jwk> --algorithm <id> --key <key.pk8>: Pins a JWK to its canonical DER key material. Proves byte-faithfulness beyond well-formedness alone.
-
Tests (3 new in key_ceremony_tests):
format_jwk_export_verify_and_import_round_trip_for_supported_algorithms — Ed25519/P-256 export → strict re-parse → SPKI import agrees with engine SPKI; verify pins JWK to DER key; different key is refused
format_jwk_export_reads_the_bundles_exactly_one_identity — bundle leg exports the exactly-one identity; non-resident algorithm is refused
format_jwk_rejects_unsupported_algorithms_private_material_and_bad_flags — RSA/ML-DSA export refused; d member refused at verify/import; --password-file/--bundle refused on --from jwk; verify requires --key
-
Docs: CLI help text, README.md, doctor output all updated.
Verification
cargo fmt --check clean
cargo test -p fleet-cert — all 128 tests pass (including 3 new JWK tests)
cargo clippy — no new warnings introduced
Note: Subsumes the remaining JWK CLI + bundle-artifact scope from parked task 26064 (same owned paths: pkgs/fleet/crates/fleet-cert/src/cli.rs, jwk.rs, README.md). That task's resume condition (PR #15881 merged) is satisfied; this PR completes the full format convert|verify surface.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-27T13:36:55Z",
"session_id": "ses_e5de2fe95eaffeUb0EGIFe0vTJ",
"lane": null,
"host": "amd",
"worktree": "/home/user/wt-oc-code-02-13727",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/wt-oc-code-02-13727",
"repo": "developing-today/code",
"branch": "oc-code-02-13727-format-final",
"sha": "0027d6078bb68036388516dfd0923f0099420ec0"
},
"auth_subject": "oc-code-02",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Convert --to jwk (Ed25519/P-256, --in or --bundle exactly-one-identity leg),
convert --from jwk to SPKI PEM/DER, and verify --key pinning the JWK to the
canonical DER key. RSA and ML-DSA are refused; private member d and unknown
members are rejected, never silently dropped. Docs (help, README, doctor)
updated; three CLI round-trip/rejection tests added.
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d7450bc6-4811-4f91-ba56-49c7c2d82c69
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🤖 Lane 1037-F (alpha DRIVE landings, 2026-11-27) — claim + verification dispatch for PR #16174.
Claim-scan: PR comments = CodeRabbit bot only; linked issue #13727 latest note is the author lane's 13:40Z progress note (task 23216) — no live sibling claim. Head 0027d6078bb68036388516dfd0923f0099420ec0 stable across two reads, OPEN, non-draft, CLEAN/MERGEABLE. Diff scope matches body: pkgs/fleet/crates/fleet-cert/src/cli.rs + README.md only (+592/-6).
No exact-head run evidence exists, so this lane dispatches ONE fleet-command verification on the exact head: cargo test -p fleet-cert --manifest-path pkgs/fleet/Cargo.toml, with pkg-config libssl-dev installed first (the OpenSSL venue fix that merged sibling fleet-cert PR #15938, lane 0052-C run 45958467166). dispatch_id 1037F-16174. Merge follows a SUCCESS conclusion + still CLEAN/MERGEABLE.
Note on primary target PR #16141: this lane stood down — lane code-f (task 26206) holds a live re-taken claim (comments 7223035759 / 7223233697), pushed head 0124bed31ee, and its full-build run 46032544784 concluded success at 16:35:46Z; merge is that lane's to record.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|