0

I'd like to support both the svn: and http: protocols for an SVN server that will only be accessed within the network. However, I'd like the two protocols to share the same users and passwords. Is there a way for Apache and svnserve to share the same user data stored in a file local to the server?

1 Answer 1

1

Is there a way for Apache and svnserve to share the same user data stored in a file local to the server?

Not directly and automatically, not single file with user-database, but may be scripted and automated (but in insecure, in common way)

Main problem is different formats (and type of stored data) of user-file for Apache and svnserve

passwd-file in Apache uses

user:<HASH-OF-PASSWORD>

user-db for svnserve

[users]
user = PASSWORD

Because hashing is non-reversible function, you must

  • Perform all user-adds and user-edits in user-db (you can try to delete users on Apache's side, but have in this case to support bidirectional sync, thus - I suupose, user-delete in user-db only also will be better choice)
  • After each user-db changes process-parse-sync user-db with passwd-file: read about htpasswd -b mode in man page (maybe about ... -i also)

Just IMNSHO: support only one server will be a lot easier way

1
  • Yes, I agree that a single server would be much easier. No argument there. Unfortunately, there is an existing svnserve that my coworkers (and myself) are using. Now I'm in need of the http server, but I don't want to break everyone else's checkouts. I wonder if rather than trying to synchronize the two, it might be simpler to just have a script that generates the two. Changes require local modifications, anyway. Thanks!
    – jpmc26
    Jul 13, 2013 at 7:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .