| View previous topic :: View next topic |
| Author |
Message |
pablo_supertux Veteran


Joined: 25 Jan 2004 Posts: 2395 Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)
|
Posted: Tue Nov 14, 2006 11:11 am Post subject: [OT] subversion repo config [solved] |
|
|
Hallo
Ich hab verschiedene Subversion Repos auf meinem Server (über https). Eins davon hostet ein Projekt von mir. Bisher habe ich den Leuten, die Zugriff auf meinem Repo haben wollen, einen Benutzernamen und Passwort eingerichtet. Aber ich möchte, dass man auch ohne Benutzername und Passwort die Daten des Repos bekommen können, für die natürlich nur read-only. Bisher musste man es als Benutzer 'guest' kein Passwort eingeben, aber das mag ich nicht so.
In der /etc/apache2/modules.d/47_mod_dav_svn.conf habe ich
| Code: |
<Location /svn/sstrings>
DAV svn
SVNPath /var/svn/sstrings
AuthzSVNAccessFile /var/svn/conf/svnpolicy-sstrings
SSLRequireSSL
AuthType Basic
AuthName "sstrings repository"
AuthUserFile /var/svn/conf/svnusers-sstrings
Require valid-user
</Location>
|
Die /var/svn/conf/svnpolicy-sstrings
| Code: |
[sstrings:/]
user1 = rw
user2 = rw
...
guest = r
* =
|
dann hab ich '* =' auf '* = r' gewechselt, aber das bringt nicht die Resultate, die ich haben will. Denn ich will dass nur authorisierte Benutzer schreiben können, alle andere, ohne Benutzername + Passwort eingabe nur read-only Zugriff bekommen. Wie kann ich das am besten machen? Komplett auf AuthType-Teil verzichten und über /var/svn/sstrings/hooks/pre-commit regeln? _________________ A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Last edited by pablo_supertux on Tue Nov 14, 2006 6:04 pm; edited 1 time in total |
|
| Back to top |
|
 |
Edorian n00b


Joined: 14 May 2004 Posts: 34 Location: Aachen, Germany
|
Posted: Tue Nov 14, 2006 2:56 pm Post subject: |
|
|
Du könntest mit LimitExcept arbeiten.
Ich zitiere mal aus dem svn-book
http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html
| Quote: | | The parameters present on the Limit and LimitExcept directives are HTTP request types that are affected by that block. For example, if you wanted to disallow all access to your repository except the currently supported read-only operations, you would use the LimitExcept directive, passing the GET, PROPFIND, OPTIONS, and REPORT request type parameters. Then the previously mentioned Require valid-user directive would be placed inside the <LimitExcept> block instead of just inside the <Location> block. |
| Code: | <Location /svn>
DAV svn
SVNParentPath /usr/local/svn
# how to authenticate a user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /path/to/users/file
# For any operations other than these, require an authenticated user.
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location> |
edit: für Per-Directory Access Control wohl eher
| Code: | <Location /repos>
DAV svn
SVNParentPath /usr/local/svn
# our access control policy
AuthzSVNAccessFile /path/to/access/file
# try anonymous access first, resort to real
# authentication if necessary.
Satisfy Any
Require valid-user
# how to authenticate a user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /path/to/users/file
</Location> |
wobei ich das selber noch nie ausprobiert habe. Details dazu finden sich aber auch wieder im svn-book |
|
| Back to top |
|
 |
pablo_supertux Veteran


Joined: 25 Jan 2004 Posts: 2395 Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)
|
Posted: Tue Nov 14, 2006 6:04 pm Post subject: |
|
|
Danke für die Hilfe, jetzt ärgere ich mich wirklich, ich hätte nur ein wenig mehr das SVN Buch gelesen und hätt es selber gefunden. _________________ A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|