You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by WoooCash93 <Wo...@gmail.com> on 2016/08/05 09:03:21 UTC
Tomee 7.0.1 how to set CATALINA_OPTS for Java EE JAAS
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.
Re: Tomee 7.0.1 how to set CATALINA_OPTS for Java EE JAAS
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Le 5 août 2016 22:19, "WoooCash93" <Wo...@gmail.com> a écrit :
>
> 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"
>
"export" is a sh keyword, windows equivalent is "set"
> 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.