Forum

Authentication fails always

Praseed
28 February 2012, 17:19
Hi Hugo,

I am trying to enable authentication for our web server.
I tried both digest & basic authentication.
However the authentication is always failing.
I tested with Firefox 2.6.11(linux) & curl

My virtual host configuration
VirtualHost {
RequiredBinding = HTTP
Hostname = www.my-domain.com
WebsiteRoot = home/praseed/webdmn/www/hiawatha
UseFastCGI = FCGI1
TimeForCGI = 20
UseToolkit = to_fcgi
PasswordFile = basic:/home/praseed/webdmn/auth/.digest
}


The /home/praseed/webdmn/auth/.digest file
is
test:test


Curl with "curl -u test:test" returned 401 error & firefox kept prompting for user name/paswword.
The same thing happened with digest authentication too, I created the digest password using htdigest.

BTW digest authentication was working for me with hiawatha 6.14.1.
Please help me figure out the problem

Thanks
Praseed
Hiawatha version: 7.6
Operating System: linux
Hugo Leisink
28 February 2012, 18:22
The content of the .digest file is not correct. Use the Wigwam tool to create the content: use the -b flag for Basic HTTP authentication and the -d flag for Digest HTTP authentication.
Praseed
1 March 2012, 17:16
Oh.. let me try that.
BTW is this a recent change?
I remember creating digest password using htpasswd & later using htdigest
Hugo Leisink
1 March 2012, 17:24
This is since version 7.5.
Praseed
1 March 2012, 17:27
Thanks Hugo
Praseed
3 March 2012, 02:35
basic authentication worked for me.
However i couldn't get digest authentication work for me.
Wondering whether its some thing to do with "realm".
Practically what does realm mean here in digest authentication?

Thanks
Praseed
Hugo Leisink
3 March 2012, 08:42
The realm should be equal to the LoginMessage text.

I have no idea about the reason for a 'realm' in the digest authentication scheme. I didn't invent it
Praseed
6 March 2012, 20:43
However due to some reason digest authentication is not working for me
Hugo Leisink
7 March 2012, 00:46
I can assure you, it works. Create a passwordfile entry with wigwam -d. Use PasswordFile to tell Hiawatha where to find that passwordfile. Take a look at the error logfiles. For example, is Hiawatha able to read the passwordfile?
This topic has been closed.