You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Scott Chapman <sc...@mischko.com> on 2003/02/20 18:14:37 UTC

[users@httpd] Authentication config problem with DBI::Auth. Urgent help needed.

Hello,
I've posted this question to mod_perl's mailing list a couple times and 
received no answer.  Is there anyone here who can help me with this? This is 
the last piece in my implementation.  If anyone can help with how to debug 
this or what is wrong with my configuration, I'd really appreciate it!

I'm trying DBI::Auth against a Postgresql database for authentication.  It's 
not working.  My postgres debug log shows no activity.  I don't know how to 
debug this or what's wrong with it.

Error Log from Apache shows:
[Tue Feb 18 16:13:53 2003] [notice] Apache/1.3.27 (Unix) Embperl/2.0b8 
mod_perl/1.27 configured -- resuming normal operations
[Tue Feb 18 16:13:53 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Tue Feb 18 16:14:03 2003] [error] [client 192.168.0.121] client denied by 
server configuration: /www/htdocs/tester/index.html

Steps I went through to install the web server (RedHat 7.3):

installed Apache::AuthDBI from CPAN.  
Recompiled mod_perl and apache:
perl Makefile.PL DO_HTTPD=1 USE_APACI=1 APACHE_PREFIX=/www PERL_AUTHEN=1 
PERL_AUTHZ=1 PERL_CLEANUP=1 PERL_STACKED_HANDLERS=1
make/make install worked great.  Web server works. I can access Posgresql just 
fine using Perl DBI.

The .htaccess file in /www/htdocs/tester:
AuthType Basic
AuthName DBI
require user scott

Here's the relevant entries in my httpd.conf file:
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "/www/htdocs">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Deny from all
</Directory>
PerlModule Embperl
PerlSetEnv EMBPERL_SESSION_HANDLER_CLASS no
PerlSetEnv EMBPERL_DEBUG 10477
PerlSetEnv EMBPERL_DEBUG 0x7fffffff
PerlSetEnv EMBPERL_VIRTLOG /embperl/log
PerlSetEnv EMBPERL_OPTIONS 8208
PerlModule Embperl::Object
PerlModule Apache::DBI

<Location /embperl/log>
  SetHandler perl-script
  PerlHandler HTML::Embperl
  Options ExecCGI
</Location>

<Files *.epl>
        PerlSetEnv EMBPERL_APPNAME my_embperl_app
        PerlSetEnv EMBPERL_OBJECT_BASE base.epl
        PerlSetEnv EMBPERL_ESCMODE 0
        PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
        SetHandler perl-script
        PerlHandler Embperl::Object
        Options ExecCGI
</Files>

AddType text/html .epl
<Directory /www/cgi-bin/webcal>
AllowOverride AuthConfig
Options ExecCGI
</Directory>

PerlModule Apache::AuthDBI
PerlAuthzHandler  Apache::AuthDBI::authz
PerlAuthenHandler Apache::AuthDBI::authen
PerlSetVar Auth_DBI_data_source dbi:Pg:dbname=webautomation
PerlSetVar Auth_DBI_username webuser
PerlSetVar Auth_DBI_password password
PerlSetVar Auth_DBI_pwd_table users
PerlSetVar Auth_DBI_uid_field username
PerlSetVar Auth_DBI_pwd_field password
PerlSetVar Auth_DBI_grp_table groups
PerlSetVar Auth_DBI_grp_field groupname
PerlSetVar Auth_DBI_encrypted off

I'm obviously missing something but I don't know what.  I tried appending the 
statements above from PerlAuthzHandler down to my .htaccess file and removing 
them from here.  I get the same error message.

Thanks!
Scott


---------------------------------------------------------------------
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] Authentication config problem with DBI::Auth. Urgent help needed.

Posted by Scott Chapman <sc...@mischko.com>.
Got it working.  DBI related config was not the problem.  I had a problem 
with:

> > <Directory />
> >     Options FollowSymLinks
> >     AllowOverride None
> > </Directory>
> > <Directory "/www/htdocs">
> >     Options Indexes FollowSymLinks MultiViews
> >     AllowOverride All
> >     Order allow,deny
> >     Deny from all
> > </Directory>

