|
| 1 | +# Onboarding Workflow |
| 2 | + |
| 3 | +## Required Components |
| 4 | + |
| 5 | +1. [OTA Component](/components/ota-service) running on the device |
| 6 | +2. [Akri Component](/components/esp32-akri) running on the device |
| 7 | +3. [DICE Attestation Server](/components/attestation-server) to authenticate the device credentials |
| 8 | +4. [Discovery Handler](/components/akri-dh/) to discover the device and onboard it after its verification by the Attestation Server |
| 9 | + |
| 10 | +## Steps followed |
| 11 | + |
| 12 | +1. Start the [Attestation Server](/components/attestation-server) and [submit](/tutorials/dice-auth/#submit) the UDS of the device about to update |
| 13 | +2. The flashed ESP32 device must be equipped with the [OTA Component](/components/ota-service) and [Akri Component](/components/esp32-akri) |
| 14 | +3. The [Discovery Handler](/components/akri-dh/) periodically sends requests on an IP address range, reaching out the devices belonging on it |
| 15 | +4. [Device](/components/ota-service) will then be triggered on `/onboard` with a GET request to transmit its certificate |
| 16 | +5. The Discovery Handler (after converting it from DER to PEM format) will send it to the Attestation Server |
| 17 | +6. The Attestation Server will verify the given certificate against the available Roots stored on the Redis Database |
| 18 | +7. The Attestation Server will respond with `200 OK` on success, or another HTTP error code on failure |
| 19 | +8. On success, the Discovery handler will successfully onboard the device |
| 20 | +9. On failure, the device won't be onboarded |
| 21 | + |
| 22 | +{width="1600"} |
| 23 | + |
| 24 | +## Authentication |
| 25 | + |
| 26 | +Attestation is validated using the DICE chain-of-trust, based on [Google's Open-DICE](https://github.com/google/open-dice). We use DICE certificates to verify the devices of our fleet. More information about our authentication model can be found [here](/components/attestation-server/#dice). |
| 27 | + |
| 28 | +## Onboarding devices in Akri |
| 29 | + |
| 30 | +The Akri project uses Discovery Handlers to abstract the discovery logic from |
| 31 | +the Agent, thus allowing developers to provide new functionality without |
| 32 | +modifying any Akri core component. This design choice allows intervention |
| 33 | +in the discovery process by implementing a custom [Discovery Handler](/components/akri-dh/) |
| 34 | +that verifies any discovered devices before returning them to the Agent. |
| 35 | + |
| 36 | +More specifically, the Discovery Handler will first verify that a |
| 37 | +device is indeed present at a given IP and that it matches the desired application |
| 38 | +type. Afterwards, it will request the device to send its certificate and |
| 39 | +will forward said certificate to the Attestation Server to ensure the device |
| 40 | +is trusted. |
| 41 | + |
| 42 | +If this process is successful—and only then—will the device be onboarded |
| 43 | +into the Akri installation and the Kubernetes cluster, allowing users to interact |
| 44 | +with it via Broker pods or any other method. |
| 45 | + |
| 46 | +{width="1600"} |
0 commit comments