subject.doAs changes the identity on a thread.
There is no way to login without using JAAS, so I don't understand what
you mean.
> <br />
> With all that I obtain a correct authentification the first time I call that EJB, but if I chage de com.ibm.CORBA.loginUserid property and com.ibm.CORBA.loginUserPassword property does not revalidate that authentification, so for all that my question is: <br />
> <br />
> ¿How I do the logout using CSIv2 system?<br />
> <br />
> Thanks for your answers I still hope you can help me out with this.<br />
> <br />
> best regards
I suggest you read the WAS infocenter article on client programming, so
that you can see how to do a JAAS login from your client. You should be
able to re-login with a different user and set the new context on the
thread with subject.doAs.
I tried what you said, uncheking that option on my administrative console, but it still not works as I want, there is any way to invalidate the client session? I mean, any command or something I can call to do that, and make WAS to re-validate my security.
I tried creating two home's and the resutls are still the same:
Client
System.setProperty("com.ibm.CORBA.loginUserid", "admin");
System.setProperty("com.ibm.CORBA.loginPassword", "admin");
Context ctx = new InitialContext(env);
PruebaServiceHome home = (PruebaServiceHome) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("ejb/PruebaService"), PruebaServiceHome.class);
PruebaService serviceLocal = home.create();
System.out.println("Inicio. Imprimo el usuario con login");
serviceLocal.imprimeUser();
System.setProperty("com.ibm.CORBA.loginUserid", "ORION");
System.setProperty("com.ibm.CORBA.loginPassword", "ORION");
Context ctx2 = new InitialContext(env);
PruebaServiceHome home2 = (PruebaServiceHome) javax.rmi.PortableRemoteObject.narrow(ctx2.lookup("ejb/PruebaService"), PruebaServiceHome.class);
PruebaService serviceLocal2 = home2.create();
serviceLocal2.imprimeUser();
Server traces
14/04/08 10:06:52:234 CEST 00000025 SystemOut O PruebaService.imprimeUser()
14/04/08 10:06:52:234 CEST 00000025 SystemOut O USUARIO
14/04/08 10:06:52:234 CEST 00000025 SystemOut O admin
14/04/08 10:06:52:234 CEST 00000025 SystemOut O IP
14/04/08 10:06:52:234 CEST 00000025 SystemOut O FIN
14/04/08 10:06:52:250 CEST 00000025 SystemOut O PruebaService.imprimeUser()
14/04/08 10:06:52:250 CEST 00000025 SystemOut O USUARIO
14/04/08 10:06:52:250 CEST 00000025 SystemOut O admin
14/04/08 10:06:52:250 CEST 00000025 SystemOut O IP
14/04/08 10:06:52:250 CEST 00000025 SystemOut O FIN