digitalcredentials / learner-credential-wallet

Learner Credential Wallet is a cross-platform iOS and Android mobile application for storing and sharing digital learner credentials.
https://lcw.app
MIT License
54 stars 28 forks source link

Credential status showing revoked when statusListIndex is a string #526

Closed jchartrand closed 6 months ago

jchartrand commented 10 months ago

The verifiable credential below shows as 'revoked' in the LCW, even though it hasn't been.

It seems likely that the problem is that the value of the statusListIndex property in that credential is a string, e.g.,

"statusListIndex": "4",

whereas the LCW verifier might be expecting a number, like so:

"statusListIndex": 4

The credential was generated using an LEF fork of the DCC credential status list manager, forked specifically to make the statusListIndex a string (rather than a number). And this was done because the status list spec actually specifies a string.

We have updated our DCC status list manager to match the spec (and so use a string value), but we may not yet have updated the LCW verification code, and similarly also not the VerifierPlus code (the two might share the same code). VerifierPlus also shows the credential as revoked (see screen shot further below).

So, we likely need to update the verification code in the LCW to handle both a string (to satisfy the spec) and a number value (for backwards compatibility with previously issued credentials) for the statusListIndex.

{
  "type": [
    "VerifiableCredential",
    "OpenBadgeCredential"
  ],
  "name": "James Chartrand - Bachelor's Degree in Mathematics",
  "issuer": {
    "url": "https://digitalcredentials.mit.edu/",
    "type": "Profile",
    "name": "DCC Demo University",
    "image": {
      "id": "https://github-production-user-asset-6210df.s3.amazonaws.com/206059/282835374-3f3e1476-fd1e-4c8f-a560-5cfb4017bbc3.png",
      "type": "Image"
    },
    "id": "did:key:z6MknNQD1WHLGGraFi6zcbGevuAgkVfdyCdtZnQTGWVVvR5Q"
  },
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.1.json",
    "https://w3id.org/vc/status-list/2021/v1",
    "https://w3id.org/security/suites/ed25519-2020/v1"
  ],
  "credentialSubject": {
    "type": [
      "AchievementSubject"
    ],
    "name": "James Chartrand",
    "achievement": {
      "type": [
        "Achievement"
      ],
      "name": "Bachelor's Degree in Mathematics",
      "criteria": {
        "type": "Criteria",
        "narrative": "James Chartrand has fulfilled the requirements to earn this Bachelor's Degree in Mathematics."
      },
      "description": "DCC Demo University Bachelor's Degree in Mathematics",
      "fieldOfStudy": "IMathematics",
      "achievementType": "BachelorDegree"
    },
    "id": "did:key:z6MkoCCtp5PSFavGot5obuPE3sWbQw5zDfoyMv7qmwrfL7en"
  },
  "id": "655641cf9525a95610e2ac5d",
  "credentialStatus": {
    "id": "https://digitalcredentials.github.io/lef-dashboard-cred-status/Y4DF9YY3Z7#4",
    "type": "StatusList2021Entry",
    "statusPurpose": "revocation",
    "statusListIndex": "4",
    "statusListCredential": "https://digitalcredentials.github.io/lef-dashboard-cred-status/Y4DF9YY3Z7"
  },
  "issuanceDate": "2023-11-16T16:57:31Z",
  "proof": {
    "type": "Ed25519Signature2020",
    "created": "2023-11-16T16:57:31Z",
    "verificationMethod": "did:key:z6MknNQD1WHLGGraFi6zcbGevuAgkVfdyCdtZnQTGWVVvR5Q#z6MknNQD1WHLGGraFi6zcbGevuAgkVfdyCdtZnQTGWVVvR5Q",
    "proofPurpose": "assertionMethod",
    "proofValue": "z2rtpzQkENHdoqHhWaKyrxhCjAu8QdQoCSuU8wCTX1Zjwm5x9oqVG9K5aTxU4yzpzvCo3XCdH9y2ZzGbZbbHwqBdL"
  }
}
image
kayaelle commented 9 months ago

Potentially related to: https://github.com/digitalcredentials/vc-status-list/issues/6

kayaelle commented 8 months ago

@dmitrizagidulin - Can you confirm that this can be closed? If so, can you add a comment about what was done to address it for future reference and understanding? Thanks!

dmitrizagidulin commented 7 months ago

Should be addressed by PR #543, on its way to app stores as v2.0.21-build76.

alexfigtree commented 6 months ago

Implemented and deployed, closing