[jboss-dev-forums] [Design of Security on JBoss] - SecurityAssociation no loger valid in remote client

thomas.diesler@jboss.com do-not-reply at jboss.com
Fri Apr 27 04:48:48 EDT 2007


My test clients have code like this


  |       InitialContext iniCtx = getInitialContext();
  |       OrganizationHome home = (OrganizationHome)iniCtx.lookup("ejb/RoleSecuredSLSB");
  | 
  |       OrganizationRemote bean = null;
  |       try
  |       {
  |          bean = home.create();
  |          fail("Security exception expected");
  |       }
  |       catch (Exception e)
  |       {
  |          // all cool, now try again with valid credentials
  |          SecurityAssociation.setPrincipal(new SimplePrincipal(USERNAME));
  |          SecurityAssociation.setCredential(PASSWORD);
  |          bean = home.create();
  |       }
  | 

This no longer works. How is the client now supposed to provide valid principal/credential

cheers

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

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



More information about the jboss-dev-forums mailing list