You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Laurent FAILLIE <l_...@yahoo.com> on 2007/06/25 17:04:02 UTC

[users@httpd] Authentication agains database issue.

Dear all,

I running on an HP-UX 11.11 712 box, and I have
compiled apache 2.2.4 with GCC.
I have took mod_dbd.c from truck due to several bugs
in the version provided w/ 2.2.4.

I'm using the following configuration (it's only a
test up to now):

<Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch
IncludesNoExec Includes

AuthType Basic
AuthName "Test"
AuthBasicProvider dbd
Require valid-user
AuthDBDUserPWQuery "select passwd from test.comptes
where id = %s"
</Directory>

My database is the PostgreSQL 8.2.4, and test.comptes
tables as created as bellow :

CREATE TABLE test.comptes (
	id	TEXT PRIMARY KEY,
	passwd TEXT NOT NULL,
	max	bigint,
	admin boolean,
	superviseur boolean,
	status	TEXT,
	contact	TEXT
);

INSERT INTO test.comptes VALUES ('Test',
'1$Codv.WMAH7w', 1024, 'f', 'f', 1,
'nan@nowhere.com');

My problem is I have to enter 3 or 4 times my
credential each time apache is restarted, before being
accepted. (the user and password is saved in Firefox
password repository so I'm sure it's always the same
credential).
Each time, my error.log contains :

[Mon Jun 25 16:48:37 2007] [notice] Apache/2.2.4
(Unix) DAV/2 PHP/5.2.3 configured -- resuming normal
operations
[Mon Jun 25 16:49:01 2007] [error] [client
164.129.228.100] user Test: authentic
ation failure for "/~laurent/": Password Mismatch
[Mon Jun 25 16:49:09 2007] [error] [client
164.129.228.100] user Test: authentic
ation failure for "/~laurent/": Password Mismatch

I did following tests :

- When I restart only apache (w/o restarting my
browser), credentials are again rejected 4 or 5 times

- I restart only my browser, my credential is
requested once (it makes sens as the browser doesn't
have them in memory anymore).

Based on that, it seems the problem is located inside
the authentication engine. And as it's perfectly
working when authenticating against flat file
(.htpasswd), we can said it's somewhere in the
authentication against database chain.

Any tips or helps.

best regards,

Laurent


The misspelling master is on the Web.
   _________	100 % Dictionnary Free !
  /        /(
 /  Dico  / /	Pleins d'autres fautes sur
/________/ /	
(#######( /	http://destroyedlolo.homeunix.org
Quoi, des fautes d'orthographe! Pas possible ;-D.


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

---------------------------------------------------------------------
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] (Please help) Apache with forward proxy and https connections

Posted by Joshua Slive <jo...@slive.ca>.
On 6/25/07, Uday Kamath <UK...@dharbor.com> wrote:
> Hello
> 1. I have configured Apache (2.0.59) as forward proxy server using
> directives as below
>
> <IfModule mod_proxy.c>
> ProxyRequests On
> AllowCONNECT 80 7002 443
> <Proxy *>
>     Order deny,allow
>     Allow from all
>     AuthType Basic
>     AuthName "Password Required"
>     AuthUserFile "C:/Apache2.0/Apache2/passwords/password"
>     Require user joe
> </Proxy>
> </IfModule>
>
> 2. I have made my browser (Mozilla) always use http and https proxy as
> proxymachine:80 3. When I connect using http://URL I get Authentication
> dialog and when entered right I can see all calls in access.log 4. When
> I connect using https://URL I get Authetnication dialog and see only
> CONNECT call in access.log and it is successful (200). Rest of the
> access doesn't seem to happen in the access.log. Are calls going through
> proxy server? (As I turn off the proxy server calls fail) but I don't
> see any access.logs.

Disclaimer: my knowledge of this is purely theoretical (I have never
setup a forward proxy with apache).

To proxy https, the CONNECT methods simply sets up a tunnel between
the client and the origin server. All of the data traveling through
the tunnel is encrypted, so there is nothing to log other than
CONNECT.

Joshua.

---------------------------------------------------------------------
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


[users@httpd] (Please help) Apache with forward proxy and https connections

Posted by Uday Kamath <UK...@dharbor.com>.
Hello
1. I have configured Apache (2.0.59) as forward proxy server using
directives as below

<IfModule mod_proxy.c>
ProxyRequests On
AllowCONNECT 80 7002 443
<Proxy *>
    Order deny,allow
    Allow from all
    AuthType Basic
    AuthName "Password Required"
    AuthUserFile "C:/Apache2.0/Apache2/passwords/password"
    Require user joe
</Proxy>
</IfModule>

2. I have made my browser (Mozilla) always use http and https proxy as
proxymachine:80 3. When I connect using http://URL I get Authentication
dialog and when entered right I can see all calls in access.log 4. When
I connect using https://URL I get Authetnication dialog and see only
CONNECT call in access.log and it is successful (200). Rest of the
access doesn't seem to happen in the access.log. Are calls going through
proxy server? (As I turn off the proxy server calls fail) but I don't
see any access.logs. 

Can someone clarify? 
Appreciate any response to clarify this

Thanks
Uday


---------------------------------------------------------------------
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