Add public certificate service foundation #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/issue-383-public-cert-service-foundation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
public-cert-serviceworkspace crate and binarym/pgp'/kmkr'/<org>/<bundle>/<index>path helpers with UUID masking/order test vectorsContainerfile.public-cert-servicethat builds the new binary separately from KeymakerTest plan
cargo test -p public-certificate-modelscargo test -p public-cert-servicecargo check -p public-cert-service --all-targetscargo check --workspace --all-targets(currently fails in pre-existingcrates/keymaker-client/examples/generate_quorum.rsbecause it constructs the top-levelGenerateQuorumRequestenum as a struct; warnings also exist in Locksmith/Keymaker)Refs https://codeberg.org/caution/platform/issues/383
Follow-up from request-boundary review:
certificate_countis typed asu8, so JSON values larger than 255 are rejected before handler logic runs.organization_idandbundle_idare typed as[u8; 16], so UUID strings and wrong-length/non-byte arrays are rejected at deserialization; this service boundary only accepts canonical UUID bytes from the Caution API.certificate_count, UUID string input, and oversized request bodies.Verification:
cargo test -p public-cert-servicecargo check -p public-cert-service --all-targetsgit diff --checkAddressed both review comments in
f8097de:get/postroute handlers instead of therouting::...qualifier.Responseplaceholder.501 not implementedpath with actual v1 bundle derivation: validate the request, request each derived XPrv from keyforkd using the existing deterministic org/bundle/index path, derive/armor the public OpenPGP certificates, and return the{ data, necroproof }response envelope.Verification:
cargo fmt -p public-cert-servicecargo test -p public-cert-servicecargo check -p public-cert-service --all-targetscargo clippy -p public-cert-service --all-targets -- -D warningsgit diff --checkAddressed the latest review feedback in
7bf9034:certificate_counttoNonZeroU8in the shared v1 modelPublicCertificateBundleand generate a bootproof necroproof over that hashderive_public_certificate()and removedspawn_blockingVerification:
cargo test -p public-certificate-modelscargo test -p public-cert-servicecargo check -p public-cert-service --all-targetscargo clippy -p public-cert-service --all-targets -- -D warningsgit diff --checkAddressed the new follow-up review comments in
1aa30c5:validate_certificate_count()and the associated validation error now that the shared v1 model usesNonZeroU8BindPublicCertificate,ArmorPublicCertificate, andHashBundleto carry their unique helper errors as explicit#[source]values and map them at the call sitesVerification:
cargo fmt -p public-certificate-models -p public-cert-servicecargo test -p public-cert-servicecargo check -p public-cert-service --all-targetscargo clippy -p public-cert-service --all-targets -- -D warningsgit diff --checkcargo test -p public-certificate-modelsLet's drop bundle_id from the models and have it be automatically generated in the route. That way, it's impossible for an attacker to control it: the only way it's exposed is the notation, which is signed by the already-present Caution quorum key.
Let's drop bundle_id from the models and have it be automatically generated in the route. That way, it's impossible for an attacker to control it: the only way it's exposed is the notation, which is signed by the already-present Caution quorum key.
Addressed the bundle-ID feedback in
0eb667e:bundle_idfrom the v1 public certificate request modelbundle_idis rejected at the typed request boundaryVerification:
cargo fmt -p public-certificate-models -p public-cert-servicecargo test -p public-certificate-modelscargo test -p public-cert-servicecargo check -p public-cert-service --all-targetscargo clippy -p public-cert-service --all-targets -- -D warningsgit diff --checkMerged manually via CLI
Pull request closed