Repository navigation
Remove JSONPath - #796
Remove JSONPath#796nodh wants to merge 8 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
JesusMcCloud
left a comment
There was a problem hiding this comment.
surprisingly, this is almost purely mechanical. still: should we fuzz this (at the top of the PR stack)? esp. normalization logic from JsonPath was used before
|
Don't think fuzzing is necessary, since DCQL covers only inidizes and claim names ... on the other hand, better safe than sorry. |
sure but what if we have weird stuff with escape sequences, graphemes or literal codepoints in there. I simply don't know whether there are multiple equivalent ways to model one and the same string. I am also very much too far detached from the topic to know what functionality we must cover. is there something like prefixes vs literals? I am probably making a fool of myself here, but I simply do no know about these things in this context |
e07604b to
c8615c1
Compare
c8615c1 to
20d9d42
Compare
|
In my opinion Claims Path Pointers are much less complex than JSONPath |
DCQLClaimsPathPointer.query returned a JSONPath NodeList, although the concrete position of a selected claim is itself a claims path pointer of names and indices (OpenID4VP 1.0, 7.1). It now returns DCQLSelectedClaim, the value with its concrete path, and processes the components itself as OpenID4VP 1.0, 7.1.1 describes. JsonResult.nodeList becomes selectedClaims, DCQLClaimsPathPointerSegment.query is removed, and the holder uses the selected paths directly instead of converting NormalizedJsonPaths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each component of a claims path pointer checked the type of every selected element, cast it, and selected from it in its own if/else. selectFromEach now holds the rule that a selected element of the wrong type aborts processing with an error (OpenID4VP 1.0, 7.1.1, 2.1 to 2.3), so each component only states what it selects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ISO/IEC 18013-5 requests and presents data elements as a name space with a data element identifier, and every source of them already holds that pair. VC-K encoded it as a JSONPath of two names, only to decode it again, and dropped other path shapes with a warning. IsoPresentationParameters.claims, DeviceRequestCredentialDisclosure .disclosedAttributes and IsoMdocZkBackend.generate now take MdocClaimReferences, and NormalizedJsonPath.toIsoNamespaceAttribute is removed. DeviceRequestCredentialDisclosure keeps its serialized form, each data element as a [namespace, claimName] array. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JsonClaimReference wraps a DCQLClaimsPathPointer since 9.0.0, which kept a constructor taking a concrete NormalizedJsonPath for compatibility. It was the last use of JSONPath in the main code of vck; callers construct JsonClaimReference(DCQLClaimsPathPointer(...)) instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SdJwtTypeMetadataClaimInformationPath.process returned JSONPath paths and threw on an empty selection, where draft-ietf-oauth-sd-jwt-vc-19, 5.6.1.2 yields the empty set. No code in VC-K used it, and it was the only reason for sd-jwt-type-metadata to depend on jsonpath4k, so both are removed. Its test now checks the serialized form of claim paths instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test resolved claims of the holder's JSON view of a credential with JSONPath. It now selects them with claims path pointers (OpenID4VP 1.0, 7), as DCQL does, and checks that each is a primitive value. The ISO case looks up the data elements in their name space, as ISO/IEC 18013-5 has no paths. The test of jsonpath4k itself is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20d9d42 to
b9f2703
Compare
JSONPath has been dropped from OpenID4VP a while ago (actually before 1.0 final), but we've been using it for Presentation Exchange. Usage of that creeped into other parts of the library as well, even into #609. This PR removes all instances, relying on proper representations of DCQL Paths or ISO namepace-claim tuples.