The Deny from all was apparently giving the problem. 

Thanks for all your help!

Scott

On Thursday 20 February 2003 4:46 pm, Garth Winter Webb wrote:
Just for fun, try printing out the value of $Apache::AuthDBI::Debug
after Apache forks (ie, in a script someplace).

Also, if your request to a auth only directory is failing, you need to
know if its because of a miss-configured AuthDBI or another problem
earlier along in the line.  Replace the Apache::AuthDBI module in these
two lines:

PerlAuthzHandler  Apache::AuthDBI::authz
PerlAuthenHandler Apache::AuthDBI::authen

with one of your own:


PerlAuthzHandler  My::Pass::Through::authz
PerlAuthenHandler My::Pass::Through::authen

where My::Pass::Through looks something like:


package My::Pass::Through;

use Data::Dumper;
use Apache::Constants;

sub authz {
    print STDERR "AUTHZ ARGS = ", Data::Dumper::Dumper(\@_);
    return Apache::Constants::OK;
}

sub authen {
    print STDERR "AUTHEN ARGS = ", Data::Dumper::Dumper(\@_);
    return Apache::Constants::OK;
}

1;


Not only will you see if the arguments being passed to these methods
make sense, but since it returns OK you know that if the request is
rejected, there is a problem upstream of authz.


Garth


