Closed msporny closed 1 year ago
As described in issued #918, I believe this would move us in the wrong direction - towards unnecessary and useless complexity.
I would be ok with the following two options:
Option 1: keep a property in the VC data model that represents the time of issuance and expiration:
issuanceDate
since the semantical definition is a bit misleading.expirationDate
since it is less controversial and it maps onto exp
JWT claim.issued
that is semantically the same as the iat
JWT claim.validFrom
that is semantically the same as nbf
JWT claim.Option 2: move issuance and expiration dates to Data Integrity and VC-JWT specs
issuanceDate
expirationDate
iat
and nbf
and exp
in VC-JWT speccreated
in Data Integrity spec (already commonly used)expirationDate
in Data Integrity spec (to my knowledge this is not always used)I prefer Option 1 since I see both expiration and issuance part of the core VC Data Model. From an implementers perspective, it would be also easier since it is a common use case to understand when a VC was issued and when it does expire and it should work across proof formats.
Option 1:
VC vc1 = fromJwt(jwt); // JWT proof
VC vc2 = fromJsonLd(jsonld); // Data Integrity proof
process(vc1);
process(vc2);
function process(VC vc) {
if (v.issued < Date.now())
console.log("error");
}
Option 2:
VC vc1 = fromJwt(jwt);
VC vc2 = fromJsonLd(jsonld);
process(vc1);
process(vc2);
function process(VC vc) {
if (vc.jwt && vc.jwt.iat < Date.now().getTime())
console.log("error");
if (vc.proof && Date(vc.proof.created) < Date.now())
console.log("error");
}
Option 2 just makes it harder to compare issuance and expiration time across proof formats.
There is also a consideration that relates to BBS+ and derived proofs. To my knowledge, the derived proof would be generated by the holder at the time of presentation. IMO, including expiration and issuance only in the derived proof would lead to some semantic confusion but I'm not an expert in BBS+. It would be great if @tplooker could comment on that.
If this is the case, then one more reason for Option 1 I proposed.
As described in issued https://github.com/w3c/vc-data-model/issues/918
@selfissued, why create another issue (#918) for one side of the discussion already framed to be held here (#913)? I'm going to keep my responses here, and I strongly suggest that #918 be closed as a duplicate of #913.
towards unnecessary and useless complexity
@selfissued, you have a pattern of speaking of anything you dislike or do not need as if it is utterly worthless and without any redemptive value, and as if anyone who is in favor of such features are clearly idiots. Please moderate your tone in future.
The fact that this ability is not part of your particular use case(s) does not render it either "esoteric" or "useless".
Some use cases we discussed in arriving at the stated plan for VC DM 2.0 (i.e., converting validity periods to be stated in validFrom
and validUntil
properties; while converting the issuanceDate
[which really should be issuanceDatetime
] to be when the VC was created/issued/signed, for which its lexical value clearly indicates it was originally intended) included event tickets (might only be valid on the date of the event, though issued/sold weeks or months before — or even only for a few hours on that date) and merchandise coupons (similarly, might only be valid for a specific window of dates, though issued months or even years before, depending on the promotion), among others.
Please provide at least one clear example of how the above and similar use cases would be satisfied following your proposed elimination of the distinction between validFrom
and issuanceDate
.
Please also demonstrate how simplicity is served by blocking the clear lexical and semantic bookends of validFrom
and validUntil
in favor of the lexically and semantically imbalanced issuanceDate
and expirationDate
.
What we need semanically is the cryptographic validity time of the VC, which is independent from the validity time of the underlying credential (claims). So 4 date/times are potentially needed. e.g. a degree claim is valid from the graduation date and does not expire. A UK driving license is valid from when the driver passes their driving test until the driver's age of 65. Multiple VCs with shorter cryptographic validity times could be issued during the claim lifetimes of both of these. What we currently have is a bit of a mess. We should define these 4 date/times and only make the 2 cryptographic ones mandatory, with the 2 claim ones being optional. The names of these 4 date/times is less important than clear semantic definitions of them.
@TallTed thanks for explaining the future-dated coupon use case. That motivates why issuanceDate and validFrom would sometimes be different. I can't see it motivating why expirationDate and validUntil would ever need to be different, however.
You wrote:
@selfissued, you have a pattern of speaking of anything you dislike or do not need as if it is utterly worthless and without any redemptive value, and as if anyone who is in favor of such features are clearly idiots.
Please accept my apology if my remarks came off that way. That wasn't my intent.
My intent was to advocate for "keeping simple things simple". It's virtually certain that the dominant pattern will be VCs that are valid when issued and invalid upon expiration. Yes, future- or past-dating may need to be possible. But I'd do that by making validFrom/nbf optional and only including them when different from issuanceDate/iat. That favors the common case, rather than expressing everything with the full generality of what I believe will be the unusual case.
[@selfissued] Please accept my apology if my remarks came off that way. That wasn't my intent.
Thank you. As a concrete suggestion for the future, "I can't see the use" constructs (as you used here) come across very differently from "that's useless", and invite presentation of such use case rather than asserting it doesn't exist.
I'd do that by making
validFrom
/nbf
optional and only including them when different fromissuanceDate
/iat
.
I think someone had a reason that this optionality would be problematic, but I cannot immediately recall what that reason was. Hopefully they will notice this thread and speak up again. I'll also try to dig up the relevant past thread(s), as I don't think silence here should be taken as an indication that such reason was nonexistent.
I will also try to dig up the thread(s) and/or use case(s) that had differing expirationDate
and validUntil
.
I invite comment from anyone reading this who has ready access to the thread(s) and/or use case(s) I'll be searching for!
For context, https://github.com/w3c/vc-jwt/issues/9 (Represent issuance time with "iat" rather than "nbf") is related.
Please correct me if I was wrong, but it seems nobody is arguing for removing any of these dates from the VC Core Data Model entirely and only representing them in the proof-format specific serialisation, e.g., data integrity proof property, JWT claims, right? @msporny @selfissued @TallTed
If this is the case, I'd propose the following:
issuanceDate
since the current (v1.1) definition is semantically misleading.expirationDate
since there are no issues with the semantic definition in the spec.issued
that is semantically the same as the iat
JWT claim.validFrom
that is semantically the same as nbf
JWT claim.iat
for VC-JWT, created
for data integrity proofs.Since issuanceDate
was a REQUIRED property, we should keep in mind, that this proposal is a breaking change.
I personally don't understand why renaming expirationDate
into validUntil
is needed, since the definition seems to be fine and deprecation would introduce another breaking change.
Any thoughts?
deprecate
issuanceDate
since the current (v1.1) definition is semantically misleading. add REQUIREDissued
that is semantically the same as theiat
JWT claim.
I'd prefer fixing the misleading definition than changing which claim name people use to represent when the VC was issued. Then it wouldn't be a breaking change.
add OPTIONAL
validFrom
that is semantically the same asnbf
JWT claim.
I'm find adding this as long as it's optional. If not present, we would define that the VC is valid starting when it was issued.
I personally don't understand why renaming
expirationDate
intovalidUntil
is needed, since the definition seems to be fine and deprecation would introduce another breaking change.
I agree that I don't understand this. I'd prefer leaving expirationDate
as is.
Here's a case that might be worth considering in this discussion. We all have passports, with two dates, one of which is related to the point in time where it was issued, and the other is related to a point in time several years in the future. To avoid getting dragged into the discussion in ways I do not want to, let me call them T1 and T2 respectively.
When a non TNO-employee wants to enter one of the TNO buildings, she must show her passport, and one of the conditions that must be satisfied for her to enter is that T2 + 5 years
is a future date. In other words: the passport may have expired, but for no more than 5 years.
When I went to China a few years ago, one of the conditions that had to be satisfied for successfully obtaining a tourist visa was that T2 - 6 months + date-of-entry
is a future date. In other words: my passport had to be valid 6 months after I would enter China.
This clearly illustrates that regardless of what the passport issuer thinks about passport validity, it is the relying party that ultimately decides whether it is or not.
Another part of this is the lack of definition regarding proof.created
... which is what actually maps to iat
.
The issue was discussed in a meeting on 2022-09-07
Based on the call on 2022-10-26:
RESOLVED: Rename issuanceDate in the VC Data Model to validFrom. RESOLVED: Rename expirationDate in the VC Data Model to validUntil.
The issue was discussed in a meeting on 2022-10-26
List of resolutions:
PR #992 has been raised to address this issue. This issue will be closed once that PR is merged.
PR #992 has been merged, closing.
We had added a warning to the VCDM spec that we were eventually going to deprecate
issuanceDate/expirationDate
and replace it withvalidFrom/validUntil
.https://www.w3.org/TR/vc-data-model/#issue-container-generatedID-13 https://www.w3.org/TR/vc-data-model/#issue-container-generatedID-15
The "date the credential was issued" is represented by the
created
property on the proof if using aDataIntegrityProof
andiat
if used in a JWT. The "validity period" for a VC used to be fromissuanceDate
toexpirationDate
, but then some reviewers confused those terms for "the date the credential was issued", so the group came to consensus on renaming these properties tovalidFrom
andvalidUntil
to make it more clear what was going on -- as well as moving away from the "Date" language since the value range was a date-time.There was an attempt at applying this change in the v2 context, but there were objections to the deprecation of
issuanceDate
andexpirationDate
.The purpose of this issue is to determine if we are going to deprecate
issuanceDate/expirationDate
and rename tovalidFrom/validUntil
or if we are going to do something else.