Closed Bug 444430 Opened 16 years ago Closed 16 years ago

SVN commits need to work with passwords

Categories

(Webtools Graveyard :: Verbatim, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dschafer, Assigned: clouserw)

References

Details

Attachments

(2 files, 7 obsolete files)

For committing to SVN repositories requiring passwords, committing will require access to the user's authentication information.  Hence, the username and password will either need to be prompted for in the web interface or stored securely.
Assignee: nobody → dschafer
Priority: -- → P1
Status: NEW → ASSIGNED
The plan for this is detailed here:  http://wiki.mozilla.org/Verbatim:Interaction_with_SVN

Happy to hear feedback.
Recently, translate toolkit had its commit() function modified to allow author flags; the original modification did not support SVN (it was designed to allow the use of --author flags for GIT, etc.).

I proposed a patch here to add SVN support:
http://tinyurl.com/5ug4yz
This would set the revision property pootle:author to the real author of the file.  if the patch ends up in translate-toolkit, this will effectively take care of the Verbatim side of this bug.
A version of that patch landed in revision 7847 of the translate toolkit, and revision 7844 of mozootle merged the new author code in pootle trunk to mozootle.  Using the latest revision of mozootle and translate toolkit will lead to the property "translate:author" being set to the username who commits the change.
Attached patch Post-commit update author script (obsolete) — Splinter Review
This isn't what we originally had in mind, but it seems to work: a post-commit script that replaces svn:author with translate:author.

This is in revision 7864.
A working precommit/postcommit script now exists for the AMO demo, which will commit a file and convert the author successfully.  I won't close this, but I'm removing the priority tag from it.
Priority: P1 → --
Talked about it briefly yesterday but so we don't forget:

For the mozilla script we should modify it to accept a list of IPs to accept commits from and only recognize the translate:author flag if they come from those IPs.  

We also need to document the potential security issues here (allowing people to specify the authors) so anyone else using it can take appropriate steps for their systems.
Attached file Sample pre-revprop-change hook (obsolete) —
This is a sample pre-revprop-change hook; it allows log modifications by anyone, and allows svn:author changes by a single user, specified by SERVERUSER.
If we want to reject spoofed translate:author flags, we could set up a pre-commit hook (similar to this, maybe: http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/pre-commit-check.py) that only accepts a commit with translate:author set if it meets certain conditions (i.e. committing user is SERVERUSER).
Using a username instead of IPs is fine with me.
Attachment #331208 - Attachment is obsolete: true
Attachment #331208 - Flags: review-
Attached patch new post-commit patch (obsolete) — Splinter Review
New post-commit patch
Assignee: dschafer → clouserw
Attachment #332272 - Attachment is obsolete: true
Depends on: 454671
Attached patch pre-commit (obsolete) — Splinter Review
Turns out pre-revprop-change doesn't actually care about properties you've already set.  So, here is a pre-commit script that does the job instead.
Attachment #337775 - Attachment is obsolete: true
Attachment #337590 - Attachment is obsolete: true
Attachment #339168 - Attachment is obsolete: true
Attachment #339176 - Attachment is obsolete: true
Attachment #337775 - Attachment is obsolete: false
Attachment #339180 - Attachment is obsolete: true
Attached patch *sigh*Splinter Review
So, this is not my night.  Long story short, the SVN version I was testing with was too old to have --with-revprop so things were breaking and I made a version using svn:log.  Turns out I didn't need to and this works fine.  I hope this resolves the bug and I never see it again. <3
Attachment #339181 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: