Securing SunOne EJB
843811Jul 14 2003 — edited Nov 10 2003Hi,
I'm using SunONE platform to deploy my EJBs. These EJBs will be accessed by Weblogic based Web application. I want to secure my EJBs so that any JNDI lookup to retrienve the home interface must pass PRINCIPAL and CREDENTIAL validation. But "getCallerPrincipal" seems to return ANONYMOUS all the time. I tried defining groups, roles but no LUCK. Here is the code snippet,
env.put ("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url", url);
env.put(Context.SECURITY_PRINCIPAL, "bob");
env.put(Context.SECURITY_CREDENTIALS, "bobx");
Am I doing it right?