-
Notifications
You must be signed in to change notification settings - Fork 6
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
Validity timestamp truncation #21
Comments
Let me investigate this further, given that we are using an external library for cbor encoding. |
I figured it might have been related to the custom extension logic here for dates: https://github.com/auth0-lab/mdl/blob/main/src/cbor/index.ts#L15-L25 |
Let me explain why we are using that CBOR tag for Dates... ISO 18013-5 (section 7.2.1) defines the following data elements for mDL:
And it specifies "full-date" as
|
I guess we could include an option to use the |
Now, for
We have to fix that. |
🎉 This issue has been resolved in version 1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
As a caller to the library I can
addValidityInfo
that includes specific timestamps. It appears during encoding these timestamps are truncated. Whilst one could interpret this truncation as broadly in alignment with the standard's guidance around linkability (see second-last paragraph on page 51 of ISO/IEC 18013-5:2021(E)), should that truncation really be done when the caller's input is specifying their own values?I admit it is a limited window where this is problematic, but in the current implementation, I can:
My thought on a fix might be two-fold:
addValidityInfo
, then no truncation should occur.addValidityInfo
. Whatever timestamps are present (either auto-generated or caller-specified) are validated against the certificate timestamps to ensure an invalid mdoc isn't produced.The text was updated successfully, but these errors were encountered: