Skip to content

Support partial matching in DCQL and override delegation for user verification - #56

Merged
QZHelen merged 1 commit into
digitalcredentialsdev:mainfrom
danieljkim1:pnv-matcher-delegation
Sep 17, 2026
Merged

QZHelen merged 1 commit into
digitalcredentialsdev:mainfrom
danieljkim1:pnv-matcher-delegation

Conversation

@danieljkim1

Copy link
Copy Markdown
Contributor

Summary

  1. Partial matching in DCQL: Allow partial credential matching across multi-credential sets in DCQL for PNV matcher, recording matched_indices, option_length, and is_partial.
  2. Credential Manager Header: Add declaration SetDelegationTypeForEntryInSet (credman_v7) to matcher/credentialmanager.h.
  3. Delegation Type Handling:
    • For partial matches when wasm_version >= 7, default delegation type to 1 (FRAGMENT).
    • If the incoming request requests user verification (checked across user_verification, user_verification_hint, expected_user_verification in request parameters or DCQL credential/claim paths), override delegation type to 0 (NONE).
    • Setting delegation type to NONE ensures Credential Manager invokes the provider Activity (e.g. OgiTokenPresentationChimeraActivity) rather than the headless background fulfillment service, so user authentication (biometrics/PIN/device lock) can be performed.

@danieljkim1
danieljkim1 force-pushed the pnv-matcher-delegation branch 3 times, most recently from 3fd2c64 to 8b58213 Compare September 16, 2026 22:33
@danjkim

danjkim commented Sep 16, 2026

Copy link
Copy Markdown

PnvOpenID4VPMatcherTest also passes fully

@QZHelen QZHelen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please also update the pnv.wasm used by CMWallet

Comment thread matcher/pnv/openid4vp1_0.c Outdated
return 1;
}
}
cJSON *cred_uv_hint = cJSON_GetObjectItemCaseSensitive(cred, "user_verification_hint");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This (user_verification_hint ) is the only valid hint value, and there's no true/false or other values associated with it

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

addressed

- Allow partial credential matching across credential sets in DCQL for PNV matcher
- Define SetDelegationTypeForEntryInSet in credentialmanager.h
- Forward delegation_type from candidate credentials through dcql matching
- Set delegation (type 1) when wasm_version >= 7 and candidate delegation_type is FULL (1) without user verification
- Suppress partial matches when user verification is requested, delegation is unsupported (wasm_version < 7), or candidate delegation_type is not FULL (1)
- Match user_verification_hint claim path inside dcql_query claims to detect UV request
- Modernize PNV test framework and add unit test coverage for hint matching, full match delegation, UV suppression, and partial match filtering
- Update pnv.wasm asset used by CMWallet
- Add pnv_test and test_pnv targets to matcher/Makefile
@danieljkim1
danieljkim1 force-pushed the pnv-matcher-delegation branch from b5b036c to 7dab12e Compare September 17, 2026 01:08
@QZHelen
QZHelen merged commit 4230483 into digitalcredentialsdev:main Sep 17, 2026
1 check passed
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.

3 participants