You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Joel Carlos Martinho Alexandre (DSI)" <jo...@caixaseguros.pt> on 2007/12/12 12:30:21 UTC

[users@httpd] Help with AB and authentication

Hi,

I'm trying to use AB to benchmark a site within a IIS, but I'm having
problems with authentication.

I'm currently using 

ab2 -A domain\user:password url 

but I can't get through the 401 error page.

I've tried some variations:
ab2 -A "domain\user:password" url
ab2 -A domain\user,password url
etc.

When using wget, it works:
wget --http-user="domain\user" --http-passwd="password"  url

The server is IIS with integrated authentication.

Any ideas?

Thanks,
Joel

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Help with AB and authentication

Posted by "Joel Carlos Martinho Alexandre (DSI)" <jo...@caixaseguros.pt>.
The IIS is running on a Windows server (2003, i think)

Rgds,
Joel

-----Original Message-----
From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net] 
Sent: quarta-feira, 12 de Dezembro de 2007 16:26
To: users@httpd.apache.org
Subject: Re: [users@httpd] Help with AB and authentication

Joel Carlos Martinho Alexandre (DSI) wrote:
> Hi,
> 
> I'm trying to use AB to benchmark a site within a IIS, but I'm having
> problems with authentication.
> 
> I'm currently using 
> 
> ab2 -A domain\user:password url 
> 
> but I can't get through the 401 error page.
> 
> I've tried some variations:
> ab2 -A "domain\user:password" url
> ab2 -A domain\user,password url
> etc.
> 
> When using wget, it works:
> wget --http-user="domain\user" --http-passwd="password"  url
> 
> The server is IIS with integrated authentication.
> 
> Any ideas?

IIS on a client OS (workstation/home/etc) authenticates 10 users and
then surrenders; your ELUA permits only 10 "connections" which MS has
for years interpreted as authenticated clients.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Help with AB and authentication

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Joel Carlos Martinho Alexandre (DSI) wrote:
> Hi,
> 
> I'm trying to use AB to benchmark a site within a IIS, but I'm having
> problems with authentication.
> 
> I'm currently using 
> 
> ab2 -A domain\user:password url 
> 
> but I can't get through the 401 error page.
> 
> I've tried some variations:
> ab2 -A "domain\user:password" url
> ab2 -A domain\user,password url
> etc.
> 
> When using wget, it works:
> wget --http-user="domain\user" --http-passwd="password"  url
> 
> The server is IIS with integrated authentication.
> 
> Any ideas?

IIS on a client OS (workstation/home/etc) authenticates 10 users and
then surrenders; your ELUA permits only 10 "connections" which MS has
for years interpreted as authenticated clients.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Help with AB and authentication

Posted by Graeme Fowler <gr...@graemef.net>.
On Wed, 2007-12-12 at 14:39 +0000, Joel Carlos Martinho Alexandre (DSI)
wrote:
> Unfortunately i'm unable to change the virtual directory configuration.

In that case, ApacheBench won't work for you on that folder - it can do
Basic authentication only. Your system seems to be using NTLM or
Kerberos, depending on the client configuration.

Graeme


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Help with AB and authentication

Posted by "Joel Carlos Martinho Alexandre (DSI)" <jo...@caixaseguros.pt>.
That's right. 

Unfortunately i'm unable to change the virtual directory configuration.


Cumprimentos,
Joel Alexandre
 
Direcção de Sistemas de Informação
PORT - Sector de Portais 
R. Alexandre Herculano, nº53 - 2º andar
1269-152 Lisboa
email: joel.martinho.alexandre@caixaseguros.pt

-----Original Message-----
From: Neil A. Hillard [mailto:neil.hillard@agustawestland.com] 
Sent: quarta-feira, 12 de Dezembro de 2007 14:33
To: users@httpd.apache.org
Subject: Re: [users@httpd] Help with AB and authentication

Hi,

Joel Carlos Martinho Alexandre (DSI) wrote:
> I already tried that. 
> 
> Didn't work.
> 
> Maybe it's another thing.
> 
> With wget, i does 3 request just to get one page. The first two return
> 401 and only the third is giving a 200. Maybe ab, for some reason, isn't
> trying enough times to authenticate.
> 
> In AB with verbose active, I can see it only tries one time.

IIRC correctly you mentioned that you were using 'windows integrated
authentication'.  Try using something standard like basic authentication
on your web server and then retry.

HTH,


				Neil.

