users@glassfish.java.net

Re: Register custom realm

From: V B Kumar Jayanti <Vbkumar.Jayanti_at_Sun.COM>
Date: Mon, 18 Jun 2007 14:48:29 +0530

Hi ,

   Here are the steps for creating a Custom Realm :

1. Implement a Realm class which extends
com.sun.appserv.security.AppservRealm
2. Implement a JAAS LoginModule which extends
com.sun.appserv.security.AppservPasswordLoginModule
3. Copy the jar file containing new classes to $GF_HOME/lib
4. Put the loginModule info in login.conf
> Restart the server!
5. Create a custom realm in Admin Console

 From the steps you mention in your email, it appears you placed the
additional jars inside glassfish/lib/addons/

Can you instead just place the jars inside glassfish/lib and try. You
may not need the classpath-suffix entry as well.

Thanks.

glassfish_at_javadesktop.org wrote:

>Hi,
>
>i'm trying to use glassfish v2 b41d. But sadly i'm not able to use my custom realm, which worked under Glassfish v1.
>
>The steps i've done so far:
>
>- I've added to my domains/domain1/config/login.conf:
> databaseRealm {
> com.digitaldesigns.realms.jdbc.authmodule.DBLoginModule required;
> };
>
>- Using the gui, i've added the following entries to domains/domain1/config/domain.xml:
>
> <auth-realm
>classname="com.digitaldesigns.realms.jdbc.authmodule.DBRealm" name="databaseRealm">
> <property name="auth-type" value="databaseRealm"/>
> <property name="jaas-context" value="databaseRealm"/>
> </auth-realm>
>
> and:
>
> <java-config classpath-suffix="/home/arnie/Downloads/Java/glassfish/lib/addons/DBRealm.jar"
>
>The realm is using two class files (included in DBRealm.jar), which are not found during startup. I always get the following message:
>
>java.lang.ClassNotFoundException: com.digitaldesigns.realms.jdbc.authmodule.RealmGroup
>
>I really hope that somebody can help me.
>
>Greetings
>Arne
>[Message sent by forum member 'agessner' (agessner)]
>
>http://forums.java.net/jive/thread.jspa?messageID=222526
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>