On Thu, 2003-02-20 at 09:50, Scott Chapman wrote:
> Garth,
> Thanks for the info here.  I did read the man page but I was skimming by the 
> time I got that far down.
> 
> I created a startup.pl script:
> 
> #!/usr/bin/perl 
> $Apache::AuthDBI::DEBUG=2;
> open  (dbug_fh, ">>/tmp/debug.txt");
> print dbug_fh "DBI DEBUG: $Apache::AuthDBI::DEBUG\n";
> close (dbug_fh) or die "Can't close $!";
> 
> and confirmed that it's being run and the variable is set to 2.
> 
> I still get exactly the same info in my error log after restarting apache.
> 
> It appears that Apache is never handing off control to DBI::Auth so it's 
never 
> getting far enough to give me any details?
> 
> Thanks again,
> Scott
> 
> On Thursday 20 February 2003 9:30 am, Garth Winter Webb wrote:
> Did you see this:
> 
>        To enable debugging the variable $Apache::AuthDBI::DEBUG
>        must be set. This can either be done in startup.pl or in
>        the user script. Setting the variable to 1, just reports
>        about a cache miss. Setting the variable to 2 enables full
>        debug output.
> 
> from the Apache::AuthDBI man page?
> 
> Garth
> 
> On Thu, 2003-02-20 at 09:14, Scott Chapman wrote:
> > Hello,
> > I've posted this question to mod_perl's mailing list a couple times and 
> > received no answer.  Is there anyone here who can help me with this? This 
is 
> > the last piece in my implementation.  If anyone can help with how to debug 
> > this or what is wrong with my configuration, I'd really appreciate it!
> > 
> > I'm trying DBI::Auth against a Postgresql database for authentication.  
It's 
> > not working.  My postgres debug log shows no activity.  I don't know how 
to 
> > debug this or what's wrong with it.
> > 
> > Error Log from Apache shows:
> > [Tue Feb 18 16:13:53 2003] [notice] Apache/1.3.27 (Unix) Embperl/2.0b8 
> > mod_perl/1.27 configured -- resuming normal operations
> > [Tue Feb 18 16:13:53 2003] [notice] Accept mutex: sysvsem (Default: 
sysvsem)
> > [Tue Feb 18 16:14:03 2003] [error] [client 192.168.0.121] client denied by 
> > server configuration: /www/htdocs/tester/index.html
> > 
> > Steps I went through to install the web server (RedHat 7.3):
> > 
> > installed Apache::AuthDBI from CPAN.  
> > Recompiled mod_perl and apache:
> > perl Makefile.PL DO_HTTPD=1 USE_APACI=1 APACHE_PREFIX=/www PERL_AUTHEN=1 
> > PERL_AUTHZ=1 PERL_CLEANUP=1 PERL_STACKED_HANDLERS=1
> > make/make install worked great.  Web server works. I can access Posgresql 
> just 
> > fine using Perl DBI.
> > 
> > The .htaccess file in /www/htdocs/tester:
> > AuthType Basic
> > AuthName DBI
> > require user scott
> > 
> > Here's the relevant entries in my httpd.conf file:
> > <Directory />
> >     Options FollowSymLinks
> >     AllowOverride None
> > </Directory>
> > <Directory "/www/htdocs">
> >     Options Indexes FollowSymLinks MultiViews
> >     AllowOverride All
> >     Order allow,deny
> >     Deny from all
> > </Directory>
> > PerlModule Embperl
> > PerlSetEnv EMBPERL_SESSION_HANDLER_CLASS no
> > PerlSetEnv EMBPERL_DEBUG 10477
> > PerlSetEnv EMBPERL_DEBUG 0x7fffffff
> > PerlSetEnv EMBPERL_VIRTLOG /embperl/log
> > PerlSetEnv EMBPERL_OPTIONS 8208
> > PerlModule Embperl::Object
> > PerlModule Apache::DBI
> > 
> > <Location /embperl/log>
> >   SetHandler perl-script
> >   PerlHandler HTML::Embperl
> >   Options ExecCGI
> > </Location>
> > 
> > <Files *.epl>
> >         PerlSetEnv EMBPERL_APPNAME my_embperl_app
> >         PerlSetEnv EMBPERL_OBJECT_BASE base.epl
> >         PerlSetEnv EMBPERL_ESCMODE 0
> >         PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
> >         SetHandler perl-script
> >         PerlHandler Embperl::Object
> >         Options ExecCGI
> > </Files>
> > 
> > AddType text/html .epl
> > <Directory /www/cgi-bin/webcal>
> > AllowOverride AuthConfig
> > Options ExecCGI
> > </Directory>
> > 
> > PerlModule Apache::AuthDBI
> > PerlAuthzHandler  Apache::AuthDBI::authz
> > PerlAuthenHandler Apache::AuthDBI::authen
> > PerlSetVar Auth_DBI_data_source dbi:Pg:dbname=webautomation
> > PerlSetVar Auth_DBI_username webuser
> > PerlSetVar Auth_DBI_password password
> > PerlSetVar Auth_DBI_pwd_table users
> > PerlSetVar Auth_DBI_uid_field username
> > PerlSetVar Auth_DBI_pwd_field password
> > PerlSetVar Auth_DBI_grp_table groups
> > PerlSetVar Auth_DBI_grp_field groupname
> > PerlSetVar Auth_DBI_encrypted off
> > 
> > I'm obviously missing something but I don't know what.  I tried appending 
> the 
> > statements above from PerlAuthzHandler down to my .htaccess file and 
> removing 
> > them from here.  I get the same error message.
> > 
> > Thanks!
> > Scott
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
-- 
Garth Winter Webb <ga...@perijove.com>

---------------------------------------------------------------------
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] Authentication config problem with DBI::Auth. Urgent help needed.

Posted by Garth Winter Webb <ga...@perijove.com>.
Just for fun, try printing out the value of $Apache::AuthDBI::Debug
after Apache forks (ie, in a script someplace).

Also, if your request to a auth only directory is failing, you need to
know if its because of a miss-configured AuthDBI or another problem
earlier along in the line.  Replace the Apache::AuthDBI module in these
two lines:

PerlAuthzHandler  Apache::AuthDBI::authz
PerlAuthenHandler Apache::AuthDBI::authen

with one of your own:


PerlAuthzHandler  My::Pass::Through::authz
PerlAuthenHandler My::Pass::Through::authen

where My::Pass::Through looks something like:


package My::Pass::Through;

use Data::Dumper;
use Apache::Constants;

