Backups: refuse an unsigned archive and an unknown download rule #995
No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!995
Loading…
Reference in a new issue
No description provided.
Delete branch "sec2-d1-backups"
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?
What and why
#974 (Medium). A restore treated an archive with no
authenticationobject as one "written before archives were signed" and restored its database and media with a warning. Nothing tells that apart from a signed archive whose signature was removed, so altering a copy needed no forged MAC. Nowrestore_backuprefuses any archive that is not authentic unless--unverified(unsigned as well as unverified). The Restore page computesauthenticity(), shows the verdict (authentic / unsigned / unverified) and prints--force --unverifiedwhen the archive is not authentic. The threat-model sentence is amended.#978.
POSTULO_BACKUP_DOWNLOADis now inchecks.CHOICES(postulo.E001at start-up) andmay_downloadfails closed: onlyadministratorsandoperatorgrant anything, any other word grants nobody.Deviations from the issue text
plugins/" branch is removed, as it can no longer be reached (an unsigned archive is refused outright);RestoreReport.plugins_withheldand its CLI line went with it. With--unverifiedplugins are restored, as for an unverified archive.Tests
Changed deliberately:
test_backup.py::test_an_archive_from_before_the_plugins_went_in_still_restoresandtest_hardening_772.py(pre-signing archive) pinned the permissive path; they now assert the refusal and then restore withunverified=True. New: stripped-signature test (nothing changed on refusal, CLI refuses,--unverifiedrestores withauthenticity == unsigned), Restore page test for both verdicts,test_hardening_810.pytests for E001 and a 404 underoperators. The new tests fail without the fix (checked by stashing src). Full unit suite: 18869 passed, 122 skipped. No browser tests run locally; the restore template changed but no e2e test covers it as far as I know.Closes #974, Closes #978
🤖 Generated with Claude Code
eb5f4888fafa40a88c73