Force user to authenticate on commit
Added by Justyn Bell over 10 years ago
I know this should be possible, but as of now, I can commit to my SVN repository using Redmine without any authentication... which I don't want. What I would like (and how I've seen it done) is a user is prompted for his/her username, and subsequently password. I've tried tweaking just about everything, so this is my last hope.
Here are the relevant parts of my config files:
apache2.conf:
PerlLoadModule Apache::Redmine
<Location /svn>
DAV svn
SVNParentPath /var/www/redmine-svn
Options FollowSymLinks
#Order deny,allow
#Deny from all
Require valid-user
Satisfy any
# If a client tries to svn update which involves updating many files,
# the update request might result in an error Server sent unexpected
# return value (413 Request Entity Too Large) in response to REPORT
# request,because the size of the update request exceeds the limit
# allowed by the server. You can avoid this error by disabling the
# request size limit by adding the line LimitXMLRequestBody 0
# between the <Location...> and </Location> lines.
LimitXMLRequestBody 0
# Only check Authentication for root path, nor again for recursive
# folder.
# Redmine core does only permit access on repository level, so this
# doesn't hurt security. On the other hand it does boost performance
# a lot!
SVNPathAuthz on
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
AuthType Basic
AuthName "Redmine SVN Repository"
#read-only access
<Limit GET PROPFIND OPTIONS REPORT>
Require valid-user
Allow from localhost
# Allow from another-ip
Satisfy any
</Limit>
# write access
<LimitExcept GET PROPFIND OPTIONS REPORT>
#Require all denied
Require valid-user
</LimitExcept>
## for mysql
RedmineDSN "DBI:mysql:database=redmine_default;host=localhost"
RedmineDbUser "redmine"
RedmineDbPass "----------"
</Location>
sites-enabled/000-default.conf:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
I have uncommented
store-passwords = no store-auth-creds = no
in /etc/subversion/config, and deleted the svn.simple saved credentials on my local machine.
Hopefully this is a simple problem because I've spent far too much time on it.
Thanks in advance.
Replies (1)
RE: Force user to authenticate on commit
-
Added by Justyn Bell over 10 years ago
I forgot to mention that this manifests itself as commits in the repository tab of Redmine with nothing under the "author" column. I need this user authentication because the code base we're working on sits on a single machine with multiple users committing. I'd like them to be forced to enter their credentials so I know who the authors of certain commits are.