w3c-ccg / vp-request-spec

Specification for a query language to request Verifiable Presentations from wallets etc.
https://w3c-ccg.github.io/vp-request-spec/
Other
9 stars 3 forks source link

Add `acceptedEnvelopes` and `acceptedCryptosuites` examples for `QueryByExample` #35

Open dlongley opened 4 months ago

dlongley commented 4 months ago

For example, these two examples show that the sender will accept a number of cryptosuites or at least one envelope. The second example also highlights that only a limited subset of the VC is requested, so if a selective disclosure mechanism is available and chosen, just that field can be revealed.

{
  "type": "QueryByExample",
  "credentialQuery": {
    "reason": "Please present your PermanentResidentCard or Verifiable Credential(s) to complete the verification process.",
    "example": {
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://w3id.org/citizenship/v1"
      ],
      "type": ["PermanentResidentCard"]
    },
    "acceptedCryptosuites": [
      "Ed25519Signature2020",
      "eddsa-rdfc-2022",
      "ecdsa-rdfc-2019",
      "bbs-2023",
      "ecdsa-sd-2023"
    ],
    "acceptedEnvelopes": [
      "application/jwt"
    ]
  }
}
{
  "type": "QueryByExample",
  "credentialQuery": {
    "reason": "Please present your PermanentResidentCard or Verifiable Credential(s) to complete the verification process.",
    "example": {
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://w3id.org/citizenship/v1"
      ],
      "type": ["PermanentResidentCard"],
      "credentialSubject": {
        "birthCountry": ""
      }
    },
    "acceptedCryptosuites": [
      "Ed25519Signature2020",
      "eddsa-rdfc-2022",
      "ecdsa-rdfc-2019",
      "bbs-2023",
      "ecdsa-sd-2023"
    ],
    "acceptedEnvelopes": [
      "application/jwt"
    ]
  }
}
msporny commented 3 months ago

The group discussed this on the 2024-07-23 telecon:

@dlongley noted that we currently don't document how to express accepted cryptosuites or envelopes when in a VPR. We should provide documentation on how to do this.

A PR should be raised that provides examples and makes it clear that: