SabreDAV authentication does not work in Baikal Server (No digest authentication headers were found)

1,281 views
Skip to first unread message

André Höche

unread,
May 4, 2014, 6:17:33 AM5/4/14
to sabredav...@googlegroups.com

Hey Guys,

I'm running a Debian 7.5 x64 server with Plesk and I tried to get Baikal running yesterday but got lost after hours of testing. What I did so far:
Set up a subdirectory for Baikal (baikal.andre-hoeche.de)
Copied Baikal files via FTP, installed Baikal, created a testuser (user: test / pass: test) and created an addressbook and a calendar

When trying to access Baikal using Thunderbird / Lightning I get no error message but the user and password is not acceppted.
If I'm trying to acces via curl I get the following result:
root@158012:~# curl -so - --digest --user test:test http://baikal.andre-hoeche.de/cal.php/calendars/test/default
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
 
<s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No digest authentication headers were found</
s:message>
 
<s:sabredav-version>1.8.7</s:sabredav-version>
</
d:error>

My .htaccess file looks like this:
# Disabling cache management
# that could cause problems with DAV requests
# Useful only for Apache servers, with AllowOverride All
# (ie, .htaccess files enabled)

# Allow HTTP headers with Apache/FastCGI
# See http://code.google.com/p/sabredav/wiki/Authentication#Apache_+_(Fast)CGI

<IfModule mod_rewrite.c>
   
RewriteEngine On
   
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive Off
</
IfModule>

And my PHP Settings can be found here:
https://baikal.andre-hoeche.de/info.php

As I don't find any log files which give me detailed information about the problem or any debug possibility I'm totally stuck. Any help is really apreciated! :-)

Thanks and best regards,
André

André Höche

unread,
May 4, 2014, 9:02:39 AM5/4/14
to sabredav...@googlegroups.com
So, it seems that this is not a SabreDAV problem but a problem with the server configuration. We added a little debug output to the digest authentication and saw that the username was not delivered. I will try to contact the developer from Baikal and ask him if he has an idea what might be problem.

