Skip to content

Conversation

@shjala
Copy link
Member

@shjala shjala commented Jan 7, 2026

This PR corrects the recent additions to the attest.proto, specifically :

  1. Versioning the encryption schema for the volume key should go into AttestVolumeKeyData, not AttestVolumeKey, commercial controller implementation is expected to to store marshalled AttestVolumeKeyData as binary, this allows us to change the volume key format without any change in the controller implementation.
  2. For the same reason as No. 1, the PCR index list must be added to the AttestVolumeKey, not AttestVolumeKeyData, as it is expected that EVE receives this information from controller.

The logic for neither of these changes were part of any official EVE or commercial controller release, so the change is expected to be harmless 🤞🏼.

@shjala shjala requested a review from eriknordmark as a code owner January 7, 2026 15:32
@shjala shjala force-pushed the version.key.encryption.correction branch from 7c58298 to b6d1c1d Compare January 7, 2026 15:35
@shjala
Copy link
Member Author

shjala commented Jan 7, 2026

@eriknordmark The yetus complaints are expected, appreciate if you double check my understanding of the AttestVolumeKeyData vs AttestVolumeKey .

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, we can ignore the bufcompat warnings since this API hasn't be used yet.
It would be good to eye-ball the diffs against the older version which is in use.

// which PCRs to use, for example excluding PCRs that are volatile in nature
// like PCR 1 (Host Platform Configuration). If not present, default PCRs
// as per EVE design will be used.
bool has_policy_pcr_list = 3; //whether policy_pcr_list is present
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here a reserved = 3;
would also make sense.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This struct is stored as binary in cloud db, we are free to make changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still prefer the hygene to keep the tags reserved in cases like this,

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please review again.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mark the removed tags using reserved = X

@shjala shjala force-pushed the version.key.encryption.correction branch from b6d1c1d to 3f49a17 Compare January 13, 2026 09:11
@shjala shjala force-pushed the version.key.encryption.correction branch 2 times, most recently from d97d1e9 to 3890539 Compare January 15, 2026 11:30
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but it would make sense to squash this into two commits (one for the proto files and one for the derived files)

- Partially revert "attest: add versioning support to AttestVolumeKey",
commit 8fe5236.

- Partially revert "proto: Add PCR policy list to AttestVolumeKeyData",
commit 5ac5235.

- Add AttestPolicyPcrList message to specify which PCR indices are
included in a TPM policy, along with a policy ID for versioning.

- Extend AttestVolumeKey with policy_pcr_list and has_policy_pcr_list
field to associate encrypted volume keys with their corresponding
PCR-based policies. This enables EVE to use dynamic PCR policies
for volume key management.

- Add AttestVolumeKeyVersion enum to support multiple encryption formats
for volume storage keys. The version field in AttestVolumeKeyData message
provides backwards compatibility with legacy format (version 0) and
enables new formats (V1 uses AES-GCM).

- Correct field numbering in AttestVolumeKey and AttestVolumeKeyData
for backward compatibility.

Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
Add generate golang and python code for the changes.

Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
@shjala shjala force-pushed the version.key.encryption.correction branch from 3890539 to d294a68 Compare January 16, 2026 13:18
@shjala shjala requested a review from eriknordmark January 16, 2026 13:18
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eriknordmark eriknordmark merged commit bac92fb into lf-edge:main Jan 16, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants