[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-31 Thread jaikiran
anonymous wrote : env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory"); This looks incorrect. I usually use: env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); See if this change fixes the issue. If

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-31 Thread jej2003
I will do first thing Monday. Sorry for the delay. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186086#4186086 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186086 ___ jbo

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-29 Thread Wolfgang Knauf
jej2003, could you create a really small sample, which shows the problem (and contains no unrelated code)? It would be best if you placed a sample EAR on some public server. ragavgomatam, the method permissions are in post 3. Best regards Wolfgang View the original post : http://www.jboss.co

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-28 Thread ragavgomatam
Can you post the method permissions on the ejb ? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185259#4185259 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185259 ___ jboss-

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-28 Thread jej2003
Sorry you are correct the line b.getInitialContext() does not belong, but this is not the cause of the issue. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185204#4185204 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-28 Thread Wolfgang Knauf
Those two lines are a bit strange: InitialContext ctx = new InitialContext(env); | | InitialContext ctx = b.getInitialContext(); I guess, that line 60 is the one with the error? Do you use an application client or a web client? For application clients, you MUST specifiy the JNDI

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-28 Thread jej2003
| Properties env = new Properties(); | env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory"); | env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099"); | InitialContext ctx = new InitialContext(env); | | Initial

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-28 Thread Wolfgang Knauf
I don't see an error in your snippets. How do you connect? Could you post also snippets of your client side? Best regards Wolfgang View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185077#4185077 Reply to the post : http://www.jboss.com/index.html?module=bb&o

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-27 Thread jej2003
My EJB looks like this: @RolesAllowed({"user", "admin"}) | public String echoUser(String src) { | log.debug("echoUser called with source string " + src); | return "Echo User: " + src; | } | | /* (non-Javadoc) | * @see com.csp.ejb.echo

[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client

2008-10-27 Thread Wolfgang Knauf
Hi, could you provide us with details of your "login-config.xml" and your application security settings? Security constraints for the "guest" user must be specified in e.g. web.xml and in the security constraints of your EJBs (you have to declare the allowed resources/methods for the guest use