You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2012/01/18 21:21:47 UTC
svn commit: r1233040 - /openejb/site/trunk/content/tomee-jaas.mdtext
Author: rmannibucau
Date: Wed Jan 18 20:21:47 2012
New Revision: 1233040
URL: http://svn.apache.org/viewvc?rev=1233040&view=rev
Log:
adding tomee-jaas.mdtext
Added:
openejb/site/trunk/content/tomee-jaas.mdtext
Added: openejb/site/trunk/content/tomee-jaas.mdtext
URL: http://svn.apache.org/viewvc/openejb/site/trunk/content/tomee-jaas.mdtext?rev=1233040&view=auto
==============================================================================
--- openejb/site/trunk/content/tomee-jaas.mdtext (added)
+++ openejb/site/trunk/content/tomee-jaas.mdtext Wed Jan 18 20:21:47 2012
@@ -0,0 +1,56 @@
+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
+
+ <?xml version='1.0' encoding='utf-8'?>
+ <Server port="8005" shutdown="SHUTDOWN">
+ <Listener className="org.apache.tomee.loader.OpenEJBListener" />
+ <Listener className="org.apache.catalina.security.SecurityListener" />
+
+ <Service name="Catalina">
+ <Connector port="8080" protocol="HTTP/1.1"
+ connectionTimeout="20000"
+ redirectPort="8443" />
+ <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
+ <Engine name="Catalina" defaultHost="localhost">
+ <!-- here is the magic -->
+ <Realm className="org.apache.catalina.realm.JAASRealm" appName="PropertiesLoginModule"
+ userClassNames="org.apache.openejb.core.security.AbstractSecurityService$User"
+ roleClassNames="org.apache.openejb.core.security.AbstractSecurityService$Group">
+ </Realm>
+
+ <Host name="localhost" appBase="webapps"
+ unpackWARs="true" autoDeploy="true" />
+ </Engine>
+ </Service>
+ </Server>
+
+* 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)
+