Uh oh!
There was an error while loading. Please reload this page.
Make new api compatible with the Signing interface - #1272
Conversation
lukpueh
left a comment
There was a problem hiding this comment.
Cool stuff, @MVrachev! I only noticed one thing (see inline comment), but we can revisit once secure-systems-lab/securesystemslib#319 has landed.
On a general note, I appreciate slightly more informative commit messages.
Uh oh!
There was an error while loading. Please reload this page.
MVrachev
commented
Feb 10, 2021
Sorry for the lack of a good commit message, you are right. I will update this pr when the securesystemslib signer interface is merged and I will add a better commit message before mark it |
3062307 to
19e08d0CompareI updated the pr addressing Lukas comment #1272 (comment), adding a new commit fixing one comment in the code, and making the commit message more descriptive. |
a5e64e1 to
ce655acCompareMVrachev
commented
Feb 26, 2021
Updated the pr after we have bumped securesystemslib version to 0.20.0 which supports the new Signer interface. |
joshuagl
commented
Mar 3, 2021
Thanks for this PR Martin, I'm hoping to give it a thorough review ASAP. One quick observation: we should bump the minimum version of securesystemslib in the |
Uh oh!
There was an error while loading. Please reload this page.
1856040 to
977f0d4CompareMVrachev
commented
Mar 5, 2021
I addressed your comments @joshuagl and fixed the conflicts. |
lukpueh
left a comment
There was a problem hiding this comment.
Except for two minor nits this is good to go.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
MVrachev
commented
Mar 9, 2021
I updated according to the last @lukpueh remarks. |
In the securesystemslib pr secure-systems-lab/securesystemslib#319 I added a new Signer interface with the purpose of supporting multiple signing implementations. Additionally, I added the SSlibSigner implementation of that interface which implements the signing operation for rsa, ed25519 and ecdsa schemes. With this commit, I integrate the SSlibSigner into the new API in tuf. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
lukpueh
left a comment
There was a problem hiding this comment.
Hey @MVrachev, I took the liberty to rebase your PR on top of #1279, fixing conflicts and making minimal changes. See comments inline...
To get a full diff between your old diff and my new rebased diff you can do:
git range-diff develop 3050fb6 49aa0fc
I think we can merge. But maybe should consult with a 3rd-party, now that we are both authors? (ping @joshuagl, @jku, @sechkova)
| from securesystemslib.keys import verify_signature | ||
| from securesystemslib.util import persist_temp_file | ||
| from securesystemslib.signer import Signer, Signature |
| # metadata['signatures'], call Signature.from_dict for each item, and | ||
| # pass a list of Signature objects to the Metadata constructor instead. | ||
| signatures = [] | ||
| for signature in metadata.pop('signatures'): |
There was a problem hiding this comment.
Now popping the signatures list for consistently destructing the passed dictionary as described in the newly added "Side Effect" docstring section.
| Arguments: | ||
| key: A securesystemslib-style private key object used for signing. | ||
| signer: An object implementing the securesystemslib.signer.Signer |
There was a problem hiding this comment.
Did s/singer/signer to fix a typo I had missed in my review.
MVrachev
commented
Mar 10, 2021
I agree with your changes @lukpueh. |
lukpueh
commented
Mar 10, 2021
Ping @woodruffw! |
trishankatdatadog
commented
Mar 10, 2021
Very cool, thanks for all the great work, guys! Will, you should be able to reuse a lot of the Vault-specific code I wrote as part of this PR... |
Related to: #1263
Description of the changes being introduced by the pull request:
This pr makes TUF compatible with changes introduced in secure-systems-lab/securesystemslib#319.
Please wait for the securesystemlib pr to be merged first!
Signed-off-by: Martin Vrachev mvrachev@vmware.com