Title: JAAS and TomEE # Purpose You want to use JAAS in TomEE with custom (or OpenEJB) LoginModules. # Solution TomEE tries to keep as possible as it is Tomcat so simply configure your JAAS LoginModule as in Tomcat. Note: only the first one will be used. # Configuration Add to your `CATALINA_OPTS` the `java.security.auth.login.config` system property: -Djava.security.auth.login.config=$CATALINA_BASE/conf/login.config Configure your realm in server.xml file Configure your `login.config` file PropertiesLogin { org.apache.openejb.core.security.jaas.PropertiesLoginModule required Debug=false UsersFile="users.properties" GroupsFile="groups.properties"; }; Configure your login module specifically (`users.properties` for snippets of this page for instance). Place `users.properties` and `groups.properties` files in `$CATALINA_BASE/conf/` folder. `users.properties` file contains user name and associated password entries, ex.: me=password tomee=tomee `groups.properties` file specifies groups and their users, ex.: my-role=me manager-gui=tomee,me tomee-admin=tomee **NOTE**: `users.properties` and `groups.properties` file names and file location are fixed. If other names are used, the files must be placed in `%CATALINA_BASE/lib/` folder instead.