lib: Serialize TeePubKey to EAR map#75
Conversation
|
The code look good to me. As it brings in a new dep, could you give a/some examples for how it is used? |
|
Essentially, it's useful for when a user wants to serialize a TEE pubkey within an EAR token. With this, they can do the following: And when a consumer receives the token, they can deserialize the EAR map's |
Xynnn007
left a comment
There was a problem hiding this comment.
@tylerfanelli Thanks for the example! I think it makes sense.
btw we are now embedding keys into submods than extension in AS. This pr provides a new design and we can think of it. cc @fitzthum
|
@Xynnn007 Sorry, realized I had to hide the dependency behind the |
Often, TeePubKeys are serialized to JSON format. The rust ear library provides equivalent types for representing data, including an EAR map. Allow for serialization of a TeePubKey to an EAR map and ensure that this map can be deserialized as a JSON object in return. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
fitzthum
left a comment
There was a problem hiding this comment.
LGTM
EAR has a Key Attestation extension in the appraisal, but it is for veraison (and will be serialized with veraison in the key). I'm not against adding something like this for CoCo to more easily identify the Tee Pubkey. That said the current approach does nicely capture the idea that the Tee Pubkey depends on the report data.
Either way this PR looks fine
I'm not sure if I'm in total agreement that the TEE pubkey needs to depend on report data. Report data is already (usually) included in the token's claims. The TEE pubkey is just something to encrypt secrets with to whoever presents the token. IMO there isn't much value in coupling them further. |
Often, TeePubKeys are serialized to JSON format. The rust ear library provides equivalent types for representing data, including an EAR map. Allow for serialization of a TeePubKey to an EAR map and ensure that this map can be deserialized as a JSON object in return.
@Xynnn007 this fixes the producer problem mentioned here.