Sabre\HTTP\DigestAuth Object
(
    [nonce:protected] => 5366388e22db9
    [opaque:protected] => df58bdff8cf60599c939187d0b5c54de
    [digestParts:protected] => 
    [A1:protected] => 
    [qop:protected] => 1
    [realm:protected] => BaikalDAV
    [httpResponse:protected] => Sabre\HTTP\Response Object
        (
            [defaultHttpVersion] => 1.1
        )

    [httpRequest:protected] => Sabre\HTTP\Request Object
        (
            [_SERVER:protected] => Array
                (
                    [PATH] => /usr/local/bin:/usr/bin:/bin
                    [REDIRECT_STATUS] => 200
                    [PP_CUSTOM_PHP_INI] => /var/www/vhosts/system/baikal.andre-hoeche.de/etc/php.ini
                    [PP_CUSTOM_PHP_CGI_INDEX] => cgi
                    [HTTP_HOST] => baikal.andre-hoeche.de
                    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
                    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                    [HTTP_ACCEPT_LANGUAGE] => de,en-US;q=0.7,en;q=0.3
                    [HTTP_ACCEPT_ENCODING] => gzip, deflate
                    [HTTP_DNT] => 1
                    [HTTP_COOKIE] => _pk_id.1.733e=ef01b2cd2832dfbe.1399108861.1.1399108861.1399108861.; PHPSESSID=4t3ltmnrkkmb09sd7am16p1r00
                    [HTTP_CONNECTION] => keep-alive
                    [SERVER_SOFTWARE] => Apache
                    [SERVER_NAME] => baikal.andre-hoeche.de
                    [SERVER_ADDR] => 81.30.158.12
                    [SERVER_PORT] => 80
                    [REMOTE_ADDR] => 87.177.149.88
                    [DOCUMENT_ROOT] => /var/www/vhosts/andre-hoeche.de/baikal.andre-hoeche.de
                    [SERVER_ADMIN] => _removed_
                    [SCRIPT_FILENAME] => /var/www/vhosts/andre-hoeche.de/baikal.andre-hoeche.de/cal.php
                    [REMOTE_PORT] => 54483
                    [REDIRECT_URL] => /cal.php/calendars/test/default
                    [GATEWAY_INTERFACE] => CGI/1.1
                    [SERVER_PROTOCOL] => HTTP/1.1
                    [REQUEST_METHOD] => GET
                    [QUERY_STRING] => 
                    [REQUEST_URI] => /cal.php/calendars/test/default
                    [SCRIPT_NAME] => /cal.php
                    [PATH_INFO] => /calendars/test/default
                    [PATH_TRANSLATED] => /var/www/vhosts/andre-hoeche.de/baikal.andre-hoeche.de/calendars/test/default
                    [ORIG_PATH_INFO] => /cal.php/calendars/test/default
                    [ORIG_SCRIPT_NAME] => /phppath/cgi_wrapper
                    [ORIG_SCRIPT_FILENAME] => /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
                    [ORIG_PATH_TRANSLATED] => /var/www/vhosts/andre-hoeche.de/baikal.andre-hoeche.de/cal.php/calendars/test/default
                    [PHP_SELF] => /cal.php/calendars/test/default
                    [REQUEST_TIME_FLOAT] => 1399208078,1037
                    [REQUEST_TIME] => 1399208078
                )

            [_POST:protected] => Array
                (
                )

            [body:protected] => 
        )

)
Sabre\HTTP\Request Object
(
    [_SERVER:protected] => Array
        (
            [PATH] => /usr/local/bin:/usr/bin:/bin
            [REDIRECT_STATUS] => 200
            [PP_CUSTOM_PHP_INI] => /var/www/vhosts/system/baikal.andre-hoeche.de/etc/php.ini
            [PP_CUSTOM_PHP_CGI_INDEX] => cgi
            [HTTP_HOST] => baikal.andre-hoeche.de
            [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
            [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            [HTTP_ACCEPT_LANGUAGE] => de,en-US;q=0.7,en;q=0.3
            [HTTP_ACCEPT_ENCODING] => gzip, deflate
            [HTTP_DNT] => 1
            [HTTP_COOKIE] => _pk_id.1.733e=ef01b2cd2832dfbe.1399108861.1.1399108861.1399108861.; PHPSESSID=4t3ltmnrkkmb09sd7am16p1r00
            [HTTP_CONNECTION] => keep-alive
            [SERVER_SOFTWARE] => Apache
            [SERVER_NAME] => baikal.andre-hoeche.de
            [SERVER_ADDR] => 81.30.158.12
            [SERVER_PORT] => 80
            [REMOTE_ADDR] => 87.177.149.88
            [DOCUMENT_ROOT] => /var/www/vhosts/andre-hoeche.de/baikal.andre-hoeche.de
            [SERVER_ADMIN] => _removed_
            [SCRIPT_FILENAME] => /var/www/vhosts/andre-hoeche.de/baikal.andre-hoeche.de/cal.php
            [REMOTE_PORT] => 54483
            [REDIRECT_URL] => /cal.php/calendars/test/default
            [GATEWAY_INTERFACE] => CGI/1.1
            [SERVER_PROTOCOL] => HTTP/1.1
            [REQUEST_METHOD] => GET
            [QUERY_STRING] => 
            [REQUEST_URI] => /cal.php/calendars/test/default
            [SCRIPT_NAME] => /cal.php
            [PATH_INFO] => /calendars/test/default
            [PATH_TRANSLATED] => /var/www/vhosts/andre-hoeche.de/baikal.andre-hoeche.de/calendars/test/default
            [ORIG_PATH_INFO] => /cal.php/calendars/test/default
            [ORIG_SCRIPT_NAME] => /phppath/cgi_wrapper
            [ORIG_SCRIPT_FILENAME] => /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
            [ORIG_PATH_TRANSLATED] => /var/www/vhosts/andre-hoeche.de/baikal.andre-hoeche.de/cal.php/calendars/test/default
            [PHP_SELF] => /cal.php/calendars/test/default
            [REQUEST_TIME_FLOAT] => 1399208078,1037
            [REQUEST_TIME] => 1399208078
        )

    [_POST:protected] => Array
        (
        )

    [body:protected] => 
)

Evert Pot

unread,
May 4, 2014, 9:50:57 PM5/4/14
to sabredav...@googlegroups.com
Hi André,

This is indeed a server configuration problem... but I have no idea what..

One thing I would recommend, is to get rid of this statement:

<IfModule mod_rewrite.c>

I think using 'IfModule' is in general a bad idea, unless you specifically want that behavior optional.
If the mod_rewrite module is indeed not enabled, you now caused those lines to be silently ignored by apache.

You don't want that.. you want apache to give you an error because you didn't enable mod_rewrite.

Evert

André Höche

unread,
May 7, 2014, 3:09:44 PM5/7/14
to sabredav...@googlegroups.com
Hi Evert,

I got this issue resolved by completely starting from scratch with a new subdomain and it's now working. Looking forward to use it. :-) Thanks for your fast response and help!

Best regards,
André
Reply all
Reply to author
Forward
0 new messages