sub authz {
    print STDERR "AUTHZ ARGS = ", Data::Dumper::Dumper(\@_);
    return Apache::Constants::OK;
}

sub authen {
    print STDERR "AUTHEN ARGS = ", Data::Dumper::Dumper(\@_);
    return Apache::Constants::OK;
}

1;


Not only will you see if the arguments being passed to these methods
make sense, but since it returns OK you know that if the request is
rejected, there is a problem upstream of authz.


Garth


On Thu, 2003-02-20 at 09:50, Scott Chapman wrote:
> Garth,
> Thanks for the info here.  I did read the man page but I was skimming by the 
> time I got that far down.
> 
> I created a startup.pl script:
> 
> #!/usr/bin/perl 
> $Apache::AuthDBI::DEBUG=2;
> open  (dbug_fh, ">>/tmp/debug.txt");
> print dbug_fh "DBI DEBUG: $Apache::AuthDBI::DEBUG\n";
> close (dbug_fh) or die "Can't close $!";
> 
> and confirmed that it's being run and the variable is set to 2.
> 
> I still get exactly the same info in my error log after restarting apache.
> 
> It appears that Apache is never handing off control to DBI::Auth so it's never 
> getting far enough to give me any details?
> 
> Thanks again,
> Scott
> 
> On Thursday 20 February 2003 9:30 am, Garth Winter Webb wrote:
> Did you see this:
> 
>        To enable debugging the variable $Apache::AuthDBI::DEBUG
>        must be set. This can either be done in startup.pl or in
>        the user script. Setting the variable to 1, just reports
>        about a cache miss. Setting the variable to 2 enables full
>        debug output.
> 
> from the Apache::AuthDBI man page?
> 
> Garth
> 
> On Thu, 2003-02-20 at 09:14, Scott Chapman wrote:
> > Hello,
> > I've posted this question to mod_perl's mailing list a couple times and 
> > received no answer.  Is there anyone here who can help me with this? This is 
> > the last piece in my implementation.  If anyone can help with how to debug 
> > this or what is wrong with my configuration, I'd really appreciate it!
> > 
> > I'm trying DBI::Auth against a Postgresql database for authentication.  It's 
> > not working.  My postgres debug log shows no activity.  I don't know how to 
> > debug this or what's wrong with it.
> > 
> > Error Log from Apache shows:
> > [Tue Feb 18 16:13:53 2003] [notice] Apache/1.3.27 (Unix) Embperl/2.0b8 
> > mod_perl/1.27 configured -- resuming normal operations
> > [Tue Feb 18 16:13:53 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
> > [Tue Feb 18 16:14:03 2003] [error] [client 192.168.0.121] client denied by 
> > server configuration: /www/htdocs/tester/index.html
> > 
> > Steps I went through to install the web server (RedHat 7.3):
> > 
> > installed Apache::AuthDBI from CPAN.  
> > Recompiled mod_perl and apache:
> > perl Makefile.PL DO_HTTPD=1 USE_APACI=1 APACHE_PREFIX=/www PERL_AUTHEN=1 
> > PERL_AUTHZ=1 PERL_CLEANUP=1 PERL_STACKED_HANDLERS=1
> > make/make install worked great.  Web server works. I can access Posgresql 
> just 
> > fine using Perl DBI.
> > 
> > The .htaccess file in /www/htdocs/tester:
> > AuthType Basic
> > AuthName DBI
> > require user scott
> > 
> > Here's the relevant entries in my httpd.conf file:
> > <Directory />
> >     Options FollowSymLinks
> >     AllowOverride None
> > </Directory>
> > <Directory "/www/htdocs">
> >     Options Indexes FollowSymLinks MultiViews
> >     AllowOverride All
> >     Order allow,deny
> >     Deny from all
> > </Directory>
> > PerlModule Embperl
> > PerlSetEnv EMBPERL_SESSION_HANDLER_CLASS no
> > PerlSetEnv EMBPERL_DEBUG 10477
> > PerlSetEnv EMBPERL_DEBUG 0x7fffffff
> > PerlSetEnv EMBPERL_VIRTLOG /embperl/log
> > PerlSetEnv EMBPERL_OPTIONS 8208
> > PerlModule Embperl::Object
> > PerlModule Apache::DBI
> > 
> > <Location /embperl/log>
> >   SetHandler perl-script
> >   PerlHandler HTML::Embperl
> >   Options ExecCGI
> > </Location>
> > 
> > <Files *.epl>
> >         PerlSetEnv EMBPERL_APPNAME my_embperl_app
> >         PerlSetEnv EMBPERL_OBJECT_BASE base.epl
> >         PerlSetEnv EMBPERL_ESCMODE 0
> >         PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
> >         SetHandler perl-script
> >         PerlHandler Embperl::Object
> >         Options ExecCGI
> > </Files>
> > 
> > AddType text/html .epl
> > <Directory /www/cgi-bin/webcal>
> > AllowOverride AuthConfig
> > Options ExecCGI
> > </Directory>
> > 
> > PerlModule Apache::AuthDBI
> > PerlAuthzHandler  Apache::AuthDBI::authz
> > PerlAuthenHandler Apache::AuthDBI::authen
> > PerlSetVar Auth_DBI_data_source dbi:Pg:dbname=webautomation
> > PerlSetVar Auth_DBI_username webuser
> > PerlSetVar Auth_DBI_password password
> > PerlSetVar Auth_DBI_pwd_table users
> > PerlSetVar Auth_DBI_uid_field username
> > PerlSetVar Auth_DBI_pwd_field password
> > PerlSetVar Auth_DBI_grp_table groups
> > PerlSetVar Auth_DBI_grp_field groupname
> > PerlSetVar Auth_DBI_encrypted off
> > 
> > I'm obviously missing something but I don't know what.  I tried appending 
> the 
> > statements above from PerlAuthzHandler down to my .htaccess file and 
> removing 
> > them from here.  I get the same error message.
> > 
> > Thanks!
> > Scott
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
-- 
Garth Winter Webb <ga...@perijove.com>

---------------------------------------------------------------------
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] Authentication config problem with DBI::Auth. Urgent help needed.

