Mechanism to report progress
Proposal with JWT
Sequence Diagram

This code can be used in sequencediagram.org
title Bifrost Conversion Authentication
Bifrost Portal->Azure Function: Convert this (Migration GUID)
Azure Function->Azure Function: Convert(Migration GUID)
Azure Function->Azure Function: Report Progress(Migration GUID)
Azure Function->Azure Key Vault: Request Secret for Progress Update(Migration GUID)
Azure Function<-Azure Key Vault: <secret>
note over Bifrost Portal, Azure Key Vault: During the conversion, multiple progress updates will be sent from the Azure Function to the Biforst Portal (using JWT)
loop Send progress update
Azure Function-->Bifrost Portal: Progress Update(Migration GUID) [uses JWT signed with secret]
Bifrost Portal->Azure Key Vault: Request Secret for Progress Update
Bifrost Portal<-Azure Key Vault: <secret>
Bifrost Portal->Bifrost Portal: Validate JWT
Bifrost Portal->Bifrost Portal: Update progress
endSteps
The Bifrost Portal requests a new migration. The Migration GUID and the zipped code are sent to the Azure Function.
The Azure Function starts processing the request
During the conversion, the Azure Function will start reporting progress update
For every progress update:
The Azure Function will request the secret from the Key Vault
The Azure Function will use the secret to prepare and sign a JWT, with the necessary data (Migration GUID and Progress Descriptor Status, which is an object holding information about the status).
The Azure Function will POST the signed JWT to the endpoint provided by the Bifrost Portal to receive progress updates
The Bifrost Portal can request the secret to verify the authenticity of the JWT, and validate that the claims have not been modified by a malicious third-party
If the JWT is valid, then both claims can be used (Migration GUID and Progress Descriptor Status) to update the progress in the UI.
Resources
Last updated