users@glassfish.java.net

<realm> tag values in sun-application.xml

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Feb 2010 14:11:04 PST

<realm> tag values in sun-application.xml

GlassFish v.2.1.1

This is probably trivial, but like some posts I have already seen, I am having trouble getting glassfish to enter my custom loginmodule code. I have followed the instructions in the Deployment Guide and the various posts, and don't think I've missed anything. The loading of the custom realm does show up in the logs, and its init method is entered, so it does appear to be ready for business. But accessing EJBs remotely does not result in the custom loginmodule within this realm to be entered, although I do get an ugly CORBA permission exception in my remote logs.


So, I began trying to debug the issue myself. Are the EJBs in fact protected by the realm I chose? The first port of call was whether the <realm> tag in the sun-application.xml worked as expected, since that is the point where I am saying that these EJBs must be protected by that realm.

1. I placed a realm tag with a non-existent realm value in the sun-application.xml <realm>BLAHBLAHBLAH</realm>.

The purpose here was to have GlassFish complain that I can't protect my EJBs with a realm called BLAHBLAHBLAH because it does not exist. I placed the sun-application.xml in the META-INF directory of my EAR file and deployed. Silence! No complaints at all. No mention of BLAHBLAHBLAH in the logs, even with the security logging at FINEST. I then intentionally left of the ">" on one of the realm tags, and sure enough GlassFish complained about it as expected. So, sun-application.xml is being processed, and I guess we would have heard by now if it was not.

I do have a few more tests to carry out, since this may be a remote standalone client issue, but is there some other way to determine that this tag value is actually being used by GlassFish in my configuration?

Thanks

Joe
[Message sent by forum member 'teknomad' (joe.isaac_at_tolven.org)]

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