Re: [users@httpd] Authorization in Apache 2.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/14/06, Nick Kew <nick@xxxxxxxxxxxx> wrote:
On Monday 14 August 2006 20:44, alan bryan wrote:
> I'm trying to set up some sort of basic authentication in Apache
> 2.2authenticating against a PostgreSQL
> 8.1 database.
>
> Has anyone been able to successfully get the new mod_authn_dbd to work on
> FreeBSD?

Of course:-)


Thanks for responding.

Any hints as to how?  I installed ports/apache22.  What compile time options are needed to make this work?
I tried "WITH_PGSQL=YES WITH_CUSTOM_AUTH=dbd" and that didn't seem to do it.  When using the example config from http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html    I get the following errors:
[crit] (70023)This function has not been implemented on this platform: DBD: failed to initialise
That's what made me question if anyone has been able to get it to work on FreeBSD.   Either something was missed when I compiled or this is actually not a valid combination (apache2.2, postgresql8.1, FreeBSD 6.1). 

 

> I've also tried mod_auth_pgsql which compiles fine but I get the error:
> "No Authn provider configured"
> when I run it using the same .htaccess that works fine in Apache 2.0.

That looks like mod_auth_basic getting in before it.

How do I specify the order so that mod_auth_basic doesn't get in before it?  The examples on the mod_auth_pgsql site show that you should set the AuthType to basic - I tried it both at the top and bottom of my .htaccess file with the same results.  Is this something where I need to change the order the modules are loaded in httpd.conf?

 

And you really shouldn't tr and run any SQL-based authentication
from .htaccess.  mod_authn_dbd won't let you (it would be a security
risk to let .htaccess users specify their own SQL query to be executed
by the server), and using .htaccess is not compatible with efficient
usage of SQL.


I understand.  When I tried the mod_authn_dbd as per the example on apache.org I got the error described above about it not being implemented on this platform and that wasn't in a .htaccess.  I am trying .htaccess for mod_auth_pgsql as it's worked like that before.  I don't think this is the cause of the current error though.

> So, any ideas to fix the above issues or get some other way to get basic
> auth to work on 2.2?

You'd need to me more specific about what doesn't work for you.


Hopefully the above is more specific.  Additionally here's my .htaccess for using mod_auth_pgsql that works fine in apache 2.0 but not 2.2:
 
AuthName "Administration Area"
AuthType basic

Auth_PG_host localhost
Auth_PG_port 5432
Auth_PG_encrypted on
Auth_PG_user username
Auth_PG_database dbname
Auth_PG_pwd_table users
Auth_PG_uid_field username
Auth_PG_pwd_field password

require user username

Thanks again,
Alan


--
Nick Kew

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux