users@glassfish.java.net

Re: JAAS, webapp and Glassfish v3 vs. tomcat?

From: Nithya Subramanian <Nithya.Subramanian_at_Sun.COM>
Date: Tue, 07 Apr 2009 22:32:35 +0530

In Glassfish, the advised way to implement a custom JAAS configuration
is to use custom realm:

You could take a look at
http://blogs.sun.com/nithya/entry/groups_in_custom_realms to start with.

If that does not address your issue, could you attach the .war file and
the error logs?

Thanks,
Nithya




Kristian Rink wrote:
> Folks;
>
> not completely sure where to peek here, I am experiencing the following
> situation: In a given project we're about to deploy a .war application that
> contains custom JAAS code along with custom configuration files, like this
> (log dumps taken locally when running in tomcat or jetty):
>
>
> [...]
> 06.04.2009 12:02:52 ...
> authenticate
> INFO: Added default JAAS configuration
> login.config.url.1=file:/home/kr/workspaces/prototype-clean/eclipse.security/data/default_jaas_config.txt
>
> 06.04.2009 12:02:52 authenticate
> ...
> INFO: Added JAAS configuration
> login.config.url.2=file:/home/kr/workspaces/prototype-clean/example.security.dialog/data/jaas_config.txt
>
> 06.04.2009 12:02:52
> ...
> authenticate
> INFO: Added JAAS configuration
> login.config.url.3=file:/home/kr/workspaces/prototype-clean/example.security.loginmodule/data/jaas_config.txt
> [...]
>
> While running in tomcat, this generally works; however, while deployed to a
> GFv3 server, the same application stops working throwing rather peculiar
> exceptions about parts of the JAAS configuration not to be found. Sorry this
> is rather fuzzy at the moment, but I am not sure where to really look as so
> far I am by no means a JAAS expert. Where could I start tracking this down,
> eventually?
>
> TIA and all the best,
> Kristian
>
>