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 1B1F1D84A for ; Tue, 18 Dec 2012 09:41:41 +0000 (UTC) Received: (qmail 38048 invoked by uid 500); 18 Dec 2012 09:41:40 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 37735 invoked by uid 500); 18 Dec 2012 09:41:38 -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 37713 invoked by uid 99); 18 Dec 2012 09:41:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 09:41:37 +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 (athena.apache.org: domain of ayyagarikiran@gmail.com designates 209.85.223.178 as permitted sender) Received: from [209.85.223.178] (HELO mail-ie0-f178.google.com) (209.85.223.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 09:41:33 +0000 Received: by mail-ie0-f178.google.com with SMTP id c12so491351ieb.37 for ; Tue, 18 Dec 2012 01:41:12 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=7Bk788WTNRwzIVD1UJYQ0KQdZ4fONBU9iGpGhSuMr0A=; b=EaQ9Hossjh8EdyAJ+RE4ZkuXxZlIg6N6vuLYVBImPMKIof2mqb6YbPwjcsImL/4jXr b8NRtn7ONuKQ4eSz3BgXaGSxrKNW+yfjQS+PUUn34V5M16gGIkoerHr9JIo4eu5P5+oI oyjcanbod27k6bONu+skaq3eB2AvUxIOs6LT+utDt14f9UPLNMRufcffFNNyov0A4piy UlruOjo2LAnd/ZLUHG1ybPvDHI3HanzwVb4l7yp1Fe7n+N6NbbLskOJg0Hi2WyoGUQ+O +FlicBn0NpXwR3XA4KC2kr1nO3QCYHycf3DPFilrh8tGI1lJbGfJAf8OFrSsRidl6tWF 5LWg== MIME-Version: 1.0 Received: by 10.42.121.1 with SMTP id h1mr1255317icr.43.1355823672411; Tue, 18 Dec 2012 01:41:12 -0800 (PST) Sender: ayyagarikiran@gmail.com Received: by 10.231.31.3 with HTTP; Tue, 18 Dec 2012 01:41:12 -0800 (PST) In-Reply-To: <1355823170.36162.YahooMailNeo@web186103.mail.ir2.yahoo.com> References: <1355579054.62183.YahooMailNeo@web186103.mail.ir2.yahoo.com> <1355820175.75552.YahooMailNeo@web186106.mail.ir2.yahoo.com> <1355823170.36162.YahooMailNeo@web186103.mail.ir2.yahoo.com> Date: Tue, 18 Dec 2012 15:11:12 +0530 X-Google-Sender-Auth: Nqf7bc54LVZbLHW03oGcvpmyVKk Message-ID: Subject: Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem From: Kiran Ayyagari To: Sketch Cc: "users@directory.apache.org" Content-Type: multipart/alternative; boundary=20cf3010ee135f467f04d11d4ceb X-Virus-Checked: Checked by ClamAV on apache.org --20cf3010ee135f467f04d11d4ceb Content-Type: text/plain; charset=ISO-8859-1 ah I see that the setDefaultInterceptorConfigurations() is now moved to initialize() method I will check if this can be moved to the constructor so that it is easy to configure the interceptor list before starting up. can you file a JIRA request? On Tue, Dec 18, 2012 at 3:02 PM, Sketch wrote: > I originally tried it that way but I was getting a Null when trying to get > the list prior to calling directoryService.startup(). > > List interceptors = directoryService.getInterceptors(); // > RETURNS NULL prior to service startup > > So unless I'm ment to populate all the Interceptors first, I found that > starting then stopping allowed me to insert the hashing interceptor. Should > I be doing it a different way? > > > > ------------------------------ > *From:* Kiran Ayyagari > *To:* users@directory.apache.org; Sketch > *Sent:* Tuesday, 18 December 2012, 9:18 > > *Subject:* Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem > > this restart can be avoided if you modify the interceptor list before > starting up the directory service > > On Tue, Dec 18, 2012 at 2:12 PM, Sketch wrote: > > Kiran, > > Thanks for taking to time to reply. > > I have solved this now. My mistake was not restarting the DirectoryService > object after making the modification to the interceptors list. Inserting > before SchemaInterceptor as you suggested and then shutting down and > restarting the service fixes my mistake. > > Sketch > > > ----- Original Message ----- > From: Kiran Ayyagari > To: users@directory.apache.org; Sketch > Cc: > Sent: Monday, 17 December 2012, 13:35 > Subject: Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem > > do you have any stacktrace other than the below shown error message? > try inserting it before SchemaInterceptor and let us know > > > On Sat, Dec 15, 2012 at 7:14 PM, Sketch >wrote: > > > Hello, > > > > I'm having issues getting a PasswordHashing Interceptor working on > > embedded server using 2.0.0-M8. > > > > I've used > > https://github.com/soluvas/soluvas-framework/tree/master/apacheds as the > > basis of my embedded server. > > > > After starting the service and iterating through the > > service.getInterceptors() I get: > > > > normalizationInterceptor > > authenticationInterceptor > > referralInterceptor > > aciAuthorizationInterceptor > > defaultAuthorizationInterceptor > > administrativePointInterceptor > > exceptionInterceptor > > schemaInterceptor > > operationalAttributeInterceptor > > collectiveAttributeInterceptor > > subentryInterceptor > > eventInterceptor > > triggerInterceptor > > changeLogInterceptor > > journalInterceptor > > > > I noticed the hash interceptors were missing so I added > > "apacheds-interceptors-hash" artifact to get the "hash" interceptors in > my > > project. > > > > Following the example at: > > > http://directory.apache.org/apacheds/1.5/62-implementing-a-simple-custom-interceptor.html > > > > List interceptors = directoryService.getInterceptors(); > > // Find Normalization interceptor in chain int insertionPosition = -1; > > for (int pos = 0; pos < interceptors.size(); ++pos) { > > Interceptor interceptor = interceptors.get(pos); > > if (interceptor instanceof NormalizationInterceptor) { > > insertionPosition = pos; > > } > > } > > // insert our new interceptor just behind > > interceptors.add(insertionPosition + 1, > > new > org.apache.directory.server.core.hash.SshaPasswordHashingInterceptor()); > > directoryService.setInterceptors(interceptors); > > > > > > Performing a simple LDAP modify with: > > > > dn: uid=admin,ou=system > > changetype: modify > > replace: userPassword > > userPassword: secret > > > > I get the following exception: > > > > LDAPException(resultCode=80 (other), errorMessage='OTHER: failed for > > MessageType : MODIFY_REQUEST > > Message ID : 2 > > Modify Request > > Object : 'uid=admin,ou=system' > > Modification[0] > > Operation : replace > > Modification > > userPassword: '0x73 0x65 0x63 0x72 0x65 0x74 ' > > org.apache.directory.shared.ldap.model.message.ModifyRequestImpl@28ff9b55 > : > > null', diagnosticMessage='OTHER: failed for MessageType : MODIFY_REQUEST > > Message ID : 2 > > Modify Request > > Object : 'uid=admin,ou=system' > > Modification[0] > > Operation : replace > > Modification > > userPassword: '0x73 0x65 0x63 0x72 0x65 0x74 ' > > org.apache.directory.shared.ldap.model.message.ModifyRequestImpl@28ff9b55 > : > > null') > > > > No matter where in the Interceptor list I insert the > > SshaPasswordHashingInterceptor (or any of the > > others org.apache.directory.server.core.hash.*) I still experience > issues. > > > > Can anyone help me solve this problem please? Is it Driving me mad right > > now! > > > > Thanks in advance > > Sketch > > > > > > -- > Kiran Ayyagari > http://keydap.com > > > > > -- > Kiran Ayyagari > http://keydap.com > > > -- Kiran Ayyagari http://keydap.com --20cf3010ee135f467f04d11d4ceb--