[sork] Passwd backends

Peter Borg (horde) horde at peter-b.org
Thu Jan 27 09:27:56 PST 2005


I've recently installed Horde 3 and the various modules that are immediately
available for it.

In addition, because it's an essential tool for my users, I've picked up the
HEAD release of passwd from CVS to use it - seems to work fine for me!
However, I had to modify it to be able to use it successfully as my various
authentications require the full username (Auth::getAuth) as opposed to the
domain-stripped username (Auth::getBareAuth). I don't want users to be able
to enter the username for which they want to change the password, nor to
select the back-end.

I was considering submitting a patch for this, but the modification I've
made wouldn't necessarily suit everyone. Reviewing the options, I was
wondering what people's views are on this. Clearly, there's a need for a
parameter to control which type of username is presented to the user or
passed to the backend, but should this be global for all backends, or
backend specific. 

The first thought is to have an option that simply controls which type is
required, and have main.php test the option. But what if the user has the
option of selecting a back-end and different back-ends require different
types?

In which case, it seems fairly trivial to add an extra property to each
back-end definition in backends.php; require_full_username set to either
true or false would seem sensible.

However, this would require more changes to main.php, as here a back-end
list is generated, but the user id is collected on first call to main.php.
Therefore, some javascript would be required for each option in the back-end
select list to modify the userid input field accordingly.

Discuss?

(As an aside, I wasn't sure if anyone was working on passwd at the moment,
so wasn't sure which version to submit a patch for. Seems foolish to submit
a patch to HEAD if it's being worked on!)

Peter.


More information about the sork mailing list