Topics

Archives

Handy References


« | Main | »

Configuring authnz_external and pwauth

By Matt | November 3, 2008

This is a newer and seems to be more secure way to authenticate in Apache with the Linux user database then mod_pam.

– CentOS 5
– Subversion was already installed by default.
– yum install mod_dav_svn.x86_64 to add in Apache support for it.

Ok, need mod_authnz_external to support unix passwords via Apache 2.2
This is more secure then mod_auth_pam:

wget http://unixpapa.com/software/mod_authnz_external-3.1.0.tar.gz
tar -xvf mod_authnz_external-3.1.0.tar.gz

prereq: yum install httpd-devel.x86_64

cd mod_authnz_external-3.1.0

/usr/sbin/apxs -c mod_authnz_external.c
/usr/sbin/apxs -i -a mod_authnz_external.la

Ok, now need pwauth:
wget http://www.unixpapa.com/software/pwauth-2.3.6.tar.gz
tar -xvf pwauth-2.3.6.tar.gz
cd pwauth-2.3.6

**IMPORTANT**:
vi config.h
— change SERVER_UIDS as appropriate. In this case 48, 500 (apache and ******). These are the users, along with root, allowed to run the program!
make
cp pwauth /usr/local/bin/.

In /etc/httpd/conf.d/ssl.conf under the ****** vhost:
AddExternalAuth pwauth /usr/local/bin/pwauth
SetExternalAuthMethod pwauth pipe

In subversion.conf, or where appropriate:
AuthType Basic
AuthBasicProvider external
AuthExternal pwauth
AuthName “Use your ****** credentials”
# AuthzSVNAccessFile /code_repos/access.list
Require valid-user

Topics: Uncategorized | No Comments »

Comments

You must be logged in to post a comment.