identity.rs icon indicating copy to clipboard operation
identity.rs copied to clipboard

[Task] Clarify `id` field restriction in `StatusList2021`

Open PhilippGackstatter opened this issue 2 years ago • 1 comments

Description

StatusList2021 and RevocationList2020 mandate for the id field of credentialStatus:

It MUST NOT be the URL for the status list.

It's unclear why this is the case and we did not adopt this restriction for RevocationBitmap2022, so we should clarify why this is the case in those specs.

An issue was opened to ask for clarification.

Resources

https://github.com/iotaledger/identity.rs/pull/879#discussion_r895764087 https://github.com/iotaledger/identity.rs/pull/879#discussion_r900129500

PhilippGackstatter avatar Jun 20 '22 08:06 PhilippGackstatter

The answer from the linked issue on StatusList2021Entry is that the id field should uniquely identify the credentialStatus property. This is useful if a larger graph of credentials is created where multiple credentialStatus properties exist, and they can be uniquely identified through id.

This means we can consider changing the id field to include the index to make it unique among credentials in the same revocation bitmap.

So for instance, now we have:

 "credentialStatus": {
    "id": "did:iota:EvaQhPXXsJsGgxSXGhZGMCvTt63KuAFtaGThx6a5nSpw#revocation",
    "type": "RevocationBitmap2022",
    "revocationBitmapIndex": "5"
  },

and we could change it to (much like what @cycraig suggested in one of the comments):

 "credentialStatus": {
    "id": "did:iota:EvaQhPXXsJsGgxSXGhZGMCvTt63KuAFtaGThx6a5nSpw?index=5#revocation",
    "revocationBitmapUrl": "did:iota:EvaQhPXXsJsGgxSXGhZGMCvTt63KuAFtaGThx6a5nSpw#revocation",
    "type": "RevocationBitmap2022",
    "revocationBitmapIndex": "5"
  },

However the VC spec also says this about identifiers:

The value of the id property MUST be a single URI. It is RECOMMENDED that the URI in the id be one which, if dereferenced, results in a document containing machine-readable information about the id.

Then again, StatusList2021Entry does it similarly, so I'm unsure how much this applies here.

PhilippGackstatter avatar Jun 22 '22 07:06 PhilippGackstatter