aws / aws-nitro-enclaves-nsm-api

This provides a library for interacting with the Nitro Secure Module, which provides Nitro Enclaves with attestation capability.
Apache License 2.0
62 stars 43 forks source link

Replace serde deps with minicbor #38

Open emostov opened 1 year ago

emostov commented 1 year ago

Issue #, if available:

19

Description of changes:

serde_cbor is deprecated. This PR removes serde_cbor and it's associated dependencies, replacing them with minicbor, a library that is currently maintained. This has the added benefit of slimming down the dependency tree, reducing dependency review burden.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

emostov commented 1 year ago

@petreeftime any updates here?

petreeftime commented 1 year ago

Last time I tested this, it didn't work for me. I'll take another look.

emostov commented 1 year ago

Last time I tested this, it didn't work for me. I'll take another look.

@petreeftime can anything be done to move this forward?

petreeftime commented 1 year ago

I no longer work on this project, so I will not be able to help, but it seems that minicbor_derive only supports encoding and decoding with indexed fields, rather than fields which are named, as the NSM provides, so the unit tests might work since they self generate the data, but the answers from the NSM will not work. As such, serialization and deserialization needs to be done by hand and cannot work otherwise.

@meerd @shtaked

petreeftime commented 1 year ago

IMO, adding some unit tests with actual API responses from NSM would make it easy to discover such issues and prevent backwards incompatibility.