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 CAA3D10E66 for ; Tue, 26 Nov 2013 17:51:58 +0000 (UTC) Received: (qmail 81817 invoked by uid 500); 26 Nov 2013 17:47:51 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 81692 invoked by uid 500); 26 Nov 2013 17:47:39 -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 81642 invoked by uid 99); 26 Nov 2013 17:47:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2013 17:47:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,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.212.181 as permitted sender) Received: from [209.85.212.181] (HELO mail-wi0-f181.google.com) (209.85.212.181) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2013 17:47:28 +0000 Received: by mail-wi0-f181.google.com with SMTP id hq4so6015485wib.14 for ; Tue, 26 Nov 2013 09:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=3d4+32eb95uYbF4+jFQtlwLP+DuEuHP+EpVhqIkKMHY=; b=C6P8VmJtH/kBzdcDW8kftJUeGAlu11a47MclXWvSiex064ZxGK1Fdk6OwW5kKXve+r 7g3v+P+h296yX1xXkc7Bis8a1NWmmsgWhanWxlRdNw7lAmHcKiLMuMtQlwaDwxvdoB1X h6/XbfjgIaWLRovibQCGY9wy7FVg3rZCcWCSf4EKHbwux5yVBbi1lFe5QIxPg3DWK/WU kHgCE0i7nUdwDlJBosFDOV5KHWsEPotuTKWFNN6QhdBntaissKFu2CdUNzrebiShhmD4 uScFeDxxQg+SsIpE/XgaH0IbdbPADxAnjmt6YcjkTSvciuQhOpgHEIbFWVPOruNoEnGY qWGQ== MIME-Version: 1.0 X-Received: by 10.194.143.66 with SMTP id sc2mr7764406wjb.45.1385488028338; Tue, 26 Nov 2013 09:47:08 -0800 (PST) Sender: ayyagarikiran@gmail.com Received: by 10.216.166.194 with HTTP; Tue, 26 Nov 2013 09:47:08 -0800 (PST) In-Reply-To: <5294B712.1090202@hortonworks.com> References: <5294B712.1090202@hortonworks.com> Date: Tue, 26 Nov 2013 23:17:08 +0530 X-Google-Sender-Auth: 7ctwNB25U7ErWCzWJON33y1IAAs Message-ID: Subject: Re: WARNings from DefaultDirectoryServiceFactory/DefaultDirectoryService From: Kiran Ayyagari To: users@directory.apache.org Content-Type: multipart/alternative; boundary=089e0115e8a4c5102104ec1811c5 X-Virus-Checked: Checked by ClamAV on apache.org --089e0115e8a4c5102104ec1811c5 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Nov 26, 2013 at 8:28 PM, Kevin Minder wrote: > I'm trying to provide a very, very simple demo LDAP server for use with my > project. I've managed to create one that is working using the code at the > bottom. However it emits the following two WARN lines when started. > Ideally I'd like to get rid of these as to not confuse/concern my users. > > The first one looks like it could be solved by creating a copy of > DefaultDirectoryServiceFactory and registering a shutdown hook, but I'd > rather not do that. > > The second one I really have no idea how to resolve. I'd be fine with > setting an instance specific password but it isn't clear what API should be > used or if that would fit into the way the DefaultDirectoryServiceFactory > handles the DefaultDirectoryService lifecycle. > > there is no way to do this using any API > I can provide a very simple maven project to illustrate if that would will > help someone help me. BTW setting the logger level won't work for me > because I do want any bind authentication failures to be output and these > are WARNs too. > > [09:47:45] WARN [org.apache.directory.server.core.DefaultDirectoryService] > - ApacheDS shutdown hook has NOT been registered with the runtime. This > default setting for standalone operation has been overriden. > [09:47:46] WARN [org.apache.directory.server.core.DefaultDirectoryService] > - You didn't change the admin password of directory service instance > 'ac3a5495-5d28-4e7e-987d-654efa9cb6a9'. Please update the admin password > as soon as possible to prevent a possible security breach. > > public SimpleLdapServer( String rootDn, File usersLdif, Transport... > transports ) throws Exception { > factory = new DefaultDirectoryServiceFactory(); > factory.init( UUID.randomUUID().toString() ); > service = factory.getDirectoryService(); > > Partition partition = factory.getPartitionFactory().createPartition( > service.getSchemaManager(), "users", rootDn, 500, > service.getInstanceLayout().getInstanceDirectory() ); > service.addPartition( partition ); > > CoreSession session = service.getAdminSession(); > LdifFileLoader lfl = new LdifFileLoader( session, usersLdif, null ); > lfl.execute(); > > server = new LdapServer(); > server.setTransports( transports ); > server.setDirectoryService( service ); > service.startup(); > server.start(); > } > > -- > CONFIDENTIALITY NOTICE > NOTICE: This message is intended for the use of the individual or entity > to which it is addressed and may contain information that is confidential, > privileged and exempt from disclosure under applicable law. If the reader > of this message is not the intended recipient, you are hereby notified that > any printing, copying, dissemination, distribution, disclosure or > forwarding of this communication is strictly prohibited. If you have > received this communication in error, please contact the sender immediately > and delete it from your system. Thank You. > -- Kiran Ayyagari http://keydap.com --089e0115e8a4c5102104ec1811c5--