O'Reilly logo

GateIn Cookbook by Piergiorgio Lucidi, Luca Stancapiano, Ken Finnigan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Securing with Tomcat

In this recipe, we will configure a JAAS realm using Tomcat 6.x.x/7.x.x.

Getting ready

Locate the declaration of the realm inside <PORTAL_WAR_ROOT>/META-INF/context.xml.

How to do it…

  1. Change the default configuration for your needs, as described in the previous recipe. The default configuration is the following:
    <Context path='/portal' docBase='portal' debug='0' 
      reloadable='true' crossContext='true' 
      privileged='true'>
      <Realm className=
       'org.apache.catalina.realm.JAASRealm'
             appName='gatein-domain' userClassNames= 'org.exoplatform.services.security.jaas.UserPrincipal' roleClassNames= 'org.exoplatform.services.security.jaas.RolePrincipal' debug='0' cache='false'/> <Valve className= 'org.apache.catalina.authenticator.FormAuthenticator' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required