dennisvang / tufup

Automated updates for stand-alone Python applications.
MIT License
71 stars 1 forks source link

How does signing actually work? #94

Closed Eoic closed 6 months ago

Eoic commented 6 months ago

I don't understand this part at all. I read Roles and metadata section in TUF website but I still don't understand the process. When / what / how should I sign metadata files?

This is what I do:

  1. Initialize the repository.
  2. Build application with pyinstaller (root.json is also included with the application).
  3. Add bundle to TUF repository.
  4. Start HTTP server to serve repository files.
  5. I change something in the application, update version and build it again.
  6. I add bundle to TUF repository and it creates a patch file.
  7. I start the application built in step 1. I use tufup Client to check for updates on start-up. It does not find any and outputs an error message, for example, "Cannot refresh metadata: root was signed by 0/1 keys". Sometimes it's "timestamp" instead of "root". I tried signing root, targets, timestamp with command tufup sign -e 365 root <path to keystore>. I have no idea when signing should happen and what should I sign.