Вопрос

I understood all three JAAS Elements:

  1. JAAS Client
  2. Login Module
  3. JAAS Config file

But I am confused where/how to change tomcat Context to Glassfish context.
Current Tomcat Context :

<Context path="/admin/sso" reloadable="true">
    <Realm className="org.apache.catalina.realm.JAASRealm" appName="BytesLoungeLogin"
        userClassNames="test.jaas.UserPrincipal" roleClassNames="test.jaas.RolePrincipal" />
</Context>

I found glassfish's JDBCRealm and LDAPRealm classes but there is no JAASRealm class.

Это было полезно?

Решение

The configuration of Glassfish is differing from Tomcat and you will not find JAASRealm class. From the link: http://glassfish.java.net/javaee5/security/faq.html#pluglogin:

The GlassFish authentication subsystem is built upon realm and the standard Java JAAS framework - you can write your own realm and JAAS login module, and plug it into GlassFish. In the current implementation of GlassFish, your realm and JAAS module needs to be derived from com.sun.appserv.security.AppservRealm and com.sun.appserv.security.AppservPasswordLoginModule respectively. You can configure a realm and JAAS module by modifying the config/domain.xml file (adding your realm configuration information there) and config/login.conf file (adding your login module there) respectively.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top