Repository navigation
chore(deps): update every dependency to latest stable incl. DataProofs 2.0.0 (#20), v1.2.0 - #21
Conversation
…ink 10.0.403 (#20), bump to v1.2.0 Credentials 1.1.1 was compiled against DataProofsDotnet.Jose 1.1.0. Jose 1.3.0 replaced JwsSigner..ctor(ISigner, string) with (ISigner, string, JwsKidPlacement) - source-compatible, binary-breaking - so every JOSE signing path (vc+jwt, SD-JWT VC, KB-JWT, vp+jwt) threw MissingMethodException once a consumer such as DidComm.Core 1.4.1 resolved Jose 1.3.0. - DataProofsDotnet.* 1.1.0 -> 1.3.0 - NetCrypto 1.2.0 -> 1.7.1 (DataProofs.Core 1.3.0 floors >= 1.4.0) - Microsoft.SourceLink.GitHub 10.0.300 -> 10.0.403 (GHSA-23fw-v26w-5fgq; NU1902 broke restore) - Remove the #18 AngleSharp pin: DataProofsDotnet.Rdfc 1.3.0 floors the patched AngleSharp >= 1.6.0 - CredentialsVersion 1.1.1 -> 1.2.0 No source or public API change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…essons Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regression guards from the issue #20 adversarial pass over DataProofs 1.3.0 / NetCrypto 1.7.1: JSON-serialized JWS with an unsigned kid is never accepted through any entry point; compact forgeries whose signed kid disagrees with the issuer/holder are rejected; every emitted vc+jwt / SD-JWT issuer JWT / kb+jwt / vp+jwt keeps its kid in the protected header (JwsKidPlacement.Auto); hostile headers fail without escaping exceptions and a bad signature is Failed, not Indeterminate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review: looks sound, approve once CI is green. I read the diff. I did not build or run anything locally. The two CI jobs (ubuntu and windows) were still in progress when I looked. What's good
Concerns and nits
I'm not approving until the two CI jobs finish green. Items 1–3 are non-blocking. Generated by Claude Code |
…ss invariants (#20) Addresses PR #21 review item 3. An ES256K (R, n-S) signature twin of a vc+jwt now verifies (pinned), but a twin never defeats freshness or disclosure binding: a malleated issuer JWT inside an SD-JWT+KB presentation breaks sd_hash, and malleated KB-JWT / vp+jwt twins still carry the nonce / challenge they signed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. Taking the items in order: 1. No test would have caught #20. Agreed. Nothing inside the repo can catch it, because every in-repo build compiles against the pinned DataProofs. DataProofs' 1.3.0 changelog also says binary compatibility across minor versions is out of scope for it, so this will recur. The guard has to run outside the pinned graph. Two options: a scheduled latest-dependencies job that floats DataProofs, NetCrypto and NetDid, or a consumer smoke test that references 2. Unverified claims.
3. ES256K high-S is not pinned. Fair. It was covered only by an uncommitted adversarial probe. Commit fa4c3e4 adds
On the wider NetCrypto 1.4.0 → 1.7.1 jump: its changelog lists only additive custody APIs, key-store hardening, and this one verify-side change. The full suite (now 396 tests) runs with NetCrypto 1.7.1 loaded. 4. Scope. Agreed. The pieces depend on each other, and the commits are separate. 🤖 Generated with Claude Code |
The first-party stack moved together (DataProofs 1.5.0, NetDid 4.0.0, DidComm.Core 1.5.0). This brings Credentials onto exactly that graph: - DataProofsDotnet.* 1.3.0 -> 1.5.0, NetDid.* 2.3.0 -> 4.0.0, JsonSchema.Net 7.3.2 -> 9.5.0 - Microsoft.Extensions.* / MetadataLoadContext 10.0.8 -> 10.0.14 (NetDid 4.0.0 floors 10.0.14) - PublicApiAnalyzers 5.6.0, Test.Sdk 18.11.0, xunit.runner.visualstudio 4.0.1, NSubstitute 6.2.0, coverlet 10.1.0, SkippableFact 1.5.85, ApiCompat tool 10.0.403 - FluentAssertions deliberately held at 7.0.0 (last Apache-2.0 release) Code changes the upgrade requires: - JsonSchema2020Validator ported to JsonSchema.Net 9. Each validation builds into a fresh local SchemaRegistry: v9 otherwise registers schemas process-wide, so one credential's schema could answer another's $ref, and a reused $id would throw. JsonSchemaException (v9's error for structurally invalid schemas) is caught, so the validator still never throws. New tests pin isolation, $id reuse, malformed schemas, external $ref and the ReDoS cut-off. - DataIntegrityMechanism wraps DataProofs' ProofGenerationException (thrown since 1.4.0) in the InvalidOperationException IIssuer/IHolder document, keeping the substrate type behind the seam. - DATA_LOSS_DETECTION_ERROR (DataProofs 1.5.0 RDFC data-loss fix) gets a verifier message. - The RDFC sample lists credentials/undefined-terms/v2 so its custom claims are signable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion; never throw (#20) Found by the adversarial pass on the JsonSchema.Net 9 port (e12819c), before release: - Dialect-registry poisoning. JsonSchema.Net 9 records document-defined $schema dialects in the process-wide DialectRegistry.Global, first writer wins. A schema supplied with one credential could redefine a custom dialect as core-only (validation keywords become annotations), flipping a later credential that declares it from Rejected to Accepted. The unsynchronized dictionary also grew without bound and corrupted under concurrency. Each validation now builds into a fresh local DialectRegistry. - Fetch fallback. JsonSchema.Net falls back to SchemaRegistry.Global.Fetch, which any code in the host process may set. The local registry's Fetch now refuses, so no external reference is ever fetched. - Exceptions escaping Validate. A non-string $schema or a lone surrogate in a keyword value threw InvalidOperationException (v7 returned Indeterminate). The build step now maps every non-cancellation exception to Indeterminate schema.unparseable. Each fix is pinned by tests and mutation-checked (removing it fails the tests). The false comment that the dialect was fixed at 2020-12 is corrected: a declared $schema selects a known or same-document dialect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ord, lessons Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Not ready to merge: the conformance gate is failing on the reviewed head I reviewed the title, description, all changed files and commit messages, and ran Blocking — resolve the RDFC language-direction compatibility loss introduced by I reproduced the dependency difference: DataProofs.Rdfc 1.1.0 canonicalizes the example; 1.5.0 throws Please resolve the intended support contract before merge. Secure RDFC direction support belongs in DataProofs; adopting the fix, regression coverage and accurate compatibility documentation belong here. If direction-bearing RDFC credentials are deliberately unsupported for this release, make that an explicit scope decision and document the exact limitation and conformance expectations. Simply lowering the passing-count threshold would hide the regression. Add focused coverage for the four affected positions and update Non-blocking test gap — The scope is broad but coherent for the requested stack upgrade, and the commit messages are specific. The previously acknowledged consumer binary-compatibility harness remains a follow-up; I am not presenting it as a newly discovered defect. |
…cit v1.2.0 scope decision (#20) Addresses the PR #21 review. DataProofs 1.5.0 refuses to RDFC-sign a language value object with @direction (fail-closed: the Data Integrity specs define no lossless canonicalization of direction and JSON-LD's default drops it, so earlier versions signed bytes that did not carry it). The W3C suite's four issuer-side direction cases (name, description, issuer.name, issuer.description) therefore fail, 57 -> 54 of 59. - Scope decision: direction-bearing credentials are unsupported under the RDFC suites in v1.2.0; the JCS suites are the supported path. Documented in docs/conformance.md and the CHANGELOG; tracked upstream as dataproofs-dotnet#40 (opt-in rdfDirection: i18n-datatype). - Gate: W3cVcdm2SuiteTests keys on five NAMED known failures (the suite's own assertion messages) plus a floor of 54. A failure outside the list fails the gate however many tests pass, so a regression cannot hide behind the count. Fails closed if the mocha failure section cannot be parsed; prints a notice when a known failure starts passing. ParseFailures is pinned by unit tests on a captured mocha excerpt, since the suite only runs on CI. - Focused coverage (RdfcIssueVerifyTests, 8 cases over the four positions): RDFC refuses @direction naming the cause; JCS secures and verifies the same document; language-only secures under RDFC; adding @direction after RDFC signing is Rejected with DATA_LOSS_DETECTION_ERROR. - DataIntegrityMechanism's InvalidOperationException now includes the substrate's specific cause ("uses @direction") one level down, not only the generic data-loss sentence. - JoseSubstrateRegressionTests: the KB-JWT and vp+jwt ES256K twins are first Accepted with matching nonce/challenge, then Rejected for freshness (holder_binding_replay for the VP; the key-binding code, not an issuer-signature code, for the KB-JWT). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Addressed in 17fbc44. Point by point: Blocking — RDFC language-direction support contract. Resolved as an explicit scope decision, not by weakening the guard or lowering a count.
Non-blocking — Not changed: the shim stays on 🤖 Generated with Claude Code |
DataProofs 2.0.0 is a major upstream release; Credentials is rebuilt against it (the RDFC suite constructors changed shape: source-compatible, binary-breaking). No Credentials public API change. Owner decision: nothing issued by an earlier Credentials exists in the wild, so no compatibility shims. What 2.0.0 changes here: - RDFC now signs a language value's @direction (dataproofs #40; rdfDirection: i18n-datatype, the reference implementations' representation). Last round's scope decision is reversed: the direction tests now assert issue+verify under RDFC and JCS, and that flipping or dropping the direction after signing fails with PROOF_VERIFICATION_ERROR; a number with @direction is still DATA_LOSS. - The W3C gate drops the four direction cases from KnownFailures (1 known failure left: relatedResource digest), floor 54 -> 58; docs/conformance.md says 58/59. The parser test now shows the old direction messages as unknown failures. - bbs-2023 follows the reference algorithms. Two new refusals surfaced by the suite: a reveal that discloses no non-mandatory claim (NetCrypto's BBS provider limit) and a reveal pointer that matches nothing (1.5.0 ignored it). Bbs2023Deriver now carries the substrate's cause in its CredentialFormatException message; IBbsDeriver documents both; two tests pin them; four tests reveal one non-mandatory claim. - Inherited security fix GHSA-6fxh-mc39-94vc (proof members bound to the signature under RDFC/bbs) and the RDFC canonicalization hardening; RDFC bytes change for tied-blank-node documents. CHANGELOG states all of it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Review of I read the title, description, diff and all nine commit messages, including the schema migration and proof/dependency changes. This is a broad upgrade (25 files), but the changes serve the same stack-convergence goal and the commit messages explain them clearly. Missing integration coverage / missing evidence: the description says the DataProofs 2.0.0 adversarial results are “posted in the thread”; I could not find that report. The committed RDFC tests cover direction and undefined-term tampering, but do not pin the newly inherited GHSA-6fxh-mc39-94vc proof-member/context-binding fix through Credentials’ public verifier. Please link or post the promised reproducible probe and results. Preferably retain a representative regression in Verified: The previous blocking direction concern is resolved: all four positions now issue and verify, and flipping/removing direction is rejected. The high-S freshness tests now include the missing successful controls. The deferred |
|
460c675 — DataProofs 2.0.0 folded in; all 6 checks green.
The adversarial pass on the 2.0.0 behaviours (direction binding, proof-member binding, bbs-2023 derive/verify, exception contract, JsonSchema.Net 9.6.0) is still running and will be posted separately when it reports; it does not block review. 🤖 Generated with Claude Code |
|
Adversarial pass on 460c675 (DataProofs 2.0.0 behaviours): nothing exploitable attributable to the change. 35 attacks through the public roles (
Pre-existing hardening items surfaced along the way (identical at 17fbc44 and in 1.1.1, so not caused by this PR): claim-term respelling without context allowlisting is #22 ( 🤖 Generated with Claude Code |
Closes #20.
Summary
This PR started as the rebuild against DataProofs 1.3.0 that fixes #20's
MissingMethodException. It now moves every dependency to its latest stable release, including DataProofs 2.0.0 (a major upstream release), so Credentials is built against exactly the graph the rest of the stack resolves: DataProofs 2.0.0, NetDid 4.0.0, NetCrypto 1.7.1, Microsoft.Extensions 10.0.14, JsonSchema.Net 9.6.0. FluentAssertions is the one deliberate hold-back (licence). Owner decision: nothing issued by an earlier Credentials exists in the wild, so there are no compatibility shims or migration steps where DataProofs 2.0.0 changes signed bytes or proof formats.The #20 bug
Credentials.*1.1.1 was compiled againstDataProofsDotnet.Jose1.1.0. Jose 1.3.0 replacedJwsSigner..ctor(ISigner, string)with..ctor(ISigner, string, JwsKidPlacement): source-compatible, binary-breaking. Any app resolving a newer Jose (every app onDidComm.Core≥ 1.4.1) threwMissingMethodExceptionon all four JOSE signing paths. Rebuilding fixes it; a regression test pins that every emitted token keeps itskidin the protected header.Dependencies
DataProofsDotnet.*(Core/Jose/Cose/Rdfc/DI)NetDid.Core/.Method.Key/.Extensions.DependencyInjectionNetCryptoJsonSchema.NetMicrosoft.Extensions.*,System.Reflection.MetadataLoadContextMicrosoft.SourceLink.GitHubNU1902broke CI onmain)AngleSharppinDataProofsDotnet.Rdfcitself requires the patched ≥ 1.6.0)FluentAssertionsWhat DataProofs 2.0.0 changes here (commit 460c675)
@direction(our dataproofs-dotnet#40, implemented upstream withrdfDirection: i18n-datatype, the reference implementations' representation). This reverses the scope decision from 17fbc44: direction-bearing credentials issue and verify under RDFC, and flipping or dropping the direction after signing fails withPROOF_VERIFICATION_ERROR. Tests cover the four W3C positions under RDFC and JCS; a number with@directionis still refused as data loss.relatedResourcedigest), floor 54 → 58.docs/conformance.mdsays 58/59. The parser test now shows the old direction messages as unknown failures, which is what the gate reports for a regression.Bbs2023Derivernow carries the substrate's cause in itsCredentialFormatExceptionmessage;IBbsDeriverdocuments both; two tests pin them.proofPurpose,challenge,domain,expires, …) are bound to the signature under RDFC and bbs-2023. Also inherited: RDFC canonicalization hardening (hostile blank-node graphs no longer overflow the stack) and corrected canonical bytes for tied-blank-node documents.new X()binds unchanged. No Credentials public API change.Earlier code changes in this PR
JsonSchema2020Validatorported to JsonSchema.Net 9 with fresh local schema and dialect registries per validation and a fetch that refuses, so one credential's schema can never answer another's$refor redefine a dialect, and no external reference is ever fetched;Validatestill never throws. 20 tests pin it, each mutation-checked.ProofGenerationExceptionis rethrown as the documentedInvalidOperationException, with the substrate's specific cause in the message.DATA_LOSS_DETECTION_ERRORgets a verifier message; the RDFC sample listscredentials/undefined-terms/v2.Verification (head 460c675)
-warnaserrorbuild: 0 warnings / 0 errors. 428 tests pass.DidComm.Core1.5.0 and the packed 1.2.0 runs all 14 samples with DataProofs 2.0.0, NetCrypto 1.7.1 and NetDid 4.0.0 loaded. (Note: DidComm 1.5.0 is compiled against Jose 1.5.0; Jose's public API is unchanged in 2.0.0. The harness loads DidComm but does not exercise its own signing paths.)Release
Hold the
v1.2.0tag until the remaining v1.2.0 work lands; the CHANGELOG heading reads "Unreleased" until then.🤖 Generated with Claude Code