tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Tomee 7.0.1 how to set CATALINA_OPTS for Java EE JAAS
Date Fri, 05 Aug 2016 20:52:09 GMT
Le 5 août 2016 22:19, "WoooCash93" <WoooCash93@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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message