Closed Bug 1439795 Opened 8 years ago Closed 8 years ago

Hook to prevent changes to repository data on hgweb

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Assigned: gps)

Details

Attachments

(1 file)

To bolster data integrity protection on hg.mozilla.org, we want to deploy a hook to hgweb machines that prevents mutation of repository data unless it came from the replication mechanism. This will prevent against unwanted changes to repositories on read-only hgweb machines.
Comment on attachment 8952602 [details] hgserver: hook to prevent most repository changes on hgweb (bug 1439795); https://reviewboard.mozilla.org/r/221840/#review227730 lgtm ::: hghooks/mozhghooks/prevent_hgweb_changes.py:6 (Diff revision 1) > +# This hook is intended to run on the hgweb machines. It effectively > +# prevents repository changes that didn't come from `hg pull` or > +# `hg strip`. The former is used by the replication mechanism. The > +# latter is an adminstrative task that is performed from time to time. should we also prevent tagging?
Attachment #8952602 - Flags: review?(glob) → review+
Comment on attachment 8952602 [details] hgserver: hook to prevent most repository changes on hgweb (bug 1439795); https://reviewboard.mozilla.org/r/221840/#review227730 > should we also prevent tagging? Unlike Git (where tagging is pushing a specially named ref), tagging in Mercurial requires creating a changeset (tags are stored in the `.hgtags` file). So tagging is prevented by preventing new changesets from being introduced. And `hg tag` goes through the commit code paths. So the pre-commit hook should prevent it.
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/f48f74151f57 hgserver: hook to prevent most repository changes on hgweb ; r=glob
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: