[JBoss-user] [Security & JAAS/JBoss] - Re: Wrong SECURITY_PRINCIPAL
Just to explain a little bit further: we have a web-app that stores username and password in session (i know ... that's bad) and inside servlets (jsps) is: InitialContext lctx = getInitialContext(user, password) ... lctx.lookup(...) ... lctx.lookup(...) What happenes is that sometimes methods are called with wrong principal. We don't actually need different principals on single Thread (like the first code). I found that this can be solved by using InitialContextFactory (instead of JndiInitialContextFactory) with multi-threaded="true" inside auth.conf file. Can anything similar be achieved by using JndiInitialContextFactory? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3903208#3903208 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3903208 --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Security & JAAS/JBoss] - Wrong SECURITY_PRINCIPAL
There's a method in one of our Stateless EJB (named Log) that returns the logged in user. The code below prints out: User1: b User2: b Why??? Two Log EJB's were created using different InitialContexts so I would expect that: User1: a User2: b should be printed. | public static InitialContext getInitialContext(String as_username, String as_password) throws Exception { | Properties p = new java.util.Properties(); | p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory"); | p.put(Context.PROVIDER_URL, "localhost:1099"); | p.put(Context.SECURITY_PRINCIPAL, as_username); | p.put(Context.SECURITY_CREDENTIALS, as_password); | | p.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); | p.put("jnp.disableDiscovery", "true"); | | return new InitialContext(p); | } | | public static void main(String[] args) throws Exception { | InitialContext lctx1 = getInitialContext("a", "a"); | InitialContext lctx2 = getInitialContext("b", "b"); | | Log llog1 = ((LogHome)PortableRemoteObject.narrow(lctx1.lookup("MobilePackage/Log"), LogHome.class)).create(); | Log llog2 = ((LogHome)PortableRemoteObject.narrow(lctx2.lookup("MobilePackage/Log"), LogHome.class)).create(); | | System.out.println("User1: " + llog1.getUserId()); | System.out.println("User2: " + llog2.getUserId()); | } | | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3903199#3903199 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3903199 --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Clustering/JBoss] - Re: farm deployment
Thanks. Will try 4.0.3rc1. Test case is pretty simple, since - if you repeat it long enough - you can reproduce this bug with ordinary datasource xml files in farm/ directory. Sometimes xml ds file is removed on second server instead of redeployed - so it's probably a different case than fixed one (Farm deployment shouldn't read entire archive file into memory). Will try 4.0.3rc1 and report a bug if it's not fixed. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885047#3885047 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885047 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Clustering/JBoss] - farm deployment
We have a JBoss cluster running on two machines with all configuration (only partition name was modified). We have one EJB jar (with multiple stateless EJB inside) deployed in farm/ directory and everything is working fine except for farm deployment: sometimes if we copy the ejb jar to farm directory on server one, instead of redeploying this jar to server two, server two receives only (from log): doUndeployment(), File: farm/MobilePackage.jar and the (old) jar file on server two is deleted. This happens probably in 20% of deployments, other times farmDeployment() is received and ejb is redeployed to both servers. Any ideas why this is happening? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884981#3884981 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884981 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user