users@glassfish.java.net

Re: JAAS UnixLoginModule as web app authentication realm

From: <glassfish_at_javadesktop.org>
Date: Mon, 28 Apr 2008 13:02:51 PDT

> Hi,
>
> I've just seen a similar message on this list, so
> here's my question:
>
> We'd like to use a "Unix realm" in glassfish to
> control access to our
> web application running in glassfish.
> To be specific, I'd like people to be able to sign in
> with the same
> unix usernames and passwords they use to access the
> Linux machine
> Glassfish runs on.
> I have read about a certain UnixLoginModule[1], but I
> can't use it as
> an authentication realm[2] in Glassfish. I can only
> choose
> SolarisRealm, supposedly deprecated since 1.4 [3]
>
> Am I really the first one to need this?
> What would be the best way to achieve it?

It probably would be simplest to clone/port the SolarisRealm and the SolarisLoginModule. Most of the work is done in the realm; which relies on native calls.
see appserv-native/src/cpp/solaris/solarisauth.c

Ron

take care not to cause the effective id of the appserver process to be changed by the
authentication.

>
>
> Thanks in advance!
>
> Gabor Szokoli
>
> [1]
> http://java.sun.com/j2se/1.5.0/docs/guide/security/jaa
> s/spec/com/sun/security/auth/module/UnixLoginModule.ht
> ml
>
> [2]
> https://glassfish.dev.java.net/javaee5/security/faq.ht
> ml#pluglogin
>
> [3]
> http://java.sun.com/j2se/1.5.0/docs/guide/security/jaa
> s/JAASRefGuide.html#Deprecated
>
> ------------------------------------------------------
> ---------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail:
> users-help_at_glassfish.dev.java.net
[Message sent by forum member 'monzillo' (monzillo)]

http://forums.java.net/jive/thread.jspa?messageID=271880