-
Notifications
You must be signed in to change notification settings - Fork 11
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
keyids for new keys are not spec compliant #292
Comments
Fixing the initial key creation in tuf-on-ci seems doable: make a wrapper for modifying the custom fields, have the wrapper also re-calculate the keyid There are a couple of issues though:
|
The alternative "solution" is to push for a spec change:
|
This is quite unfortunate, and as @jku points out, having a good set of conformance tests would have helped us here, as apparently almost no client is verifying the key ids so this bug didn't get surfaced. |
I'm probably partly to blame for that since I've been quite vocal about my distaste for the keyid calculation requirement... That said, if we had had a conformance test suite it would have pushed us to make the spec change or at least clearly document this (instead of just ignoring that bit of the spec). I filed the spec issue as well theupdateframework/specification#305 |
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).
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).
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).
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).
* 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. * 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 #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). * 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.
Recap:
|
The text was updated successfully, but these errors were encountered: