Skip to content
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

[ownership] Add node-locked owner configs #24745

Open
wants to merge 3 commits into
base: earlgrey_es_sival
Choose a base branch
from

Conversation

cfrantz
Copy link
Contributor

@cfrantz cfrantz commented Oct 7, 2024

Allow the owenrship block to specify that it is locked to a specific device ID.

  1. Add lock_constraints and device_id fields to the owner config.
  2. Use the device_id from the lifecycle controller in the cryptographic verification of the owner config.
  3. Add tests to verify node locking.

Addresses: #24657

@cfrantz cfrantz requested review from a team as code owners October 7, 2024 23:28
@cfrantz cfrantz removed request for a team October 8, 2024 14:00
@cfrantz
Copy link
Contributor Author

cfrantz commented Oct 9, 2024

Note: I rewrote this to provide a usage_constraints-like lock on the entire device_id rather than just the lock on the device identification number.

This PR now depends on #24760.

1. Add a version field to the TLV header structure.
2. Re-arrange fields in the owner block to compensate for the removal of
   the `struct_version` field.
3. Set the initial version of all structs to version 0.0.
4. Update opentitantool to match the updated owner config structure.
   The version number is printed in `--debug` mode.  When writing the
   binary representation, the version number written is the version
   supported by the tool (e.g. version 0.0), _not_ the version number
   present in the input file.
5. Add version checking and unique errors for each tag in the firmware
   TLV parser.
6. Add tests for invalid struct versions.

Signed-off-by: Chris Frantz <cfrantz@google.com>
Refactor the activation code into a common function that can be used by
both the boot services activate handler and the same-owner `NewVersion`
update.

Signed-off-by: Chris Frantz <cfrantz@google.com>
Allow the owenrship block to specify that it is locked to a specific
device ID.

1. Add `lock_constraints` and `device_id` fields to the owner config.
2. Use the device_id from the lifecycle controller in the cryptographic
   verification of the owner config.
3. Add tests to verify node locking.

Signed-off-by: Chris Frantz <cfrantz@google.com>
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.

2 participants