manatee-project / manatee

Apache License 2.0
15 stars 3 forks source link

[Refactor] Pass objects via signed URL instead of permanent service account permission #23

Open dayeol opened 2 weeks ago

dayeol commented 2 weeks ago

Issue

The objects are passed via cloud storage (e.g., S3 or GCS). This requires the uploader and downloader have an agreement on the URL. Also, both of them needs to be given some permanent permissions, making overall access control hard to manage.

Proposal

Instead, we could make it simpler by using signed URLs. For example, when a TEE instance finishes, it can upload its data to a gcs bucket, then sign the URL to the object and put it in the database. With this approach, the frontend doesn't need to know anything about the gcs directory structure. Also the permission control is already being handled by the API. There are a few places we would like to replace download/upload with signed URLs.

frontend uploading workspace tar file

frontend downloading output of execution

frontend getting attestation report

Same as job output, but as a different build-arg.

Benefit

This design is beneficial in many ways:

Changes Needed