[jboss-dev-forums] [Design of Security on JBoss] - Flush cache credentials

adiceglie do-not-reply at jboss.com
Thu Mar 29 06:26:29 EDT 2007


I using LDAPExLoginModule on Active Directory to autenticate user  and this function correctly. The autenticated user access to a my Web Service integrated in Pentaho throught a Web client application created with Axis in Eclipse. Then, I close and reopen the browser, in the login dialog I insert another user; this user is autenticated on client, but on Web Services the autenticated user is the first user. The first user is never flushed, only if I stop and restart the JBoss Application Server.
Then, I used flushOnSessionInvalidation="true" attribute in Pentaho's jboss-web.xml and call session.invalidate when Webservice finish, but none.
At end I insert before session.invalidate() the following code:
            /*
             * Flush the cache 
             */
String domain = "ldapRealm";
String jaasMgrName = "jboss.security:service=JaasSecurityManager";
String[] params = { domain };
String[] signature = { "java.lang.String" };
MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0); 
			try {
				ObjectName jaasMgr = new ObjectName("jboss.security", "service", "JaasSecurityManager");
				server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);
			} catch (Exception e){ 
		        e.printStackTrace(); 
		    } 
where ldapRealm is my application domain on LDAP AD.
But also none.
How can I do to solve flush the user credential on Web service?

Thanks in advance
Angela Diceglie

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032696#4032696

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032696



More information about the jboss-dev-forums mailing list