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

Delete v3 signature support for built packages #225

Merged
merged 7 commits into from
May 22, 2024

Conversation

dralley
Copy link
Collaborator

@dralley dralley commented May 5, 2024

RHEL and CentOS 7 are going out of support in a couple of weeks - obviously we won't want to cut a release until after that.

There's a few other simplifications that can be done that aren't part of this series currently, I'll probably do followup PRs for those.

📜 Checklist

  • Commits are cleanly separated and have useful messages
  • A changelog entry or entries has been added to CHANGELOG.md
  • Documentation is thorough
  • Test coverage is excellent and passes
  • Works when tests are run --all-features enabled

@dralley dralley changed the title Simplify implementations by deleting EL7 support Simplify implementations by deleting a bit of EL7 legacy support May 5, 2024
@dralley dralley changed the title Simplify implementations by deleting a bit of EL7 legacy support Simplify implementations by deleting EL7 support May 5, 2024
@dralley dralley force-pushed the delete-el7-support branch 2 times, most recently from cccc65b to 3613d21 Compare May 5, 2024 05:13
@dralley dralley requested a review from drahnr May 5, 2024 21:45
@dralley dralley requested a review from cmeister2 May 6, 2024 22:24
@dralley
Copy link
Collaborator Author

dralley commented May 6, 2024

@cat-in-136 Are you OK with dropping EL7 support once it hits EOL in ~6 weeks?

@cat-in-136
Copy link

I agree that it is time to retire support for legacy rpm version.

@cmeister2
Copy link
Collaborator

cmeister2 commented May 7, 2024 via email

@dralley
Copy link
Collaborator Author

dralley commented May 8, 2024

I'll review the content later. Does this remove the ability to read and
write old packages, or just build them?

You should be able to read and write them fine. Verifying signatures and digests for old packages would be a bit weaker because at the time there was no PAYLOADDIGEST in the header (added in 2015-2016 IIRC), so the only thing covering the payload integrity is the V3 signatures.

It does remove the ability to build them unless 9df3d74 is dropped from the series. Theoretically we could, I just figured it'd be cleaner to draw a hard line.

The primary maintenance benefit is that it allows us to generate the signature header from the primary header alone, rather than needing to look at both the primary header and the payload. That simplifies the remote signing use case significantly (where you create a signature remotely from a checksum, rather than having access to the RPM).

@drahnr
Copy link
Contributor

drahnr commented May 8, 2024

Is there a use-case for verifying old packages still, while not generating any new packages with the legacy algorithms/features?

@dralley
Copy link
Collaborator Author

dralley commented May 8, 2024

You mean leaving in the code that verifies V3 signatures while dropping the code that generates them?

It's a reasonable half-step, generating them is the messiest part.

Note that you can still verify the signatures of old packages with this patchset, and it's not completely meaningless (the header is signed, and the header has file digests), but yeah it would be neutered a bit.

@drahnr
Copy link
Contributor

drahnr commented May 10, 2024

You mean leaving in the code that verifies V3 signatures while dropping the code that generates them?

Precisely. It wouldn't break verifying code, yet would stop producing broken signature schemes. I think a deprecation warning would also be in order.

To sum up, I propose a cadence of three (3) releases.

  1. immediate - add deprecation warnings on all legacy crypto types
  2. weeks - delete the generation part of broken crypto schemes, keep the verficiation logic with deprecation notices for obsolete crypto types
  3. months - delete the verification logic, give people to migrate all their container workloads

Happy to hear your opinion

@dralley dralley force-pushed the delete-el7-support branch 3 times, most recently from e32a0e3 to 821ddcd Compare May 10, 2024 23:49
@dralley
Copy link
Collaborator Author

dralley commented May 11, 2024

Well in terms of "immediate", we don't have anything else ready to release at the moment... Dunno that's worth doing a release solely to announce deprecations

It would be functionally equivalent to sticking to 0.14, and of course people can read the release notes before they upgrade

@dralley dralley changed the title Simplify implementations by deleting EL7 support Delete v3 signature support for built packages May 21, 2024
@dralley
Copy link
Collaborator Author

dralley commented May 21, 2024

@drahnr I've pared the PR down to merely removing the legacy signatures and digests from built, or resigned packages, and continuing to "verify" them.

Is that OK w/ you?

src/rpm/headers/header.rs Outdated Show resolved Hide resolved
src/rpm/headers/header.rs Outdated Show resolved Hide resolved
@dralley dralley merged commit 9ed36e3 into rpm-rs:master May 22, 2024
28 of 30 checks passed
@dralley dralley deleted the delete-el7-support branch May 22, 2024 13:43
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

4 participants