-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
#128 seems to be an example of the flaw in current RepositorySimulator signing key & signature management:
- The design is optimized for minimal test code: this leads to signing metadata (apart from root) at request time
- The keys are created (in multiple places) with
CryptoSigner.generate_ecdsa()because ecdsa keys are fast to generate: this way each test simply generates whatever keys it needs
Unfortunately ecdsa signatures are not deterministic so the combination of these two features can easily lead to issues that are difficult to debug.
Obvious options to fix this include:
- start explicitly signing metadata -- I would still like to avoid this if possible
- switch to a deterministic signature by default
I think I lean to option 2, we should at least try this with another keytype:
- ed25519 is maybe not a great option, I'm not sure if every client has support for that. RSA is likely the right default
- the issue with RSA is the key generation time: in the long term we should not generate keys in every test
- as the initial implementation we can try generating keys in tests like now, if it's not horribly slow
- we could also include a list of ~20 hard coded keys in sources and have RepositorySimulator take keys from the list (keys are also generated in test_updater_key_rotations.py and test_keys.py: these should likely use the same source for key material)
Metadata
Metadata
Assignees
Labels
No labels