You are not logged in.

#1 2018-09-23 17:06:03

eomanis
Member
Registered: 2013-04-17
Posts: 50

[SOLVED] svn 1.10.2-2: svnserve authentication non-functional

Edit: It was a brain fart, also possibly there was a change in how svnserve handles user authorizations from 1.9 to 1.10.

Thing is, I didn't pay attention enough – the error message states "Authorization failed", not "Authentication failed". The test user is authenticated all right, it's just that it lacks the right to read the repository.
To fix that, one has to explicitely state that a user, or more feasibly any authenticated user, is allowed to read and also typically write to the repository's root directory, in repository/conf/authz:

[/]
$authenticated = rw

-------------------------------------

Alright. Some weeks ago my private svnserve instance stopped accepting my username and password. I was using SASL authentication then, so I figured "Maybe SASL is acting up. I don't really need it, and these days Subclipse on Linux is limited to the SVNKit SVN implementation anyway, and that does not support SASL authentication, so I'll change my repos back to the conf/passwd file as password-db."

So I did. However, it wasn't effective. It seems to me that svnserve authentication is currently thoroughly broken, or I am having a bad case of brain farts and keep forgetting something essential.
To rule out some obscure problem with the server OS configuration I created a test repository on my PC and tried to access that one through svnserve, which yielded the same behavior.

Before I file a bug against the package, can someone verify my findings? Just grab a command line window and do this:

[youruser@yourpc ~]$ # Create an SVN test directory
[youruser@yourpc ~]$ mkdir svn-test
[youruser@yourpc ~]$ cd svn-test

[youruser@yourpc svn-test]$ # In there, create a directory that serves as repositories root
[youruser@yourpc svn-test]$ mkdir repos
[youruser@yourpc svn-test]$ cd repos

[youruser@yourpc repos]$ # In the repositories root, create a test repository
[youruser@yourpc repos]$ svnadmin create testrepo

[youruser@yourpc repos]$ # Edit the test repository's svnserve configuration
[youruser@yourpc repos]$ nano testrepo/conf/svnserve.conf
[general]
anon-access = none
auth-access = write
password-db = passwd
auth-db = authz
realm = svn-test
[sasl]

[youruser@yourpc repos]$ # Configure the test user
[youruser@yourpc repos]$ nano testrepo/conf/passwd
[users]
testuser = testpw

[youruser@yourpc repos]$ # Change back to the SVN test directory and launch svnserve
[youruser@yourpc repos]$ cd ..
[youruser@yourpc svn-test]$ svnserve --daemon --foreground --root=repos

Now you've got a foreground svnserve instance running that hosts your test repository.
Get another terminal window and attempt to check out a working copy of the test repository through svnserve:

[youruser@yourpc ~]$ cd svn-test/
[youruser@yourpc svn-test]$ svn checkout svn://localhost/testrepo --no-auth-cache --username testuser --password testpw
svn: E170001: Authorization failed

Anyone getting the same error?
Did I miss some crucial step when setting up the repository?

Last edited by eomanis (2018-09-23 21:09:06)

Offline

Board footer

Powered by FluxBB