-
Notifications
You must be signed in to change notification settings - Fork 20
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
Unify design of status lists to support multi-bit values #73
Comments
Starting us off with a proposed unified design, example first:
Questions that are left unanswered:
Thoughts on this unified approach, @mprorock, @OR13, @dlongley? |
Why use literal strings for Seems like a URL would be better, and you could put the active and inactive language at the resource the URL dereferences too. Let's get rid of all the sugar and add back only what needs to be understood by a verifier. |
Yes, I had considered that approach, but felt folks might reject the direction as being "too Linked Data-y". If we go that route, would there be standard URLs for revocation and suspension? (I'd presume so). The messages might be useful for verifier platforms, if they wanted to elaborate on all of the statuses associated with credential. I thought traceability had a need for that, if not, we might want to simplify here. |
some inline comments below
This is just naming - easy enough for implementers (ourself and others) to adjust naming if the WG goes this direction.
integer conversion... since we're trying to get to an integer bit offset anyway).
cool
definite size parameter feels like the right way rather than looking inside, looking for the largest number, and then adding one
yes - we likely want to be able to point directly back to regulatory references etc
no -
alot of this would be much easier/better in cbor |
My understanding is that the goal of If you sign a VC with a Additionally, consider one of the use cases for In this scenario, an issuer might be thinking that if they always set a So, right now, I don't think An issuer should instead decide on a validity period they are willing to commit to (maybe it's 5 minutes, maybe 15 -- maybe 24 hours -- maybe more, their call) and reissue the status list VC with an updated So, as an issuer, if you want to allow your status list VCs to expire every 5 minutes, issue a new one if any VC status changes (understanding that the status won't be consistent until after the old status list VC expires) and auto-reissue when a status list VC is requested if it has expired, bumping Regarding privacy-preserving but consistent status tracking for newly issued VCs, do not initialize your status list bits as scrambled, but assign from a pseudo-randomly selected index or slice of the list. If some kind of scrambling or other privacy-preserving setting of the bits is still somehow required, ensure that there are always some unallocated areas of the list that match what a newly issued VC status would be -- and choose from those sections of the list for any new VC, simultaneously preparing any other unallocated areas for the next one or more VCs to be issued in the future. In other words, ensure that over the next "validity period", there is always enough "prepared, unallocated space" for the maximum number of VCs you could issue over that period. |
The Working Draft links to this issue in a note that seeks feedback. I read #65 and #47 and wondered if the following syntax has been suggested or considered: {
"@context": [
"https://www.w3.org/ns/credentials/v2"
],
"id": "https://example.com/credentials/status/3",
"type": ["VerifiableCredential", "BitstringStatusListCredential"],
"issuer": "did:example:12345",
"validFrom": "2021-04-05T14:27:40Z",
"credentialSubject": {
"id": "https://example.com/status/3#list",
"type": "BitstringStatusList",
"status": [
{
"statusPurpose": "revocation",
"encodedList": "H4sIAAAAAAAAA-3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAIC3AYbSVKsAQAAA"
},
{
"statusPurpose": "suspension",
"encodedList": "H4sIAAAAAAAAA-3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAIC3AYbSVKsAQAAA"
},
{
"statusPurpose": "pending_review",
"encodedList": "H4sIAAAAAAAAA-3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAIC3AYbSVKsAQAAA"
}
]
},
"proof": { ... }
} IMHO, that would be an easy way for the verifier to get a bunch of status values about a credential. After parsing, they might end up with something like {
"id": "https://example.com/credentials/status/3#94567",
"revocation": false,
"suspension": false,
"pending_review": true
} That should be relatively easy to act upon. The {
"@context": [
"https://www.w3.org/ns/credentials/v2"
],
"id": "https://example.com/credentials/23894672394",
"type": ["VerifiableCredential"],
"issuer": "did:example:12345",
"validFrom": "2021-04-05T14:27:42Z",
"credentialStatus": [
{
"id": "https://example.com/credentials/status/3#94567",
"type": "BitstringStatusListEntry",
"statusPurpose": ["revocation", "suspension", "pending_review"],
"statusListIndex": "94567",
"statusListCredential": "https://example.com/credentials/status/3"
}
],
"credentialSubject": {
"id": "did:example:6789",
"type": "Person"
},
"proof": { ... }
} |
@samuelmr wrote:
Yes, we had considered that, but ended up with the following (more composable) construct in the spec today:
That would be an incorrect way to model the data. Effectively, what you're proposing would say that the bit that handles "revocation", "suspension", and "pending_review" is bit 94567, which would be wrong (because flipping the bit would flip all 3 states). An alternate reading that presumes bit offsets based on the three items listed would prevent bit packing, which was a requirement from a subset of the group. I believe the current specification, including the pending PRs, will enable the use case you were attempting to address in a more composable way, and in a way that supports bitpacking. |
At present, there doesn't seem to be enough desire to rewrite/unify the design to support multibit values. The current specification achieves all of the use cases outlined and is "good enough" to enter Candidate Recommendation. I'm marking this issue as "pending 7 day close". Feel free to object to closing this issue during that timeframe. |
In my status list credential example there are three lists with different
You mentioned in #47 (comment) that one can already today "[a]ssociate an array with IMHO, using bytes instead of bits adds complexity. For example, a library implementing this spec will have a validity-check API that returns either boolean or a string, depending on the If the spec only had bit lists for different Having said that, this is just friendly feedback and I don't object to closing this issue. |
@samuelmr wrote:
We appreciate the feedback... more thoughts below. The most important question I have for you is this: Are we going to prevent you from implementing a particular use case you are interested if we don't make the changes you are suggesting? If the answer is "yes", then please say so and we'll do our best to address your use case. Please keep that in mind while reading the rest of the response:
Ah! I think I see what you're saying now. In your markup here: {
"id": "https://example.com/credentials/status/3#94567",
"type": "BitstringStatusListEntry",
"statusPurpose": ["revocation", "suspension", "pending_review"],
"statusListIndex": "94567",
"statusListCredential": "https://example.com/credentials/status/3"
} ... you have one single The downside with these "more compact" approaches is implementation complexity (though, arguably, the implementation complexity isn't that terrible). I'll try to get feedback from the group on these "more advanced" markup examples. The current set of implementers might be willing to implement these features, or they might not be willing... I'll see what they say.
Yes, it's missing an example that shows one how to do it. That example exists here: I've just raised PR #122 to put that example in the specification so that it's more clear to people how they can utilize that facility. We'll elaborate upon the example more during the Candidate Recommendation phase.
Yes, agreed. To be clear, I am (personally) not fond of the feature, but there was a subset of the group that was likely going to formally object to the feature not going into the specification. The strongest argument for the bytes approach is bitpacking LOTS of possible status values into a single byte (you can have up to 255 status values per 8 bits vs. only 8 status values if you treat each bit as independent from the other). There is, however, certainly a trade-off wrt. status information vs. privacy, the more status information you publish about a particular entity, the more you can correlate the behaviour of that individual (or the population). So, while I agree with your complexity argument, a subset of implementers disagree and desire the feature. The best we can probably do is say that implementers do not need to implement the |
PR #65 added a backwards-compatible mechanism for binary status lists and multi-value status lists. During the discussion of the PR, there were multiple concerns raised around
ttl
, verification and validation and how the status list might affect those processes, the data formats utilized, the differences between binary and multiple bits per status. It was suggested that perhaps a re-alignment and unification of the design to support the use cases more generally would be useful. This issue tracks that design discussion.The text was updated successfully, but these errors were encountered: