gutsy does not have a working apache+mysql authentication solution

Bug #150651 reported by Mrts
6
Affects Status Importance Assigned to Milestone
Debian
Fix Released
Unknown
apr-util (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: libaprutil1

As of Mon Oct 8 17:08:24 EEST 2007, there is no working solution to authenticate with mysql from apache. This is a serious problem that might hinder migration to gutsy in many sites.

I have to file this bug against two packages as there are two possible solutions for mysql authentication, *neither of which work*:
1 [DEPRECATED] libapache2-mod-auth-mysql
doesn't honour the AuthBasicAuthoritative Off directive and doesn't work (see detailed report at bug #150649)
2 [RECOMMENDED by Apache Foundation] mod_authn_dbd
(http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html) -- libapr1 doesn't contain a mysql driver, being entirely unusable. Details follow.

Versions:
-------------
Updated Gutsy beta release.

apache2-mpm-prefork 2.2.4-3build1
libaprutil1 1.2.7+dfsg-2build1

Setup:
-------------

a2enmod authn_dbd

virtual host conf:
        DBDriver mysql
        DBParams host=localhost, user=authtestuser, pass=something, dbname=apache_auth_test

        <Location /dbdauth>
                AuthName "dbd-auth test"
                AuthType Basic

                AuthBasicProvider dbd
                AuthDBDUserPWQuery "select passwd from auth where username = %s"

                Require valid-user
        </Location>

db setup:
DROP database IF EXISTS apache_auth_test;

create database apache_auth_test;

use apache_auth_test;

create table auth ( username char(25) not null,
        passwd char(25), primary key (username) );

insert into auth values ('somebody', PASSWORD('random'));

grant all privileges on apache_auth_test.* to authtestuser@localhost identified by 'authtestpassword';

Result:
-------------

Apache doesn't start, complaining:
Syntax error on line 37 of /etc/apache2/sites-enabled/000-default:
DBD: No driver for mysql
   ...fail!

Conclusion:
-------------

mysql driver is missing from libaprutils. See also Debian bug #405773

Tags: gutsy
Mrts (mrts)
description: updated
Revision history for this message
Craig (candrews-integralblue) wrote :

This bug is still valid in Hardy - I can't believe no one else has a problem with this. Any news on this front?

Revision history for this message
Matteo Sasso (matteo-sasso) wrote :

I have the same problem, it would really be nice if it could be fixed.

Revision history for this message
Jan Van Buggenhout (chipzz) wrote :

The MySQL driver is not distributed from apache.org due to licensing issues.

If you wish to build the driver, download apr_dbd_mysql.c from
http://apache.webthing.com/database/
and copy it into the dbd directory.
Now run buildconf, followed by configure.

It is distributed under the GPL to conform with MySQL License terms
This means it cannot be distributed from apache.org, as that would
violate ASF policy.

Using the driver with APR and Apache is of course allowed,
and there is no problem with a third party bundling the driver,
provided you respect both the ASF and GPL licenses.

http://svn.apache.org/viewvc/apr/apr-util/trunk/INSTALL.MySQL?view=markup&pathrev=371029

I suppose that last paragraph can be read as a permission to ship the MySQL DBD driver?

Revision history for this message
David Futcher (bobbo) wrote :

Fixed in 1.2.12+dfsg-7, which has been auto-synced from Debian.

Changed in apr-util:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.