open-horizon / edge-sync-service

Cloud - Edge synchronization service (MMS)
Apache License 2.0
24 stars 26 forks source link

Add data verification in Sync Service SPIs #63

Closed LiilyZhang closed 3 years ago

LiilyZhang commented 3 years ago
  1. ESS polls CSS (ESS calls /spi/v1/objects, only applied to the object with data): After ESS polls all data, verify the data. If data is not successfully verified, change destination status to error with messages

  2. ESS creates object and sends to CSS: When "create/update an object" ESS API is called, it should do:

    • generate a pair of private/public key
    • use the private key to sign the data, so that a data signature is generated
    • set public key and signature in metadata
    • call CSS SPI PUT /spi/v1/objects to save metadata in CSS DB
    • call CSS SPI PUT /spi/v1/objects/..../data to upload data. Then CSS backend function handlePutData() needs to get the metadata from CSS DB and verify the data