Initial context uses JAAS and tomcat uses realm. You can say tomcatto use jaas as well but the opposite doesn't exist yet AFAIK, you can implement a LoginModule relying on tomcat UserDatabaseRealm. This way it will work as you expect. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau
2014-01-27 amol.p.dongare <[email protected]>: > My Exact scenario is as follows - > > I have configured tomcat-users.xml with appuser as a user as follows > > > <role rolename="admin"/> > <user username="appuser" password="appuser" roles="admin"/> > > and passing these credentials through context properties while accessing > InitialCotext. However I want to access InitialContext with any username > and password passed through context properties. > > In short Tomcat-user.xml should behave like this > > <user username="${tomee.user}" password="${tomee.user.pw}" roles="admin"/> > > > Thanks for your answer. > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/How-to-force-TomEE-to-authenticate-any-user-who-tries-to-access-InitialContext-tp4667306p4667308.html > Sent from the OpenEJB User mailing list archive at Nabble.com.
