PATCHES: Allow RT to authenticate against PAM (updated)

Hi all

(For those on -devel, this is essentially the same post as late last
week but with minor changes)

PAM - Index of /pub/linux/libs/pam/ - can authenticate
against a multitude of sources (backends) - an LDAP system, Active
Directory, Kerberos, local passwd/shadow files, a separate MySQL
instance… you name it, it’s probably got a module for it somewhere.
This will allow RT admins to use a flexible authentication source
without having to modify RT beyond a couple of configuration options.

The changes made are principally to the “IsPassword” function in
lib/RT/ such that it can use PAM to check a password, can
use the RT database to check a password, or fall through from PAM to
database if PAM fails.

Additionally, if PAM succeeds and the RT database differs from that
password, there’s the option to set the RT password (thus keeping them
in sync).

In combination, if the PAM source goes away, the system can still
authenticate against the RT database using the most recently successful
PAM password. It’s possible to turn off the password change and fallback
options, too.

There are both changes to and some additional sections to Some of the logging statements could be changed (it’s
a bit verbose at the moment) but otherwise it’s all as functional as it
can be.

The array defining modules (see below) currently contains one module
name - rt-krb5-auth - but can contain several in order to authenticate
against multiple backends.

NOTE: Any module name passed in this way containing the word “dummy” is
skipped - it’s there purely for reference, to see that the code looped
as I wanted it to.

We now have this in production for our support staff within the
department and several other University departments without error.

The example pam.d file included here is for authentication against an
AD. You could just as easily test against the local system, or something
else, given the right config.

Please feel free to give this a try (where relevant). If anyone needs a
hand making PAM fire off against an AD, please feel free to contact me
off list - there’s a bit of extra config to make Kerberos work properly.

Graeme Fowler
Team Manager (ISSS), Computing Services
Loughborough University -
T: +44 1509 228226

rt-krb5-auth.patch (197 Bytes) (2.52 KB) (1.39 KB)

Hi again

Poke poke :)On Thu, 2007-11-29 at 17:47 +0000, Graeme Fowler wrote:

Please feel free to give this a try (where relevant).

Bad form, replying to my own post… I’d just like to see if anyone did
try this authentication method (or intends to).

We’ve been happily using it in production since I posted with no
problems at all.


Graeme Fowler wrote:

I’d just like to see if anyone did
try this authentication method (or intends to).

Actually, I’m hoping to give this patch a try soon. So there is interest
in the patch, at least from me.