Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reimplement prober? #86

Closed
jku opened this issue Mar 28, 2024 · 4 comments
Closed

reimplement prober? #86

jku opened this issue Mar 28, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@jku
Copy link
Member

jku commented Mar 28, 2024

sigstore-probers has some workflows that test the tuf repository validity (now and some days into the future). These use:
https://github.com/sigstore/root-signing/blob/main/cmd/verify/app/repository.go

Let's take a good look at whether we can re-implement that, maybe as part of tuf-on-ci test-repository action.

  • the idea of "alert if metadata is invalid x days from now" seems universal and is likely not much additional code
  • if we can remove 500 lines of code from root-signing that would be good

There is a bit of complexity here:

  • deduplication should be doable by as action output
  • there have been weird issues with the prober getting stale data like https://github.com/sigstore/public-good-instance/pull/1683 -- This has been worked around by manual cache invalidation but I'm not convinced there isn't still a configuration issue somewhere
@jku jku added the enhancement New feature or request label Mar 28, 2024
@jku
Copy link
Member Author

jku commented Mar 29, 2024

The prober workflow does four passes:

  1. verify that preprod repo is valid two days from now, contains correct artifacts
  2. verify that prod repo is valid two days from now, contains correct artifacts
  3. verify that root and targets are valid in preprod repo 15 days from now
  4. verify that root and targets are valid in prod repo 15 days from now

On preprod vs prod:

On the two different validation cases:

  • The basic "is repository valid in two days?" is trivial
  • the other case "are root and targets still valid in 15 day" is interesting (and makes sense)
  • the repository-test action could just have simple inputs (won't work for delegated targets but I think that's fine)
    • time: reference time to run the client test at (optional, default is now)
    • root_time: optional. If set verify that root metadata is valid at this time (even if online roles are not)
    • targets_time: optional. If set verify that root metadata is valid at this time (even if online roles are not)
  • repository-test action could have a dedup-key output: identitifer that uniquely identifies the repository contents

@haydentherapper
Copy link
Contributor

This approach sounds good. You could also consider unifying root_time and targets_time into offline_signing_time or something similar, as the motivation behind the 15 day alert is to give maintainers enough time to gather all of the signatures from the keyholders.

@jku
Copy link
Member Author

jku commented Apr 1, 2024

I have an almost complete repository-test action PR in theupdateframework/tuf-on-ci#239

Likely the only thing missing is the selection of initial root: currently it uses 1.root.json from the repo-under-test: for rootsigning production we likely want a bit more control (since I believe the early roots are not compatible with python-tuf)

We should be able to switch probers to repository-test even before root-signing uses tuf-on-ci.

@jku jku self-assigned this Apr 17, 2024
@jku
Copy link
Member Author

jku commented Apr 22, 2024

This is done and is running in probers, seems to work pretty well

@jku jku closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants