Skip to content

Remove JSONPath - #796

Open
nodh wants to merge 8 commits into
fix/sd-jwt-decoysfrom
feature/json-path-removal
Open

nodh wants to merge 8 commits into
fix/sd-jwt-decoysfrom
feature/json-path-removal

Conversation

@nodh

@nodh nodh commented Nov 11, 2026

Copy link
Copy Markdown
Member

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.

@nodh nodh added this to the 10.0 milestone Nov 11, 2026
@nodh
nodh requested review from JesusMcCloud and gp-iaik November 11, 2026 14:56
@nodh nodh self-assigned this Nov 11, 2026
@nodh
nodh added this pull request to stack #797 November 11, 2026 14:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T14:59:03.333252Z e07604b PR opened
🔒 Security Review ✅ Completed 2026-11-11T15:02:12.197727Z e07604b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@JesusMcCloud JesusMcCloud left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nodh

nodh commented Nov 17, 2026

Copy link
Copy Markdown
Member Author

Don't think fuzzing is necessary, since DCQL covers only inidizes and claim names ... on the other hand, better safe than sorry.

@JesusMcCloud

Copy link
Copy Markdown
Collaborator

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

@nodh
nodh force-pushed the feature/json-path-removal branch from e07604b to c8615c1 Compare November 18, 2026 10:04
@nodh
nodh force-pushed the feature/json-path-removal branch from c8615c1 to 20d9d42 Compare November 18, 2026 10:10
@nodh

nodh commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

In my opinion Claims Path Pointers are much less complex than JSONPath

nodh and others added 8 commits November 19, 2026 10:56
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>
@nodh
nodh force-pushed the feature/json-path-removal branch from 20d9d42 to b9f2703 Compare November 19, 2026 09:58

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants