From users-return-4253-apmail-directory-users-archive=directory.apache.org@directory.apache.org Sun Nov 6 21:10:26 2011 Return-Path: X-Original-To: apmail-directory-users-archive@www.apache.org Delivered-To: apmail-directory-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5585E9CCF for ; Sun, 6 Nov 2011 21:10:26 +0000 (UTC) Received: (qmail 17408 invoked by uid 500); 6 Nov 2011 21:10:26 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 17357 invoked by uid 500); 6 Nov 2011 21:10:25 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 17348 invoked by uid 99); 6 Nov 2011 21:10:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Nov 2011 21:10:25 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ayyagarikiran@gmail.com designates 209.85.160.178 as permitted sender) Received: from [209.85.160.178] (HELO mail-gy0-f178.google.com) (209.85.160.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Nov 2011 21:10:18 +0000 Received: by gyf3 with SMTP id 3so4601726gyf.37 for ; Sun, 06 Nov 2011 13:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=uG6trSRGCsUkImmM4VS6tEWt6Q5Tjk8XzJBiOsOO82A=; b=ijlTPQlRh2PXU3JK3xRkhmp6JvUSMZSPOjwHLrl70B0nYTGyQ9N411WLgtSw6dTXcf Yow9opDv9W6oQxopGR8w+U/tS0Vo6WGlIFuokGyqCcPm5zZyqpiHsC0jcljdKMGAm/DO h9XXbUCH12ZeEwOenYm0hyPmzCct+VhO0Jgeg= MIME-Version: 1.0 Received: by 10.50.156.230 with SMTP id wh6mr36518521igb.17.1320613797253; Sun, 06 Nov 2011 13:09:57 -0800 (PST) Sender: ayyagarikiran@gmail.com Received: by 10.231.36.75 with HTTP; Sun, 6 Nov 2011 13:09:57 -0800 (PST) In-Reply-To: References: Date: Sun, 6 Nov 2011 16:09:57 -0500 X-Google-Sender-Auth: a9SzY5TZP5D7PQGNaiw-je_17SI Message-ID: Subject: Re: Kerberos server From: Kiran Ayyagari To: users@directory.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org which version you are using? On Fri, Nov 4, 2011 at 4:39 PM, Jitendra Pandey wrote: > Hey Kiran, > =A0Thanks for prompt replies. > =A0By 'tweak the schema partition', do you mean that we need to change th= e > SchemaPartition code? =A0I would prefer to use released versions of the c= ode. > > Can I just use schema partition obtained below. ? > > SchemaPartition schemaPartition =3D > service.getSchemaService().getSchemaPartition(); > > And don't create an ldifPartition and don't call following to wrap? > schemaPartition.setWrappedPartition( ldifPartition ); > > Another problem is > > SchemaLoader loader =3D new LdifSchemaLoader( schemaRepository ); > SchemaManager schemaManager =3D new DefaultSchemaManager( loader ); > > schemaRepository also expects a file underneath. > > Do you have a unit test or something that creates a KDC server with all > in-memory directory-service or just the directory service? > > > On Fri, Nov 4, 2011 at 6:19 AM, Kiran Ayyagari wro= te: > >> On Fri, Nov 4, 2011 at 5:12 AM, Jitendra Pandey >> wrote: >> > I was looking at the Embedded ldap server example at >> > >> > >> http://svn.apache.org/repos/asf/directory/documentation/samples/trunk/em= bedded-sample/src/main/java/org/apache/directory/seserver/EmbeddedADSVer157= .java >> > >> > =A0The method initSchemaPartition uses ldifPartition and ldifSchemaLoa= der >> > and use a working directory. >> > >> > =A0Is there a way I can avoid specifying ldif files and schema directo= ries? >> > I don't want to use any files on disk and want to just keep everything= in >> > memory with capability to add and delete. Is that possible at all? >> > >> it is possible, but you need to tweak the schema partition a bit (note >> that it internally uses AvlPartition anyway but we wrap it in another >> partition to write the changes back to disk) >> > On Thu, Nov 3, 2011 at 4:51 PM, Kiran Ayyagari >> wrote: >> > >> >> you need to start the DirectoryService anyway like the way you do >> >> before starting up the LdapServer >> >> >> >> If you can show me your code that will make it easier to find the >> >> issue and will hopefully help in sending a quick patch >> >> >> >> P.S:- just handling too many things right now so can't whip a complet= e >> >> sample >> >> >> >> On Thu, Nov 3, 2011 at 6:44 PM, Jitendra Pandey >> >> wrote: >> >> > Hi, >> >> > =A0 I want to embed =A0kerberos servers (kdc and authentication ser= vers) >> in >> >> my >> >> > application. =A0On the website I found code for embedding ldap serv= er >> but >> >> not >> >> > kerberos. I saw the code for starting kdc in some unit tests, but I= am >> >> > unable to add principals and passwords in the kdc via API. >> >> > =A0Could you please point me to an example code? Any pointers to co= de or >> >> > documentation or hints will be greatly helpful. >> >> > =A0I intend to use a very simple setup, preferably storing all >> principals >> >> > and passwords etc in memory. I thought I could use AvlPartition for >> that >> >> > without any persisted files. =A0If possible I want to avoid ldif fi= les >> and >> >> > prefer to add and remove principals and passwords via API. But I am >> >> unable >> >> > to add principals via the API. >> >> > >> >> > regards >> >> > jitendra >> >> > >> >> >> >> >> >> >> >> -- >> >> Kiran Ayyagari >> >> >> > >> >> >> >> -- >> Kiran Ayyagari >> > --=20 Kiran Ayyagari