Closed jku closed 1 year ago
Still thinking about the cleanest implementation here. There are three possible sources of keys:
The interesting thing is that
Case 1 would merge to case 2 if we did not do automated signing in close and instead required explicit signing. This seems to make more and more sense
I have rewritten this PR:
RepositorySigner.close()
, just keep track of whether we need to sign or notThis still requires keeping track of the different key sets but has some nice side effects:
I've filed a new issue for the extra test
An alternative to tracking the "unsigned" state while doing the metadata modifications would be to not do that and instead run _user_signature_needed()
just before signing... this would likely be the simplest result but I think I'll leave that for future refactoring (since that means SignerRepository state tracking changes)
root is a special case since the signing keys are stored in root itself: we should be using both new and old keys in that case
The final PR ended up changing the signing and closing:
SignerRepository.close()
they are no longer signed even if keys are availableunsigned
listunsigned
roles are explicitly signedComment below lists some advantages of this.
Fixes #103
Issues:
playground-sign
to sign a change where your key has been removed from root, it probably won't notice you should sign:_user_signature_needed()
should handle the special case of root (and check keys from the known good version as well): #107