-
Notifications
You must be signed in to change notification settings - Fork 63
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
Feature request: Add ability to set "exp" and "nbf" for JWT formatted verifiable presentations #387
Comments
Somewhat related: The default for LinkedDataProofOptions includes setting the |
Some additional changes may be needed for JSON-LD Verifiable Presentations. The Credentials base JSON-LD context defines the relevant terms only in the scope of the I don't see the VC Data Model saying a lot about the mapping of date properties to/from JWT. There is a (non-normative) example of a VP-JWT using There are changes going into VC Data Model 1.1 that seem to broaden or generalize the VC JWT parameters for use with VPs: https://github.com/w3c/vc-data-model/pull/828/files#diff-0eb547304658805aad788d320f10bf1f292797b5e6d745a3bf617584da017051L3603-R3667. I think those changes imply that the mapping for There's also discussion about the meaning and mapping of the date claims/parameters, e.g. here: w3c/vc-data-model#844 Even though VC Data Model discusses issuanceDate and expirationDate as properties of a credential, I think the open-world idea means that as a term it can be used in other places as well. According to this vocabulary document, however, the domain of the
Yes, |
Thanks for the detailed answer. I had no idea how involved the issue was ;) For now, I'm just doing basic DIDAuth, and ideally the VP would have a short validity duration. Would it be appropriate to use a VC for DIDAuth? I'm having trouble finding any definitive documentation from W3C (or anyone) detailing DIDAuth. |
VC for DIDAuth could probably work, i.e. self-issue a VC and present that, or pass the VC directly. But I think VPs are more expected to be used for authentication rather than VCs. And VCs are supposed to be exchanged wrapped in a (verifiable) presentation. Although a VP with embedded VC could accomplish the same authentication as a VP without embedded VC, if you don't actually need to present a verifiable credential then the VC can be omitted and you don't have to generate a "dummy" VC. DIF's implementation https://github.com/decentralized-identity/did-jwt-vc/ supports VP issuance/expiration dates, i.e. the following:
Besides |
Verifiable Credential (
ssi::vc::Credential
) hasexpiration_date
andnot_before
fields which map onto theexp
andnbf
claims of a JWT, but Verifiable Presentation (ssi::vc::Presentation
) is missing those, so it's not possible to properly time-limit a VP.Would adding this capability be as simple as copying those fields from
ssi::vc::Credential
intossi::vc::Presentation
and hooking up appropriate plumbing? Or is there an active reason it's missing? If it's the former, I'd be happy to take a crack at it.The text was updated successfully, but these errors were encountered: