Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

During these extend operations, the extend operations are recorded by BIOS and Bootloader, in a special firmware table, called the TPM Eventlog table, and this table is handed over to the operating system during OS takeover. By playing the same sequence of extend operations recorded in a given TPM Event Log, one can check if the final PCR values match, and if so, then the Event Log(and hence the software layers) can be trusted. 

Measuring using PCRs, Verifying using TPM Event Log

Based on the above constructs, we present a solution to measure and attest software integrity of EVE node. Just for recap, EVE is the open-source software from LF-Edge for Edge Virtualization, running on IoT Edge gateways. EVC is the controller for managing these EVE instances.  Adam under LF-Edge is an open source implementation of one such EVC. The APIs between EVE and EVC are specified in EVE API specification.  In the context of remote attestation, the EVC is the attesting authority and EVE reports its measurements for attestation. 

...

Fig 1. Role of EVC as the Remote Attestation Server

Measured Boot vs Secure Boot 

Software Layers in EVE Booting Process

Introduction to fundamental constructs used

...

  1. Device-steps starts client.go (the provisioning client) which will check and do the following:
    1. First fetches EVC Certificates
    2. Registers the device certificate
    3. Retrieves UUID from EVC
  2. Device-steps starts Vault Mgr
    1. Vault Mgr creates new vault: /persist/vault
    2. Seals the master-key into TPM with PCR values
    3. Publishes vault status (unlocked)
    4. Waits for Integrity-Token from zedAgent
    5. Once received, copies the new Integrity-Token to /persist/vault/itoken file
  3. Device-steps starts TPM mgr
    1. TPM manger retrieves the attestation certificate and publishes to Zedagent
    2. Waits for Quote requests on pubsub channel from Zedagent
  4. Device-steps starts Zedagent (and Zedagent starts 3 concurrent tasks: attest, info and config)
  5. Attest task,
    1. picks up the attestation certificate and publishes to EVC
    2. Attest task requests for a nonce from EVC (to prepare PCR quote)
    3. Attest task sends the nonce back to TPM Mgr and waits for PCR quote
    4. Attest task, once Once notified about the quote readiness, creates a random nonce value for Integrity-Token
    5. Attest task sends Sends { Quote, Location, Event Log, Integrity-Token, Image Version } to EVC
  6. EVC, if master-key is not found for the EVE, approves the PCR quote as the baseline
    1. If Location-Lock is enabled, location is also approved as baseline (provided the EVE device is not in manufacturing account)
  7. In the mean time, configuration task keeps requesting config from EVC (expected to fail till attestation goes through)
  8. Attest task, once attestation request is approved, gets the master-key and Integrity-Token and passes it to Vault Mgr
  9. Config task now picks up the right Integrity-Token and Config request is now accepted by EVC, and full configuration is sent back
  10. Info task reports the encrypted master-key back to EVC, for backup purposes

Module Level Interaction - Startup Sequence (Reboot with no change) - No EVC connectivity required 

...

Image Added

Fig. Module Level Interaction in EVE - Startup Sequence (Post OnboardingReboot with no change; works without EVC connectivity)

  1. Device-steps starts client.go (the provisioning client) which will check and do the following:
    1. If EVC is not reachable, uses certificates from the last download
    2. If EVC are is not yet fetched,  fetches them Retrieves UUID from EVCreachable, uses UUID already present in /config/uuid
  2. Device-steps starts Vault Mgr
    1. Vault Mgr retrieves the master decryption key from TPM with Unseal operation. Unseal is successful since the PCR values are the same since last reboot.
    2. Unlocks /persist/vault with the master-key.
    3. Publishes vault status (unlocked)
    4. Waits for Integrity-Token and/or master-key from EVC. 
    5. Once received, rotates the master-key if requested, and also copies the new Integrity-Token to /persist/vault/itoken file
  3. Device-steps starts TPM mgr
    1. TPM manger retrieves the attestation certificate and publishes to Zedagent
    Device-steps starts TPM mgr
    1. TPM manger retrieves the attestation certificate and publishes to Zedagent
    2. Waits for Quote requests on pubsub channel from Zedagent
  4. Device-steps starts Zed Manager, Domain Mgr microservices - these services are responsible for launching the Edge App Instances
  5. Device-steps starts Zedagent (and Zedagent starts 3 concurrent tasks: attest, info and config)
    1. Attest task picks up the attestation certificate Configuration task, since EVC is not reachable, uses the configuration from the last download, and publishes to EVC
    2. Attest task requests for a nonce from EVC (to prepare PCR quote)
    3. Attest task sends the nonce back to TPM Mgr and waits for PCR quote
    4. Attest task, once notified about the quote readiness, creates a random nonce value for Integrity-Token
    5. Attest task sends { Quote, Location, Event Log, Integrity-Token, Image Version } to EVC
    6. EVC, if quote is the same as previous quote, approves the attestation request
      1. If Location-Lock is enabled, location is checked in addition to Quote
    7. Along with attestation approval, the encrypted master-key is sent back to EVE
    8. In the mean time, configuration task keeps requesting config from EVC (expected to fail till attestation goes through)
    9. Attest task, once attestation request is approved, gets the master-key and Integrity-Token and passes it to Vault Mgr
    10. Config task now picks up the right Integrity-Token and Config request is now accepted by EVC, and full configuration is sent back
    11. Info task reports the encrypted master-key back to EVC, for backup purposes

Module Level Interaction - EVE Startup Sequence (Reboot with a change)

Image Removed

Fig. Module Level Interaction in EVE - Startup Sequence (Running Unknown Software)

    1. Zed Mgr and Domain Mgr
    2. Since the Vault is unlocked, Domain Mgr can access Edge App Images, and hence launches the app instances.

Module Level Interaction - EVE Startup Sequence (Reboot with a change)

Image Added

Fig. Module Level Interaction in EVE - Startup Sequence (Reboot with differing PCR values)

  1. Device-steps starts client.go (the provisioning client) which will check and do the following:
    1. If certificates from EVC are not yet fetched,  fetches them 
    2. Retrieves UUID from EVC
  2. Device-steps starts Vault Mgr
    1. Vault Mgr tries to retrieve the master decryption key from TPM with Unseal operation, and Unseal operation fails since the PCR values have changed
    2. Publishes vault status (as "locked")
    3. Waits for Integrity-Token and/or master-key from EVC - it will block here forever
  3. Device-steps starts TPM mgr
    1. TPM manger retrieves the attestation certificate and publishes to Zedagent
    2. Waits for Quote requests on pubsub channel from Zedagent
  4. Device-steps starts Zedagent (and Zedagent starts 3 concurrent tasks: attest, info and config)
  5. Device-steps starts Edge App microservices - e.g. Domain Mgr 
    1. Attest task requests for a nonce from EVC (to prepare PCR quote)
    2. Attest task sends the nonce back to TPM Mgr and waits for PCR quote
    3. Attest task, once notified about the quote readiness, creates a random nonce value for Integrity-Token
    4. Attest task sends { Quote, Location, Event Log, Integrity-Token, Image Version } to EVC
    5. EVC, since the quote is different, tries to compare EventLog entries with its known hashes against the version reported. Since the PCR values are different, there will not be match, unless Admin has uploaded measurements for this new version. Assuming that Admin is yet to upload, attestation request will fail here.
  6. EVC sends an error back to EVE, to retry attestation.
  7. In the mean time, configuration task keeps requesting config from EVC (expected to fail till attestation goes through).
    1. EVC replies to configuration request with HTTP Error Code 403 - Forbidden. Indicates attestation failure (due to no or invalid Integrity Token)
    2. Config task communicates to Attest Task to re-trigger attestation
  8. Admin uploads measurements for the new image version
  9. The next attestation request is matched successfully against the uploaded measurements
  10. EVC approves the attestation request, and responds back with the master-key (encrypted with TPM key) for the EVE node, and also saves the Integrity-Token supplied in the attestation request
  11. Vault Mgr 
    1. picks up the master-key
    2. unlocks vault
    3. populates Integrity-Token approved by EVC inside /persist/vault/itoken
    4. Publishes new vault status (unlocked) to all the microservices
  12. The next configuration request picks up the new Integrity Token, and sends configuration request along with this Integrity-Token
  13. EVC verifies that Integrity-Token matches with its copy, and approves configuration request and responds with the latest configuration.
  14. Domain Mgr notices the new vault status (unlocked) from Vault Mgr , and latest configuration from ZedAgent, and starts the Edge Apps
  15. Info task reports the encrypted master-key back to EVC, for backup purposes
  16. Device-steps starts client.go (the provisioning client) which will check and do the following:
    1. If certificates from EVC are not yet fetched,  fetches them 
    2. Retrieves UUID from EVC
  17. Device-steps starts Vault Mgr
    1. Vault Mgr tries to retrieve the master decryption key from TPM with Unseal operation, and Unseal operation fails since the PCR values have changed
    2. Publishes vault status (as "locked")
    3. Waits for Integrity-Token and/or master-key from EVC - it will block here forever
  18. Device-steps starts TPM mgr
    1. TPM manger retrieves the attestation certificate and publishes to Zedagent
    2. Waits for Quote requests on pubsub channel from Zedagent
  19. Device-steps starts Zedagent (and Zedagent starts 3 concurrent tasks: attest, info and config)
  20. Attest task picks up the attestation certificate and publishes to EVC
  21. Attest task requests for a nonce from EVC (to prepare PCR quote)
  22. Attest task sends the nonce back to TPM Mgr and waits for PCR quote
  23. Attest task, once notified about the quote readiness, creates a random nonce value for Integrity-Token
  24. Attest task sends { Quote, Location, Event Log, Integrity-Token, Image Version } to EVC
  25. EVC, since the quote is different, tries to compare EventLog entries with its known hashes against the version reported. Since this is some arbitrary software, there will not be a match.
    1. Even if Location-Lock is enabled, location can not be trusted here, since the software reporting the location is not trusted.
  26. EVC sends an error back to EVE, to retry attestation.
  27. In the mean time, configuration task keeps requesting config from EVC (expected to fail till attestation goes through).
  28. EVC replies to configuration request with HTTP Error Code 403 - Forbidden. Indicates attestation failure (due to no or invalid Integrity Token)
  29. Config task communicates to Attest Task to re-trigger attestation

Securely Upgrading EVE Software

...

Fig 4.  Firmware Upgrade Management

Handling non-TPM devices

Optional Hybrid Model - Secure Boot & Measured Boot

User Interface Options