Posted by Scott Chapman <sc...@mischko.com>.
Garth,
Thanks for the info here.  I did read the man page but I was skimming by the 
time I got that far down.

I created a startup.pl script:

#!/usr/bin/perl 
$Apache::AuthDBI::DEBUG=2;
open  (dbug_fh, ">>/tmp/debug.txt");
print dbug_fh "DBI DEBUG: $Apache::AuthDBI::DEBUG\n";
close (dbug_fh) or die "Can't close $!";

and confirmed that it's being run and the variable is set to 2.

I still get exactly the same info in my error log after restarting apache.

It appears that Apache is never handing off control to DBI::Auth so it's never 
getting far enough to give me any details?

Thanks again,
Scott

On Thursday 20 February 2003 9:30 am, Garth Winter Webb wrote:
Did you see this:

       To enable debugging the variable $Apache::AuthDBI::DEBUG
       must be set. This can either be done in startup.pl or in
       the user script. Setting the variable to 1, just reports
       about a cache miss. Setting the variable to 2 enables full
       debug output.

from the Apache::AuthDBI man page?

Garth

On Thu, 2003-02-20 at 09:14, Scott Chapman wrote:
> Hello,
> I've posted this question to mod_perl's mailing list a couple times and 
> received no answer.  Is there anyone here who can help me with this? This is 
> the last piece in my implementation.  If anyone can help with how to debug 
> this or what is wrong with my configuration, I'd really appreciate it!
> 
> I'm trying DBI::Auth against a Postgresql database for authentication.  It's 
> not working.  My postgres debug log shows no activity.  I don't know how to 
> debug this or what's wrong with it.
> 
> Error Log from Apache shows:
> [Tue Feb 18 16:13:53 2003] [notice] Apache/1.3.27 (Unix) Embperl/2.0b8 
> mod_perl/1.27 configured -- resuming normal operations
> [Tue Feb 18 16:13:53 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
> [Tue Feb 18 16:14:03 2003] [error] [client 192.168.0.121] client denied by 
> server configuration: /www/htdocs/tester/index.html
> 
> Steps I went through to install the web server (RedHat 7.3):
> 
> installed Apache::AuthDBI from CPAN.  
> Recompiled mod_perl and apache:
> perl Makefile.PL DO_HTTPD=1 USE_APACI=1 APACHE_PREFIX=/www PERL_AUTHEN=1 
> PERL_AUTHZ=1 PERL_CLEANUP=1 PERL_STACKED_HANDLERS=1
> make/make install worked great.  Web server works. I can access Posgresql 
just 
> fine using Perl DBI.
> 
> The .htaccess file in /www/htdocs/tester:
> AuthType Basic
> AuthName DBI
> require user scott
> 
> Here's the relevant entries in my httpd.conf file:
> <Directory />
>     Options FollowSymLinks
>     AllowOverride None
> </Directory>
> <Directory "/www/htdocs">
>     Options Indexes FollowSymLinks MultiViews
>     AllowOverride All
>     Order allow,deny
>     Deny from all
> </Directory>
> PerlModule Embperl
> PerlSetEnv EMBPERL_SESSION_HANDLER_CLASS no
> PerlSetEnv EMBPERL_DEBUG 10477
> PerlSetEnv EMBPERL_DEBUG 0x7fffffff
> PerlSetEnv EMBPERL_VIRTLOG /embperl/log
> PerlSetEnv EMBPERL_OPTIONS 8208
> PerlModule Embperl::Object
> PerlModule Apache::DBI
> 
> <Location /embperl/log>
>   SetHandler perl-script
>   PerlHandler HTML::Embperl
>   Options ExecCGI
> </Location>
> 
> <Files *.epl>
>         PerlSetEnv EMBPERL_APPNAME my_embperl_app
>         PerlSetEnv EMBPERL_OBJECT_BASE base.epl
>         PerlSetEnv EMBPERL_ESCMODE 0
>         PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
>         SetHandler perl-script
>         PerlHandler Embperl::Object
>         Options ExecCGI
> </Files>
> 
> AddType text/html .epl
> <Directory /www/cgi-bin/webcal>
> AllowOverride AuthConfig
> Options ExecCGI
> </Directory>
> 
> PerlModule Apache::AuthDBI
> PerlAuthzHandler  Apache::AuthDBI::authz
> PerlAuthenHandler Apache::AuthDBI::authen
> PerlSetVar Auth_DBI_data_source dbi:Pg:dbname=webautomation
> PerlSetVar Auth_DBI_username webuser
> PerlSetVar Auth_DBI_password password
> PerlSetVar Auth_DBI_pwd_table users
> PerlSetVar Auth_DBI_uid_field username
> PerlSetVar Auth_DBI_pwd_field password
> PerlSetVar Auth_DBI_grp_table groups
> PerlSetVar Auth_DBI_grp_field groupname
> PerlSetVar Auth_DBI_encrypted off
> 
> I'm obviously missing something but I don't know what.  I tried appending 
the 
> statements above from PerlAuthzHandler down to my .htaccess file and 
removing 
> them from here.  I get the same error message.
> 
> Thanks!
> Scott
> 
> 
> ---------------------------------------------------------------------
> 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
-- 
Garth Winter Webb <ga...@perijove.com>

---------------------------------------------------------------------
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] Authentication config problem with DBI::Auth. Urgent help needed.

