geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <>
Subject Re: Location of JAAS config file
Date Sat, 10 Jun 2006 15:07:48 GMT
In Geronimo, we don't use a JAAS conf file, but instead let you
declare and deploy security realms using a Geronimo deployment plan,
like many other components.  There is some special syntax for security
realms, though.

Basically, to create a realm called DatabaseRealm using the JAAS login
module DBLoginModule and the flag required, you could use a plan like
the one below.  Either you can deploy this plan with a JAR containing
the DBLoginModule class, or you could put the login module class in a
JAR in the Geronimo repository and then add a dependency on that JAR
to the environment element in the plan and deploy the plan on its own.

Another option is to add your security realm (the "gbean" element in
the plan below) directly to the Geronimo plan for a WAR or EAR or
something, and add the login module classes to that component (in
WEB-INF/lib or in an EJB JAR, etc.).  That way the realm would always
be deployed and undeployed with that module.


<module xmlns="">
    <gbean name="DatabaseRealm"
        <attribute name="realmName">DatabaseRealm</attribute>
        <reference name="ServerInfo">
        <reference name="LoginService">
        <xml-reference name="LoginModuleConfiguration">
                <login-module control-flag="REQUIRED"
server-side="true" wrap-principals="false">

                    <option name="...">..</option>
                    <option name="...">...</option>

On 6/10/06, Sunny Saxena <> wrote:
> My application deployed under gerenimo, uses JAAS for authentication. The
> login modules are picked up from a config file, example.conf.
> Generally in other app servers, I just add the system property,
> in the java execution path, and it works. But in gerenimo, it is unable to
> locate any login modules.
> The Error:
> No LoginModules
> configured for example
> File:
> example.conf:::
> example {
> com.test.DBLoginModule required;
> }
> Thanks
> **************** CAUTION - Disclaimer *****************
> solely for the use of the addressee(s). If you are not the intended
> recipient, please notify the sender by e-mail and delete the original
> message. Further, you are not to copy, disclose, or distribute this e-mail
> or its contents to any other person and any such actions are unlawful. This
> e-mail may contain viruses. Infosys has taken every reasonable precaution to
> minimize this risk, but is not liable for any damage you may sustain as a
> result of any virus in this e-mail. You should carry out your own virus
> checks before opening the e-mail or attachment. Infosys reserves the right
> to monitor and review the content of all messages sent to or from this
> e-mail address. Messages sent to or from this e-mail address may be stored
> on the Infosys e-mail system.
>  ***INFOSYS******** End of Disclaimer ********INFOSYS***

View raw message