Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New sample QR codes & JSON VCs #23

Closed
bmuramatsu opened this issue Dec 5, 2022 · 7 comments
Closed

New sample QR codes & JSON VCs #23

bmuramatsu opened this issue Dec 5, 2022 · 7 comments

Comments

@bmuramatsu
Copy link
Contributor

bmuramatsu commented Dec 5, 2022

Requirements:

  • OBv3 compatible VC
  • Unless necessary, do not use CBOR-LD compression
  • Uses DCC Sandbox Registry
  • Issue from "DCC Test Lab" and create an entry in the Sandbox Registry for it
  • Should contain the following information:
    • Credential Name: DCC Test Credential
    • Subject Name: Ian Malcom
    • Issuer: Digital Credentials Consortium Test Issuer
    • Issuer: URL: https://www.dcconsortium.org/
    • Issuer Image
      SVG: PNG:
      Ancient Building Icon, listed as public domain
    • Description: This is a sample credential issued by the Digital Credentials Consortium to demonstrate the functionality of Verifiable Credentials for wallets and verifiers.
    • Criteria: This credential has the following criteria [list the features of the credential from the list below]
    • Unique ID per issued VC (URL that contains the JSON of the credential)
  • Each credentials should be shared as both JSON and a QR code.
  • The QR code images should display (a) the conditions supported by the credential included as visible text in the image and (b) sufficient whitespace to allow the QR code to be read from the Photos Library on an iPhone. (Current iOS versions add an icon to perform text recognition on the image and that obscures part of the QR code.)
  • The QR code filenames should be descriptive and include the features of each credential, if shorthand is used members of the dev team should understand what's included in the file based on the filename

Features:

  • achievement.achievementType: Badge, Diploma
  • Has a subjectName, Does not have a subjectName
  • Exists in a known Issuer Registry, Does not exist in a known Issuer Registry
  • Is Revoked, Is Not Revoked
  • Is Expired, Is Not Expired
  • Contains an embedded Issuer Image, Contains an linked Issuer Image, Contains no Issuer Image
  • Contains an embedded Badge Image, Contains an linked Badge Image, Contains no Badge Image
    SVG: PNG with transparent background:
    Vector drawing of blue rosette ribbon, listed as public domain
  • [Discuss: has an existing subject DID]
@bmuramatsu
Copy link
Contributor Author

I'd like us to have a comprehensive set of credentials to test with and demonstrate the functionality we support in Learner Credential Wallet and VerifierPlus.

@jchartrand
Copy link
Contributor

@kayaelle feb 1 - UPDATE: I'm dynamically generating the VCs, and associated QR codes, from a file that provides the details for each type of test cred, and then saving the VCs and QRs to GitHub.

@bmuramatsu quick question: Why avoid CBOR-LD?

@dmitrizagidulin Do we have to use CBOR-LD? In other words, when the wallet scans a QR that contains an embedded VC (i.e, not a linked VC), will the wallet recognize anything other than the format that vp-qr uses, i.e, a VP encoded with CBOR-LD and formatted as describe in the vp-qr readme (https://github.com/digitalbazaar/vpqr):

<format and version, 'VP1-'><multibase prefix, 'B'><base32 RFC4648 (no padding) encoded CBORLD>

I guess what I'm asking is, does the wallet use the VP-QR library to decode the QR, and therefore only accepts that format? And so, all our sample QRs that embed VCs should follow that format?

@jchartrand
Copy link
Contributor

@dmitrizagidulin For the revoked credential samples, do we have a way to revoke credentials now, that the wallet/Verifier+ would recognize and check?

I know we just talked on the TWG call about how the StatusList2020 is forthcoming, but in the interim, could I bodge something in, or is it just better to wait until the new signing package, with StatusList2020, is ready?

@jchartrand
Copy link
Contributor

@bmuramatsu @dmitrizagidulin I've generated all the different test credentials, which you can see here:

https://github.com/jchartrand/dcc-test-creds

Each 'type' of credential (expired, not expired, valid, not valid, etc.) has its own folder with three files in each:

the json file, a QR containing a URL that points at the json file in GitHub, and a QR that contains the full json VC.

I didn't add the full JSON QR for those that were bigger than 7K, which is the limit of the library I used.

But, even the smallest of the json QRs is still really really dense, as you can see here:

https://github.com/jchartrand/dcc-test-creds/blob/main/validBadge/validBadge.png

image

And I can't, in fact, scan it from the LCW.

I didn't use CBOR-LD but I also didn't do anything to the raw JSON. Is there some kind of compaction I should be doing?

@dmitrizagidulin
Copy link
Member

@jchartrand - no, no additional compaction is needed when using raw json. Testing that QR code above, I'm seeing it's giving a parsing error, so we need to debug why.

@kayaelle
Copy link
Member

kayaelle commented Jun 8, 2023

@bmuramatsu - this ok to be closed?

@bmuramatsu
Copy link
Contributor Author

test-signer generates the codes as requested.

Not written explicitly in the original issue was posting as generated credentials for testing to the Docs repo and editing or closing the previous sample credentials issue, #10

(And these need to be reviewed periodically and probably updated.)

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

No branches or pull requests

4 participants