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

Fix noncompliant keyids #338

Merged
merged 3 commits into from
May 27, 2024
Merged

Commits on May 17, 2024

  1. signer: add hidden flag to fix keyid issue in -delegate

    This modifies keyids in place: The key contents remain the same
    * Unfortunately keys get shuffled around since they are sorted by keyid
    * The result should be that same HW key will now sign the "new" keyids
    * for root, the HW key will sign for both new keyids and old keyid
      (so that both root N and N+1 will reach threshold)
    
    this command can be run on "root" and "targets" (and will fix all keyids
    defined in that roles metadata). New versions of the delegated roles
    will then be created to make sure they get signed with new keyids.
    jku committed May 17, 2024
    Configuration menu
    Copy the full SHA
    f32aa89 View commit details
    Browse the repository at this point in the history
  2. signer: Allow multiple signatures

    This makes it possible to sign the same metadata twice:
    * currently this is only useful when fixing the keyid compliance issue
      in root (see theupdateframework#292). Basically the user will be asked to sign with
      both the keyid from root N+1 and the keyid from root N.
    * there are clear use cases with one signer with multiple keys in
      future (think e.g. key rotation).
    jku committed May 17, 2024
    Configuration menu
    Copy the full SHA
    32ac6fa View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. signer: Also handle keyid fix during repo import

    Since the import adds custom metadata into existing keys,
    keyids become non-compliant. Run force_compliant_keyids() for
    imported roles too.
    
    This very annoyingly requires a special case in _sign(): basically
    a heuristic that figures that we want to sign with "previous version"
    root keys if the keyid of this legacy key can be calculated from
    "current version" root key by just removing the custom metadata.
    jku committed May 24, 2024
    Configuration menu
    Copy the full SHA
    5f3d3fa View commit details
    Browse the repository at this point in the history