Forum

digest authentication fails

digest authentication
4 April 2012, 00:55
Hiawatha version: 7.6
Operating System: linux

Hi Hugo,

This is same issue as
http://www.hiawatha-webserver.org/forum/topic/953

I used wigwam to generate password file for test/test.
test:test:aeeebbfd75d1499d24388f5b9b10e0ef

I copied this to /home/test/webserver/authentication/.digest

My hiawatha.conf virtual host conf,
VirtualHost {
RequiredBinding = HTTP
Hostname = my_url.com
WebsiteRoot = /home/test/webserver/webroot
PasswordFile = digest:/home/test/webserver/authentication/.password
}

curl --digest -u test:test http://my_url.com/index.html
is always returning 401.

However using the wigwam generated basic password file for test:test
test:GdXkfZ9YajWwU worked like a breeze.

This is the curl logs from client for digest authentication
http://pastebin.com/xQd41tK0

I got the similar results when tried with Firefox/3.6.11 too.

Thank


Hugo Leisink
4 April 2012, 20:55
It looks like a bug in curl. It works with all browsers and with wget.
digest authentication
5 April 2012, 00:08
I couldn't get it work with Firefox browser too.
However Firefox basic authentication worked good.
I got the same error when using wget.
BTW is the Hiawatha version 7.6?
Hugo Leisink
5 April 2012, 01:05
As stated in the Hiawatha manual page, "The realm in the password file is the LoginMessage text." Did you set that option? Otherwise, read the PasswordFile section in the manual page.

And the latest version of Hiawatha is 8.1.
digest authentication
5 April 2012, 18:35
Thanks Hugo
As I mentioned in my first post the entry of digest password file for test: test is
test:test:aeeebbfd75d1499d24388f5b9b10e0ef
where the second test is the realm.This is the output I got from wigwam.
Is this is the correct way configuring realm?
Is there any configuration/parameter I am still missing either on the server or client side?

At least for a few months we cannot move from openSSL to polarSSL, so I have to stick with Hiawatha 7.6.
Please help me with making digest auth work on 7.6.
Hugo Leisink
6 April 2012, 13:16
If 'test' is your realm, set LoginMessage to 'test'.
digest authentication
6 April 2012, 23:06
aaha...
That was the piece I missed.
Thanks a lot Hugo!
This topic has been closed.