Skip to content

Query Language: Value Matching #9

Open

Description

@c2bo

There has been some prior discussion in the different WGs on advanced query language features with the main historic discussion point being value matching: Value matching as defined in OpenID4VP (see https://openid.github.io/OpenID4VP/openid-4-verifiable-presentations-1_0-wg-draft.html#selecting_claims) allows a Verifier to request a specific claim and provide a hint on the expected value.

There has been some discussions around what exactly should be normatively said around value matching and how to best make it work for different wallet architectures etc. while preventing all potential leakage of information.

Current text in OpenID4VP on value matching:

When a Claims Query contains a restriction on the values of a claim, the Wallet SHOULD NOT return the claim if its value does not match according to the rules for values defined in Section 6.3, i.e., the claim should be treated the same as if it did not exist in the Credential. Implementing this restriction may not be possible in all cases, for example, if the Wallet does not have access to the claim value before presentation or user consent or if another component routing the request to the Wallet does not have access to the claim value. It is ultimately up to the Wallet and/or the End-User if the value matching request is followed. Therefore, Verifiers MUST treat restrictions expressed using values as a best-effort way to improve user privacy, but MUST NOT rely on it for security checks.

with these privacy considerations:

When using DCQL values to match the expected values of claims, the fact that a claim within a certain Credential matched a value or did not match a value might already leak information about the claim value. Therefore, Wallets MUST take precautions against leaking information about the claim value when processing values. This SHOULD include, in particular:

  • ensuring that a Verifier, in the response, cannot distinguish between the case where an End-User did not consent to releasing the Credential and the case where the claim value did not match the expected value, and
  • preventing repeated or "silent" requests leaking data to the Verifier without the user's consent by ensuring that all requests, even if no response can be sent by the Wallet due to a values mismatch, require some form of End-User interaction before a response is sent.

In both cases listed here, it needs to be considered that returning an error response can also leak information about the processing outcome of values.

More generally speaking, there have also been discussions on more advanced syntax in the query language with one such example being value in array (e.g., specific country in nationalities array)

Activity

  1. GarethCOliver commented on Jul 13, 2026

    @GarethCOliver
    Collaborator

    One thing to consider is to make it's usage a property of individual documents. (e.g. something about the doctype/credentialtype being able to indicate which claims MUST be available for matching, and that it is recommended not to try and match on values that are not declared as matchable).

    This doesn't really normatively change the protocol, but provides guidance to those that define credentials to consider whether a particular claim is matchable or not.

    this is useful in the android world, as it means that the Wallet knows to make those values available to CredMan, as well as for Wallets that do not have access to all of the values at rest. By doing it at a document type level, Verifiers can expect a uniform experience across Wallets

  2. andrewhughes3000 commented on Aug 27, 2026

    @andrewhughes3000
    Member

    WG discussion:

    • It is unclear how value matching could be made to work in all cases - access to the attribute value is indeterminate at this time (i.e. most attributes cannot be accessed until user interaction happens)
    • could there be a way to make this feature available in certain use cases
    • Continue discussion at F2F meeting
  3. andrewhughes3000 commented on Aug 31, 2026

    @andrewhughes3000
    Member

    F2F discussion:

    • A reason given to not match on arbitrary data is that data elements might not be available at matching time e.g. encrypted.
    • Should data elements be flagged as "matchable" in the doctype by the issuer? Does this explode complexity?
    • Need to decide what must be defined here in order for value matching valuable and reliable feature
    • Consider allowing matching on any data element and let ecosystems determine
    • Comment on this issue to explain how the WG thinks about value matching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions