Skip to content

Conversation

galmasi
Copy link

@galmasi galmasi commented Dec 30, 2022

From the code this PR is replacing:

TODO: to ask: where do we store/get allowed measures? Is the format ok?

  • The allowed measures are from the measured boot refstate, which is a JSON file, and is represented as a dictionary within keylime.
  • It seems to make sense to attach launch measurement checks to measured boot refstates in keylime, since the launch measurement largely overlaps the measured boot information (launch measurement: an amalgamated hash of the guest kernel, guest firmware, guest SVSM ...; measured boot policy: guest firmware, guest kernel, guest grub, guest shim, guest initramfs ...)
  • Moreover, since the attestation report (and the launch measurements) are verified during the keylime initial quote, and the measured boot policy is available at this time (having been provided with the keylime tenant add command)
  • The current measured boot policy has a flexible format, but I propose we use this:
{
   "hostosboot": [ ... list of allowed kernels and initramfs measurements ... ]   <---- current
   "firmware": [ ... list of firmware measurements ...]  <---- current
   "launch_measurements": [ ... list of measurements allowed ... ] <------- PROPOSED
}

E.g. this is the current value while testing on sl-milan01:

{
  "hostosboots": [
    {
      "tag": "hibinst",
      "shim_authcode_sha256": "0xdbffd70a2c43fd2c1931f18b8f8c08c5181db15f996f747dfed34def52fad036",
      "grub_authcode_sha256": "0xacc00aad4b0413a8b349b4493f95830da6a7a44bd6fc1579f6f53c339c26cb05",
      "kernel_authcode_sha256": "0x424771d6a01447e855a9b1666e5e28279ff49746c1b41614366ce84aeb05abd0",
      "kernel_plain_sha256": "0xd51bdbeb18b0f82a59e6b8fb9eace3e261bd137b2eb23135ec8f55b27f188e00",
      "initrd_plain_sha256": "0x059cc37868d832147d9e5083cad4bf5d060da248478cc2bf6d29e2cf464d6fed"
    }
  ],
  "launch_measurements": [
      "0x12d75089a57e6092c34f1efc8043ee878523836c97c004791de6ca63248671a8737364ebb404014a9b23f3b77275ed7b"
  ]
}

ruocco and others added 3 commits December 9, 2022 15:36
Signed-off-by: Angelo Ruocco <ang@zurich.ibm.com>
Signed-off-by: George Almasi <gheorghe@us.ibm.com>
Signed-off-by: George Almasi <gheorghe@us.ibm.com>
@ruocco
Copy link
Collaborator

ruocco commented Jan 2, 2023

Looks good. Can you also delete the now pointless measurement_allowed function in keylime/tpm/amd_vtpm.py?

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