feat: keel verify trusts a signature by main or images (decision 0055) #176
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel!176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/images-key-verifiers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Step 4 of handbook decision 0055 (images key). Every verifier must trust the images key before an image artifact is signed with it alone. Until then main and images both sign, in 1 file. This makes
keel verifysuch a verifier. It replaces the "no code change" conclusion of #151.What changes
keel verifychecks a signed layer.hashfile against/usr/share/keyrings/keel-archive-keyring.gpg(main) andkeel-images-keyring.gpg(images), from keel-archive-keyring 0.3.0. A signature by either key is good. The files stay separate. A missing file is skipped.signature.verify_by_anyreads the status lines one signature at a time: one BADSIG refuses, and one GOODSIG with VALIDSIG by a key that is not revoked or expired is good. The channel pointer path (signature.verify) does not change..hashfile givesok: hash file signed by <fingerprint>, and its digests come from the signed text. A BADSIG is a mismatch. A key in no keyring staysunverified(exit 8, which keel-release step 2 accepts).keel verify --release-manifest FILEverifies FILE against FILE.asc, then the size and sha256 of each listed file that is present. A path that leaves the release directory is refused.--keyring FILE(can repeat) and$KEEL_IMAGE_KEYRINGSreplace the 2 defaults.docs/layers.md, README, changelog 0.23.28.Version
0.23.28, because #175 holds 0.23.27. I merge this after #175, so the changelog gate of #175 does not change. This PR does not publish a release.
Tests
tests/test_layers_rolesig.py, real keys and real gpgv: a dual-signed detached and clear-signed file verifies with each keyring alone; a changed file is BADSIG with either keyring; an unknown or revoked key is refused; a missing keyring is skipped and named; the MANIFEST checks (ok, mismatch, not present, bad path, no .asc); the CLI paths. release_manifest.py, verify.py and the new signature.py code are at 100 percent line coverage.1850960a2048212cb6e848212cb6e8efead4e607