w3c-ccg / traceability-interop

Verifiable Credentials for Supply Chain Interoperability Specification for HTTP

Home Page:https://w3id.org/traceability/interoperability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Discussion] Should the created field be removed as an option when creating a credential?

PatStLouis opened this issue · comments

I'm curious as to why we would want to provide a proof creation timestamp instead of generating it at issuance time. One of the conformance positive tests expects an issued VC to have a creation date of "2006-01-02T15:04:05Z" which seems wrong to me.

In a scenario where a VC would have multiple proofs, wouldn't it be valuable to see in which order the proofs were created instead of an arbitrary value?

issuanceDate / validityDate is different since this represents an arbitrary value at which the credential becomes valid. Proof creation should represent the timestamp when the proof was created.

Any thoughts on this matter?

@brownoxford please review/respond to this, and bring it up on next call to review if it should be included in the new v1 cut.

@PatStLouis The options.created member of the request body sent when creating a verifiable credential specifies (as you said) the date and time the signature was created. The vc-api specifies this to be an optional value, which is where I believe we based our implementation from.

Since it is optional, our tests need to account for it possibly being provided, so the test you mention just ensures that the value used in the resulting credential matches what was given.

In other tests, we just do a sort of fuzzy check to make sure that the date in the credential is close to now, indicating that the value was stored at the time the proof was generated.

If we decide to change the data model to remove the created option, we would also remove the test in question.

This testing was added in #352 , after discussion on #351 ultimately led us to keep the optional options.created field.

@brownoxford thank you for the clarification and input, I'm happy with the answer provided and will close this issue