Repository navigation
chore(deps): take affinidi-did-resolver-cache-sdk 0.8.39 — a deactivated did:webvh issuer is refused - #37
Merged
Conversation
…ted did:webvh issuer is refused SEC-4045 / VGI-04. Before affinidi-did-resolver-cache-sdk 0.8.39 (affinidi/affinidi-tdk-rs#907), resolving a did:webvh whose log ends in a deactivation returned the last DID document as Ok, keys included. The proof verifier (src/proof.rs, IssuerKeys::resolve_vm_for_purpose) takes the issuer key from that document, so on 0.8.38 it accepted a deactivated did:webvh issuer's signature. 0.8.39 makes that resolution fail, and the verifier already turns any resolution failure into a final refusal, so no source change is needed. did-scid 0.2.8 does the same for did:scid:vh. Raise the Cargo.toml floor to 0.8.39 and update only the two packages: affinidi-did-resolver-cache-sdk 0.8.38 -> 0.8.40 (highest compatible), did-scid 0.2.7 -> 0.2.8. Nothing else in Cargo.lock moves. cargo +stable fmt --all -- --check, clippy --all-targets -- -D warnings, test --all-targets (141 tests) and cargo deny check all pass on Rust 1.99. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
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.
Why
SEC-4045 / VGI-04. Before
affinidi-did-resolver-cache-sdk0.8.39 (affinidi/affinidi-tdk-rs#907), resolving adid:webvhwhose log ends in a deactivation entry returned the last DID document asOk, with its keys still in it.The gateway's proof verifier (
src/proof.rs,IssuerKeys::resolve_vm_for_purpose) resolves the issuer through the cache SDK and takes the signing key from the document it gets back. So on 0.8.38 the gateway accepts apush/provision/push/wakeproof signed by a deactivated did:webvh issuer.With 0.8.39, resolving a deactivated did:webvh fails. The verifier already treats any resolution failure as a final refusal ("could not resolve the proof issuer's DID document"), so no code change is needed.
did-scid0.2.8 does the same fordid:scid:vh.src/tsp.rscheck_advertisedonly logs a warning when resolution fails, so this change doesn't affect what it does.What
Cargo.toml:affinidi-did-resolver-cache-sdkfloor goes from0.8.38to0.8.39. A comment next to the existing 0.8.37 SSRF note explains why this is a floor.Cargo.lock: only the two targeted packages were updated (cargo update -p affinidi-did-resolver-cache-sdk -p did-scid).Lockfile changes
No other package moved. The graph has one copy of each.
Verification
All run locally on Rust 1.99.0 (
+stable, which matches CI'sstable), withRUSTFLAGS="-D warnings"as CI sets it:cargo fmt --all -- --check: okcargo clippy --all-targets -- -D warnings: okcargo test --all-targets: ok, 141 passed (84 lib, 25 + 32 integration), 0 failedcargo deny check: advisories, bans, licenses and sources all okNo regression test is added. The existing
IssuerKeys/ document-auth tests usedid:keyissuers with a default resolver. A loopback deactivated-did:webvh test would need new infrastructure: a dev-dependency to build and sign a webvh log with a deactivation entry, a local HTTP server, and aHostPolicyopt-out. That is out of proportion to a dependency bump. The behaviour is covered upstream in affinidi/affinidi-tdk-rs#907.Compatibility
No API or source changes. The only change in behaviour is the intended one: a deactivated
did:webvh/did:scid:vhissuer can no longer authorise provision or wake.