Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 56118 invoked from network); 22 May 2006 05:50:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 May 2006 05:50:12 -0000 Received: (qmail 48657 invoked by uid 500); 22 May 2006 05:50:09 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 48632 invoked by uid 500); 22 May 2006 05:50:09 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 48621 invoked by uid 99); 22 May 2006 05:50:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 May 2006 22:50:09 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of manu.t.george@gmail.com designates 64.233.184.239 as permitted sender) Received: from [64.233.184.239] (HELO wr-out-0506.google.com) (64.233.184.239) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 May 2006 22:50:08 -0700 Received: by wr-out-0506.google.com with SMTP id i7so1004297wra for ; Sun, 21 May 2006 22:49:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=KlVJ+mo3lcPwl3kjb5PQJsN/N7uiBstlPoR19ABYCQJd+NBSAKREEZM+4RM5pxPsiTIP3ojnylI0LwGkILDeMKjVLPGsUPqyxtFBtGCyk908MqK3wZ/zcFwV9IAZNPqe3MVFMNMsh/9qZWT90Wdf6wX9Q6qQIJ3C4nZyENv3m8E= Received: by 10.65.105.17 with SMTP id h17mr399694qbm; Sun, 21 May 2006 22:49:47 -0700 (PDT) Received: by 10.64.148.7 with HTTP; Sun, 21 May 2006 22:49:47 -0700 (PDT) Message-ID: <466797bd0605212249p4d841713iaa31a3952ee57466@mail.gmail.com> Date: Mon, 22 May 2006 11:19:47 +0530 From: "Manu George" To: user@geronimo.apache.org Subject: Re: how to require authentication for obtaining initialcontext? In-Reply-To: <4470D1A9.9050907@3kraft.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_164793_22108705.1148276987698" References: <4470D1A9.9050907@3kraft.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_164793_22108705.1148276987698 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, In geronimo 1.0 openejb required the properties java.naming.security.principal and java.naming.security.credentials to have values but they were not used anywhere. So you need to include those properties with dummy values when creating the InitialContext. I believe this has been addressed in 1.1 codebase. Regards Manu On 5/22/06, Joerg Friede wrote: > > Hi, > > i do have an external client that connects to the geronimo/openejb > server using the following code: > > props.setProperty("java.naming.factory.initial"," > org.openejb.client.RemoteInitialContextFactory"); > props.setProperty("java.naming.provider.url", "127.0.0.1:4201"); > props.setProperty("java.naming.security.principal", "system"); > props.setProperty("java.naming.security.credentials", "manager"); > > InitialContext ctx =3D new InitialContext(props); > > This works fine. If i comment out the lines specifying the > principal/credential i do receive the following exception > > javax.naming.AuthenticationException: Cannot read the response from the > server (OEJP/2.0) : null; nested exception is: > java.io.EOFException > at org.openejb.client.JNDIContext.authenticate(JNDIContext.java > :196) > at > org.openejb.client.JNDIContext.getInitialContext(JNDIContext.java:181) > > This again is as expexted. If i, on the other hand, use the following > lines > > props.setProperty("java.naming.security.principal", ""); > props.setProperty("java.naming.security.credentials", ""); > > the client can connect to the server and lookup/use my - currently not > secured - EJB's. > > Now, is there a way (maybe an attribute for the > geronimo/j2ee-server/1.0/car entry in config.xml) to require a valid > username/password from a geronimo realm for obtaining the InitialContext = ? > > Thanks in advance, Joerg Friede > > > ------=_Part_164793_22108705.1148276987698 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,
         In geronimo 1.0 openejb required the properties java.naming.security.principal  and  java.naming.security.credentials to have values but they were not used anywhere. So you need to include those properties with dummy values when creating the InitialContext. I believe this has been addressed in 1.1 codebase.

Regards
Manu

On 5/22/06, Joerg Friede <joerg.friede@3kraft.com> wrote:
Hi,

i do have an external client that connects to the geronimo/opene= jb
server using the following code:

props.setProperty("java.= naming.factory.initial","org.openejb.client.RemoteInitialContextF= actory ");
props.setProperty("java.naming.provider.url", "<= a href=3D"http://127.0.0.1:4201">127.0.0.1:4201");
props.setPro= perty("java.naming.security.principal", "system");
props.setProperty("java.naming.security.credentials", "manag= er");

InitialContext ctx =3D new InitialContext(props);

= This works fine. If i comment out the lines specifying the
principal/cre= dential i do receive the following exception

javax.naming.AuthenticationException: Cannot read the response from= the
server (OEJP/2.0) : null; nested exception is:
   = ;     java.io.EOFException
   &n= bsp;    at org.openejb.client.JNDIContext.authenticate(= JNDIContext.java :196)
        at
org.openejb.= client.JNDIContext.getInitialContext(JNDIContext.java:181)

This agai= n is as expexted. If i, on the other hand, use the following lines

p= rops.setProperty("java.naming.security.principal ", "");
props.setProperty("java.naming.security.cred= entials", "");

the client can connect to the server a= nd lookup/use my - currently not
secured - EJB's.

Now, is there a= way (maybe an attribute for the
geronimo/j2ee-server/1.0/car entry in config.xml) to require a validusername/password from a geronimo realm for obtaining the InitialContext ?=

Thanks in advance,  Joerg Friede


=

------=_Part_164793_22108705.1148276987698--