ejb-security.zip
<http://tomee-openejb.979440.n4.nabble.com/file/n4671591/ejb-security.zip>  

server.xml:

<Realm className="org.apache.catalina.realm.JAASRealm"
appName="PropertiesLogin"
         
userClassNames="org.apache.openejb.core.security.AbstractSecurityService$User"
         
roleClassNames="org.apache.openejb.core.security.AbstractSecurityService$Group">
      </Realm>

login.config
<http://tomee-openejb.979440.n4.nabble.com/file/n4671591/login.config>  
users.properties
<http://tomee-openejb.979440.n4.nabble.com/file/n4671591/users.properties>  
groups.properties
<http://tomee-openejb.979440.n4.nabble.com/file/n4671591/groups.properties>  

added "-Djava.security.auth.login.config=$CATALINA_BASE/conf/login.config"
to setenv.bat

After deploying both war archives, just call: 

http://localhost:TOMEE_PORT/ejb-client/clientservice?host=localhost&port=TOMEE_PORT&user=admin&pass=changeit

And you should see in the logs, that the remote EJB is called with a
principal named "guest" and not admin .

It would be very nice and helpful if you cna take a look at my examples, I
packaged both archives as maven projects, so you can also check the sources.

Our aim is that we need the name of the principal which call the EJB,
because we do some further checks on it.


Best regards, Olivier



--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Principal-in-EJB-returns-always-guest-even-with-JAAS-module-tp4670862p4671591.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to