Posted by Garth Winter Webb <ga...@perijove.com>.
Did you see this:

       To enable debugging the variable $Apache::AuthDBI::DEBUG
       must be set. This can either be done in startup.pl or in
       the user script. Setting the variable to 1, just reports
       about a cache miss. Setting the variable to 2 enables full
       debug output.

from the Apache::AuthDBI man page?

Garth

On Thu, 2003-02-20 at 09:14, Scott Chapman wrote:
> Hello,
> I've posted this question to mod_perl's mailing list a couple times and 
> received no answer.  Is there anyone here who can help me with this? This is 
> the last piece in my implementation.  If anyone can help with how to debug 
> this or what is wrong with my configuration, I'd really appreciate it!
> 
> I'm trying DBI::Auth against a Postgresql database for authentication.  It's 
> not working.  My postgres debug log shows no activity.  I don't know how to 
> debug this or what's wrong with it.
> 
> Error Log from Apache shows:
> [Tue Feb 18 16:13:53 2003] [notice] Apache/1.3.27 (Unix) Embperl/2.0b8 
> mod_perl/1.27 configured -- resuming normal operations
> [Tue Feb 18 16:13:53 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
> [Tue Feb 18 16:14:03 2003] [error] [client 192.168.0.121] client denied by 
> server configuration: /www/htdocs/tester/index.html
> 
> Steps I went through to install the web server (RedHat 7.3):
> 
> installed Apache::AuthDBI from CPAN.  
> Recompiled mod_perl and apache:
> perl Makefile.PL DO_HTTPD=1 USE_APACI=1 APACHE_PREFIX=/www PERL_AUTHEN=1 
> PERL_AUTHZ=1 PERL_CLEANUP=1 PERL_STACKED_HANDLERS=1
> make/make install worked great.  Web server works. I can access Posgresql just 
> fine using Perl DBI.
> 
> The .htaccess file in /www/htdocs/tester:
> AuthType Basic
> AuthName DBI
> require user scott
> 
> Here's the relevant entries in my httpd.conf file:
> <Directory />
>     Options FollowSymLinks
>     AllowOverride None
> </Directory>
> <Directory "/www/htdocs">
>     Options Indexes FollowSymLinks MultiViews
>     AllowOverride All
>     Order allow,deny
>     Deny from all
> </Directory>
> PerlModule Embperl
> PerlSetEnv EMBPERL_SESSION_HANDLER_CLASS no
> PerlSetEnv EMBPERL_DEBUG 10477
> PerlSetEnv EMBPERL_DEBUG 0x7fffffff
> PerlSetEnv EMBPERL_VIRTLOG /embperl/log
> PerlSetEnv EMBPERL_OPTIONS 8208
> PerlModule Embperl::Object
> PerlModule Apache::DBI
> 
> <Location /embperl/log>
>   SetHandler perl-script
>   PerlHandler HTML::Embperl
>   Options ExecCGI
> </Location>
> 
> <Files *.epl>
>         PerlSetEnv EMBPERL_APPNAME my_embperl_app
>         PerlSetEnv EMBPERL_OBJECT_BASE base.epl
>         PerlSetEnv EMBPERL_ESCMODE 0
>         PerlSetEnv EMBPERL_FILESMATCH "\.epl$"
>         SetHandler perl-script
>         PerlHandler Embperl::Object
>         Options ExecCGI
> </Files>
> 
> AddType text/html .epl
> <Directory /www/cgi-bin/webcal>
> AllowOverride AuthConfig
> Options ExecCGI
> </Directory>
> 
> PerlModule Apache::AuthDBI
> PerlAuthzHandler  Apache::AuthDBI::authz
> PerlAuthenHandler Apache::AuthDBI::authen
> PerlSetVar Auth_DBI_data_source dbi:Pg:dbname=webautomation
> PerlSetVar Auth_DBI_username webuser
> PerlSetVar Auth_DBI_password password
> PerlSetVar Auth_DBI_pwd_table users
> PerlSetVar Auth_DBI_uid_field username
> PerlSetVar Auth_DBI_pwd_field password
> PerlSetVar Auth_DBI_grp_table groups
> PerlSetVar Auth_DBI_grp_field groupname
> PerlSetVar Auth_DBI_encrypted off
> 
> I'm obviously missing something but I don't know what.  I tried appending the 
> statements above from PerlAuthzHandler down to my .htaccess file and removing 
> them from here.  I get the same error message.
> 
> Thanks!
> Scott
> 
> 
> ---------------------------------------------------------------------
> 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
-- 
Garth Winter Webb <ga...@perijove.com>

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