Pablo Fraga [
http://community.jboss.org/people/pablo.fraga1975] created the discussion
"Re: Secure access to an EJB3.0"
To view the discussion, visit:
http://community.jboss.org/message/588986#588986
--------------------------------------------------------------
Hi,
I had the same problem, first i was trying to authenticate the client with the following
code:
Properties env = new Properties();
env.setProperty(Context.SECURITY_PRINCIPAL, "caja");
env.setProperty(Context.SECURITY_CREDENTIALS, "password");
env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.security.jndi.JndiLoginInitialContextFactory");
env.setProperty(Context.PROVIDER_URL, "localhost:1099");
Debugging server side i found that principal doesn't propagate correctly, crawling the
web i found this link:
http://msikora.typepad.com/michael_sikora_on_java_ee/2009/03/converting-t...
http://msikora.typepad.com/michael_sikora_on_java_ee/2009/03/converting-t...
Where it says that i had to use the following code:
SecurityClient securityClient = SecurityClientFactory.getSecurityClient();
securityClient.setSimple("caja", "password");
securityClient.login();
InitialContext ctx = new InitialContext();
The problem is that aparently org.jboss.security.client.SecurityClient and
org.jboss.security.client.SecurityClientFactory appears to apply to JBoss 5.0.0 and not to
JBoss 4.2.3 the one we still use in our production environment.
Any help would be apreciated!
Thanks,
Pablo.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/588986#588986]
Start a new discussion in Beginner's Corner at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]