Skip to content

fail reasonably on unsupported kindversions #1394

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

Open
jku opened this issue May 19, 2025 · 0 comments
Open

fail reasonably on unsupported kindversions #1394

jku opened this issue May 19, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jku
Copy link
Member

jku commented May 19, 2025

Currently if we encounter unexpected kindversions in the rekor log entry we fail when we parse the canonical body -- this looks ugly and hard to understand (see #1384 ).

The rekor v2 work both makes this more important to fix but maybe also easier to fix: After #1370 the situation is:

  • we always have a kindversion available in the LogEntry (private variable but still)
  • we can validate that we have something we will understand before we try to parse canonical body
  • this can happen in LogEntry._from_dict_rekor() (this would be in line with keeping kindversion an implementation detail) or it could happen in Bundle._verify() (this would be in line with us only parsing canonical body when we need it -- so a LogEntry with unrecognised kindversion would be fine but a Bundle requires a useful kindversion)
  • note that when we do this validation we strictly speaking do not know which rekor version generated the entry -- I dont think this an issue, just pointing it out
@jku jku added the enhancement New feature or request label May 19, 2025
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

1 participant