Re: Problems with virtual hosts and principal names
Henry B. Hotz <hotz <at> jpl.nasa.gov>
2008-09-18 18:15:13 GMT
On Sep 18, 2008, at 3:18 AM, Tuomas wrote:
> Hi!
>
> I have a problem with mod_auth_kerb on a server that has several
> virtual
> hosts. My server is Linux/Apache and a Windows Active Directory is
> used
> as a KDC. I have enabled negotiate authentication and most of the time
> it's working great.
>
> The problem is that occasionally clients try to obtain ticket for
> HTTP/virtual.host.name instead of HTTP/real.server.name from AD
> server.
> I managed to circulate that problem in AD by adding also the virtual
> host principal names into AD configuration (using c:\>setspn -a
> HTTP/virtual.host.name unixaccount). Now the problem is that I have
> only
> key for principal HTTP/real.server.name in my keytab (created with
> c:\>ktpass -princ HTTP/real.server.name <at> REALM.NAME -mapuser
> unixaccount
> -pass topsecret -out krb5.keytab).
>
> At the moment I'm completely stuck with this problem. I already have
> installed mod_auth_kerb with a patch for accepting multiple principals
> in a keytab
>
(http://sourceforge.net/tracker/index.php?func=detail&aid=1809998&group_id=51775&atid=464526
> )
> but I'm not able to create the keytable.
>
> Could someone help me with this?
>
> Cheers,
> Tuomas
OK, sounds like you know how to create individual keytab files for
each of the principals in question. You can merge them as needed as
follows.
Assumptions: MIT or Sun Kerberos installed (Heimdal ktutil works
differently but can still do the job). You have the individual keytab
files created as name1.keytab, name2.keytab, etc.
ktutil
rkt name1.keytab
rkt name2.keytab
rkt name3.keytab
. . .
wkt web.keytab
q
chown web web.keytab # use the real web server account name if it's
not "web"
Now move web.keytab where it belongs for the web server.
------------------------------------------------------
The opinions expressed in this message are mine,
not those of Caltech, JPL, NASA, or the US Government.
Henry.B.Hotz <at> jpl.nasa.gov, or hbhotz <at> oxy.edu
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/