Hello everyone,
I want to use JAAS and TomEE like this tutorial
http://tomee.apache.org/tomee-jaas.html
but when i set Realm in TomEE server.xml
<Realm appName="PropertiesLogin"
className="org.apache.catalina.realm.JAASRealm"
roleClassNames="org.apache.openejb.core.security.jaas.GroupPrincipal"
userClassNames="org.apache.openejb.core.security.jaas.UserPrincipal">
</Realm>
, next login.config in TomEE /conf
PropertiesLogin {
org.apache.openejb.core.security.jaas.PropertiesLoginModule required
Debug=false
UsersFile="users.properties"
GroupsFile="groups.properties";
};
and users.properties:
email=password
with group.properties
ADMIN=email
next I'm not sure how and where to set CATALINA_OPTS the
java.security.auth.login.config system property. I tried set it in
setenv.bat (I'm using Windows now) or to catalina.bat like this:
export CATALINA_OPTS="$CATALINA_OPTS
-Djava.security.auth.login.config=$CATALINA_BASE/conf/login.config"
But I always getting exception:
SEVERE: Servlet.service() for servlet [controller.user.LoginController] in
context with path [/practiceLzContractsGenerator] threw exception [Login
failed] with root cause
javax.servlet.ServletException: Login failed
In servlet i'm doing request.login(email, password);.
Regards,
WoooCash.
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-1-how-to-set-CATALINA-OPTS-for-Java-EE-JAAS-tp4679619.html
Sent from the TomEE Users mailing list archive at Nabble.com.