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

Change in-toto-sign supported key file formats #654

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

lukpueh
Copy link
Member

@lukpueh lukpueh commented Nov 24, 2023

Changes in-toto-sign to expect pem/pkcs8 signing keys and
pem/subjectPublicKeyInfo verification keys passed with the --key
argument. --key-type is now obsolete and removed.

Otherwise the behavior of in-toto-sign remains the same.

This is part of a series of patches to prepare for removal of legacy
securesystemslib interfaces and key file formats.

Change details

Unlike, in-toto-verify (#652) and in-toto-run/record (#651, #649), where
new arguments were introduced for the new formats, and deprecation
warnings were added to the old arguments, in-toto-sign is changed
directly.

This is because, the main use cases for in-toto-sign have been:

  • in-toto maintainers re-signing test/demo metadata
  • layout-web-tool users signing online-generated layouts

Given that the layout-web-tool is currently offline for revision
(in-toto/layout-web-tool#70) and in-toto
maintainers should be easily able to adapt, a direct change is not
expected to disrupt anyone's operations.

IMO this can even be released as part of a minor version bump.

Test change details

  • use new pre-generated key files instead of demo key files (but keep
    using demo metadata)
  • update expected keyid link file name where necessary
  • remove --key-type in cli invocations
  • remove --key-type -specific tests

@lukpueh lukpueh marked this pull request as draft November 24, 2023 14:25
@lukpueh lukpueh force-pushed the upgrade-in-toto-sign branch 2 times, most recently from e117800 to 75f1ea9 Compare December 6, 2023 09:17
@lukpueh lukpueh changed the title Change in-toto-sign key file format Change in-toto-sign supported key file formats Dec 6, 2023
Changes `in-toto-sign` to expect pem/pkcs8 signing keys and
pem/subjectPublicKeyInfo verification keys passed with the `--key`
argument. `--key-type` is now obsolete and removed.

Otherwise the behavior of in-toto-sign remains the same.

This is part of a series of patches to prepare for removal of legacy
securesystemslib interfaces and key file formats.

**Change details**

Unlike, in-toto-verify (in-toto#652) and in-toto-run/record (in-toto#651, in-toto#649), where
new arguments were introduced for the new formats, and deprecation
warnings were added to the old arguments, in-toto-sign is changed
directly.

This is because, the main use cases for in-toto-sign have been:
- in-toto maintainers re-signing test/demo metadata
- layout-web-tool users signing online-generated layouts

Given that the layout-web-tool is currently offline for revision
(in-toto/layout-web-tool#70) and in-toto
maintainers should be easily able to adapt, a direct change is not
expected to disrupt anyone's operations.

IMO this can even be released as part of a minor version bump.

**Test change details**

- use new pre-generated key files instead of demo key files (but keep
  using demo metadata)
- update expected keyid link file name where necessary
- remove `--key-type` in cli invocations
- remove `--key-type` -specific tests
- remove obsolete test case, which uses 4 keys

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
@lukpueh lukpueh marked this pull request as ready for review December 6, 2023 09:20
@lukpueh lukpueh merged commit e327d31 into in-toto:develop Dec 6, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants