11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Server ConfigurationOn the opposite end of the paranoia scale, you can configure your block to demand authenticationfrom everyone. All clients must supply credentials to identify themselves. Yourblock unconditionally requires authentication via the Require valid-user directive, andit defines a means to authenticate. (See Example 6.2, “A sample configuration for authenticatedaccess”.)Example 6.2. A sample configuration for authenticated accessDAV svnSVNParentPath /var/svn# our access control policyAuthzSVNAccessFile /path/to/access/file# only authenticated users may access the repositoryRequire valid-user# how to authenticate a userAuthType BasicAuthName "<strong>Subversion</strong> repository"AuthUserFile /path/to/users/fileA third very popular pattern is to allow a combination of authenticated and anonymous access.For example, many administrators want to allow anonymous users to read certain repositorydirectories, but want only authenticated users to read (or write) more sensitiveareas. In this setup, all users start out accessing the repository anonymously. If your accesscontrol policy demands a real username at any point, Apache will demand authenticationfrom the client. To do this, use both the Satisfy Any and Require valid-userdirectives together. (See Example 6.3, “A sample configuration for mixed authenticated/anonymousaccess”.)Example 6.3. A sample configuration for mixedauthenticated/anonymous accessDAV svnSVNParentPath /var/svn# our access control policyAuthzSVNAccessFile /path/to/access/file# try anonymous access first, resort to real# authentication if necessary.Satisfy AnyRequire valid-user# how to authenticate a userAuthType BasicAuthName "<strong>Subversion</strong> repository"AuthUserFile /path/to/users/file178

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!