cnabio / cnab-go

A Go implementation of CNAB Core 1.0
MIT License
69 stars 37 forks source link

Add timestamps to CredentialSet #173

Closed carolynvs closed 4 years ago

carolynvs commented 4 years ago

This allows tools to display when a credential set was created/modified without relying upon file timestamps which aren't available when credentials are stored in the generic crud datastore.

Since we have this data on Claim, it makes sense to have it on other data that we generally store in the host environment too.

Part of #172

Signed-off-by: Carolyn Van Slyck carolyn.vanslyck@microsoft.com

radu-matei commented 4 years ago

Would timestamps for both claims and credential sets make sense as part of the spec?

carolynvs commented 4 years ago

Credential Sets are non-normative. I'll submit a PR for credential sets adding the timestamps to the examples so they match what a marshaled struct from cnab-go looks like.

Claims are going to be redone in the next week or so to move state and the last result (which includes timestamp) out of the claim. Modified is already part of the spec, but not created. I'll keep an eye out for that and see that its suggested.

carolynvs commented 4 years ago

I went to tweak duffle to set these timestamps experimentally and realized that duffle doesn't build against cnab-go anymore. I'll submit a PR in a bit to update to the latest release of cnab-go and switch to go mods.

carolynvs commented 4 years ago

I've opened a PR to add timestamps to the credential set spec

https://github.com/cnabio/cnab-spec/pull/318