> -----Original Message-----
> From: Graeme Fowler [mailto:graeme@graemef.net] 
> Sent: quarta-feira, 12 de Dezembro de 2007 13:51
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Help with AB and authentication
> 
> On Wed, 2007-12-12 at 11:30 +0000, Joel Carlos Martinho Alexandre (DSI)
> wrote:
>> I'm trying to use AB to benchmark a site within a IIS, but I'm having
>> problems with authentication.
>>
>> I'm currently using 
>>
>> ab2 -A domain\user:password url 
> 
> Try
> 
> ab2 -A domain\\user:password url
> 
> The command line thinks you're escaping the first character of the
> username since backslashed are used as escape markers. Pass a pair, and
> the first backslash escapes the second one, thus passing it to the
> application.
> 
> Alternatively, put the whole thing in single quotes:
> 
> 'domain\user:password' and see if ab takes that.


-- 
Neil Hillard                    neil.hillard@agustawestland.com
AgustaWestland                  http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
            views of Westland Helicopters Ltd.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Help with AB and authentication

Posted by "Neil A. Hillard" <ne...@agustawestland.com>.
Hi,

Joel Carlos Martinho Alexandre (DSI) wrote:
> I already tried that. 
> 
> Didn't work.
> 
> Maybe it's another thing.
> 
> With wget, i does 3 request just to get one page. The first two return
> 401 and only the third is giving a 200. Maybe ab, for some reason, isn't
> trying enough times to authenticate.
> 
> In AB with verbose active, I can see it only tries one time.

IIRC correctly you mentioned that you were using 'windows integrated
authentication'.  Try using something standard like basic authentication
on your web server and then retry.

HTH,


				Neil.

> -----Original Message-----
> From: Graeme Fowler [mailto:graeme@graemef.net] 
> Sent: quarta-feira, 12 de Dezembro de 2007 13:51
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Help with AB and authentication
> 
> On Wed, 2007-12-12 at 11:30 +0000, Joel Carlos Martinho Alexandre (DSI)
> wrote:
>> I'm trying to use AB to benchmark a site within a IIS, but I'm having
>> problems with authentication.
>>
>> I'm currently using 
>>
>> ab2 -A domain\user:password url 
> 
> Try
> 
> ab2 -A domain\\user:password url
> 
> The command line thinks you're escaping the first character of the
> username since backslashed are used as escape markers. Pass a pair, and
> the first backslash escapes the second one, thus passing it to the
> application.
> 
> Alternatively, put the whole thing in single quotes:
> 
> 'domain\user:password' and see if ab takes that.


-- 
Neil Hillard                    neil.hillard@agustawestland.com
AgustaWestland                  http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
            views of Westland Helicopters Ltd.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Help with AB and authentication

Posted by "Joel Carlos Martinho Alexandre (DSI)" <jo...@caixaseguros.pt>.
I already tried that. 

Didn't work.

Maybe it's another thing.

With wget, i does 3 request just to get one page. The first two return
401 and only the third is giving a 200. Maybe ab, for some reason, isn't
trying enough times to authenticate.

In AB with verbose active, I can see it only tries one time.


 
Regards,
Joel

-----Original Message-----
From: Graeme Fowler [mailto:graeme@graemef.net] 
Sent: quarta-feira, 12 de Dezembro de 2007 13:51
To: users@httpd.apache.org
Subject: Re: [users@httpd] Help with AB and authentication

On Wed, 2007-12-12 at 11:30 +0000, Joel Carlos Martinho Alexandre (DSI)
wrote:
> I'm trying to use AB to benchmark a site within a IIS, but I'm having
> problems with authentication.
> 
> I'm currently using 
> 
> ab2 -A domain\user:password url 

Try

ab2 -A domain\\user:password url

The command line thinks you're escaping the first character of the
username since backslashed are used as escape markers. Pass a pair, and
the first backslash escapes the second one, thus passing it to the
application.

Alternatively, put the whole thing in single quotes:

'domain\user:password' and see if ab takes that.

Graeme


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Help with AB and authentication

Posted by Graeme Fowler <gr...@graemef.net>.
On Wed, 2007-12-12 at 11:30 +0000, Joel Carlos Martinho Alexandre (DSI)
wrote:
> I'm trying to use AB to benchmark a site within a IIS, but I'm having
> problems with authentication.
> 
> I'm currently using 
> 
> ab2 -A domain\user:password url 

Try

ab2 -A domain\\user:password url

The command line thinks you're escaping the first character of the
username since backslashed are used as escape markers. Pass a pair, and
the first backslash escapes the second one, thus passing it to the
application.

Alternatively, put the whole thing in single quotes:

'domain\user:password' and see if ab takes that.

Graeme


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org