tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geofrey rainey <>
Subject Re: JAAS Realm Authentication with Kerberos
Date Wed, 02 Jun 2010 02:12:50 GMT
Right, so let me get this straight; Presently the KerberosLoginModule saves
the role information (defined as user@realm) as a Principal which is then
compared against the literal string defined in web.xml. So what you're
suggesting is modify the KerberosLoginModule so that, essentially, the
credentials saved in the (Role) Principal should reflect exactly what's in
(under the Role) web.xml?

thank you for your help.

On Tue, Jun 1, 2010 at 11:56 PM, dB. <> wrote:

> If you look at the KerberosLoginModule code, it wants to be modified to
> retrieve roles from somewhere in your system. For example a user database
> that says that user@realm is "manager". Then you can say <auth-constraint>
> ... manager </> in web.xml rather than user@realm. Listing individual
> users clearly isn't practical.
> Any authenticated user will be a member of "Everyone" or
> "DOMAIN\Authenticated Users" or "DOMAIN\Users", etc.
> If you are using Active Directory on Windows, you're probably not getting
> what you want with Kerberos alone. To use web.xml for authorization, you
> want something like roles = AD groups (and local groups). Retrieving user
> groups by name from AD is going to yield the wrong result in any kind of
> real world deployment - you will have hard time getting nested groups or
> anything from trusted domains.
> If you're running on Windows and your goal is single sign-on, you may want
> to try There're several options, including a
> login filter and a JAAS authenticator. All use SSPI to login (will do
> Kerberos and NTLM) and will return not just the user identity, but the user
> local and domain groups.
> Hope this helps,
> -dB.
> dB. @
> Moscow|Geneva|Seattle|New York
> -----Original Message-----
> From: geofrey rainey []
> Sent: Tuesday, June 01, 2010 4:05 AM
> To:
> Subject: JAAS Realm Authentication with Kerberos
> Hello,
> I've been following this fairly self-explanatory document on Kerberos
> authentication against an AD. If I hard-code the user@realm in the web.xml
> file, authentication is successful. However obviously what one really wants
> is the actual user credentials as stored in the Principals class,
>, in the web.xml for each
> Subject authenticating, but I'm a bit lost as to how to get that
> information
> from the class into the web.xml. Any ideas would be appreciated?
>   (
> )
> <auth-constraint>
>          <role-name>user@realm</role-name>
>  </auth-constraint>
> Regards,
> Geofrey.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message