Replace PE Schema with Type

Issue #1252 open
David Chadwick created an issue

Issue 213 in the DIF PE spec (https://github.com/decentralized-identity/presentation-exchange/issues/213) suggests to replace the schema property with the type property. This parallel issue is raised here in order to track the DIF PE issue and to support its resolution.

Comments (8)

  1. Kristina Yasuda

    There is a proposal in DIF to remove `schema` field all together to use JSON Path to point where to find the shape of data being requested (credentialSchema or type fields of VCs)

    Here are examples: https://hackmd.io/0tmo69rrRkeiryDZE_5waQ

    I think this is problematic from interop/security perspective because path is not bound to credential format.

  2. Daniel Buchner

    We might want to look at an even simpler route of just using field evaluation to allow a Verifier to query whatever part of the candidate credential inputs they want to determine whether it is of the right type/schema. This would be nice, because no new mechanics would need to be added, and we could remove the one-off type/schema property altogether.

  3. David Chadwick reporter

    Daniel, how is you suggestion different to Kristina’s?

    Kristina, doesn’t your objection apply to every constraint in the input descriptor?

  4. Daniel Buchner

    Kristina: you can make the path account for the format, or, as Torsten requested (and we added in a PR this week to the 2.0 spec draft) you can separate out your Input Descriptors with per-descriptor format declarations, if you don’t like to use paths to account for them.

  5. Kristina Yasuda

    suggest we close this, since agreement was not reached on this in DIF-OIDF calls and PEv2

    • renames the parameter to types from `schema`
    • moves type/schema parameter from input_descriptors into input_descriptors.constraints
    • mandates passing requested type by reference using JSONPath as opposed to by reference as it was in PEv1

    Now:

    "input_descriptors": [
     "constraints": {
              "types": [
                {
                  "path": ["$.credentialSchema.id", "$.vc.credentialSchema.id"],
                  "filter": {
                    "type": "string",
                    "pattern": "https://bank-schemas.org/1.0.0/accounts.json|https://bank-schemas.org/2.0.0/accounts.json"
                  }
                }
              ]
     }
    ]
    

    Before

    "input_descriptors": [
          {
            "id": "banking_input_1",
            "schema": [
              {
                "uri": "https://bank-schemas.org/1.0.0/accounts.json"
              },
              {
                "uri": "https://bank-schemas.org/2.0.0/accounts.json"
              }
            ]
          }
    }
    

  6. David Chadwick reporter

    Agreed that this can be closed as this particular issue has been resolved. (However it does raise another issue that PE has now duplicated the way that requesting a specific type of VC can be performed: firstly in this new types parameter, and secondly in the original constraints formulation.)

  7. Log in to comment