Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 277348 - www-apache/mod_authn_pam does not support "Require group"
Summary: www-apache/mod_authn_pam does not support "Require group"
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: Pending Removal: 2013-01-25
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2009-07-10 19:51 UTC by Adam Randall
Modified: 2013-02-10 08:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Randall 2009-07-10 19:51:05 UTC
Unless I am missing something obvious, www-apache/mod_authn_pam does not support anything but valid-user in the Require directive. In migrating from mod_auth_pam to mod_authn_pam I cannot authenticate users against a specific group. This makes things very insecure as we need to control user access.

With www-apache/mod_auth_pam being removed from Gentoo in August, 2009, this means my only option is to use mod_authn_pam.

I absolutely have to have this work.

Reproducible: Always

Steps to Reproduce:
Configure a site to use mod_authn_pam. Here is an example:

AuthBasicAuthoritative Off
AuthType Basic
AuthName "PAM Login"
AuthBasicProvider pam
Require pam-group admingroup

"admingroup" would be in the /etc/groups file on the system.
Actual Results:  
The error log fills with this line:

access to /my_view_page.php failed, reason: require directives present and no Authoritative handler.

Expected Results:  
The user should be able to log in based on the group that they are in.

Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.20.7 i686)
=================================================================
System uname: Linux-2.6.20.7-i686-Intel-R-_Xeon-TM-_CPU_3.60GHz-with-glibc2.0
Timestamp of tree: Fri, 10 Jul 2009 05:00:02 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r3
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=nocona -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://192.168.0.157/gentoo-portage"
USE="acl apache2 bash-completion berkdb bzip2 cli cracklib crypt ctype cups curl dri fortran gd gdbm gif gpm iconv imagemagick ipv6 isdnlog jpeg midi mudflap mysql ncurses nls nptl nptlonly openmp pam pcre pdf perl png postgres pppd python readline reflection samba session simplexml snmp sockets spl ssl sysfs tcpd threads tiff unicode vim-syntax x86 xml xorg zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Adam Randall 2009-07-10 23:30:03 UTC
I did more digging, and found out that the "Require group" is handled by mod_auth_sys_group.so, which is installed with mod_auth_pam. It seems that if this module is present and loaded that mod_authn_pam will also work as expected.
Comment 2 Daniel Westermann-Clark 2011-05-04 13:19:55 UTC
I've created an ebuild based on the Debian package:

https://github.com/dwc/dwc-overlay/tree/master/www-apache/mod_auth_pam

I know the module is outdated but it does work on Apache 2.2.
Comment 4 Pacho Ramos gentoo-dev 2013-02-10 08:02:22 UTC
dropped