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 A62DA693E for ; Fri, 15 Jul 2011 17:08:53 +0000 (UTC) Received: (qmail 16660 invoked by uid 500); 15 Jul 2011 17:08:53 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 16573 invoked by uid 500); 15 Jul 2011 17:08:52 -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 16563 invoked by uid 99); 15 Jul 2011 17:08:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2011 17:08:52 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ayyagarikiran@gmail.com designates 209.85.212.50 as permitted sender) Received: from [209.85.212.50] (HELO mail-vw0-f50.google.com) (209.85.212.50) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2011 17:08:46 +0000 Received: by vws14 with SMTP id 14so1261263vws.37 for ; Fri, 15 Jul 2011 10:08:25 -0700 (PDT) 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; bh=r3OKpI8rWNZIEqghg67mmaxHNTPyD57xKcBk9wJZKwA=; b=ISheQnGvMDMQwWUPtPk8Zuabzl/FVPDh0bnPse/LpHLYfuKghiB11cdLCtDKAEbdav EUgQh1TuiPMzZxQAzWOU2eb71Mi4k7UfqeXu3jx88rwqQ8tg/vHzzucc/PtI0/2omM39 kqYfKr9I/yEBI2PkHauyfVk6LcWJOYmJCZRkc= MIME-Version: 1.0 Received: by 10.52.20.180 with SMTP id o20mr3408036vde.311.1310749705680; Fri, 15 Jul 2011 10:08:25 -0700 (PDT) Sender: ayyagarikiran@gmail.com Received: by 10.52.184.162 with HTTP; Fri, 15 Jul 2011 10:08:25 -0700 (PDT) Received: by 10.52.184.162 with HTTP; Fri, 15 Jul 2011 10:08:25 -0700 (PDT) In-Reply-To: <4E206268.4020404@labeo.de> References: <4E206268.4020404@labeo.de> Date: Fri, 15 Jul 2011 22:38:25 +0530 X-Google-Sender-Auth: dwjn2lRnVixyAlZEicpq5vXd7K4 Message-ID: Subject: Re: ApacheDS Interceptor From: Kiran Ayyagari To: users@directory.apache.org Content-Type: multipart/alternative; boundary=20cf307ca31898b5bc04a81eb2e2 --20cf307ca31898b5bc04a81eb2e2 Content-Type: text/plain; charset=ISO-8859-1 Hi Kevin, If you are using the version ,2.0-M1 then there exists a password hashing interceptor enabled by defaut and there exists support for many hashing algorithms, you just need to set the relevant implementation's FQCN. Let us know if you still have issues with bind() after this change On 15-Jul-2011 9:23 PM, "Stefan Zoerner" wrote: Hi Kevin, currently I am quite busy and others at the users mailing list know the server much better than me. I therefore forward it to the list. Hopefully, you are subscribed to it. Greetings from Hamburg, StefanZ Am 15.07.2011 14:26, schrieb Kevin Hamilton: > Sorry to bother you, but I just came across your interceptor tutorial > for ApacheDS. Thank you for it! It has greatly helped me. I was able > to successfully configure it. The problem I am facing is that I > implemented my own custom hash into the interceptor rather than use > the MD5. It works well and hashes the passwords whenever someone > modifies or adds a new one. > > The problem I am having is that with my custom hash, the server does > not know to hash the passwords on a bind attempt. I attempted to write > a function that intercepted bind, but it did not work. I was wondering > if you could give me some direction in this problem. I tried the code > below to intercept the bind, but it did not work. > > public void bind(NextInterceptor next, BindOperationContext opContext) > throws Exception { > byte[] password = opContext.getCredentials(); > > if (password != null) { > password = applyHashAlgorithm(**hashAlgorithm, > password); > } > > opContext.setCredentials(**password); > > super.bind(next, opContext); > } > > If you have time, please give me some advice. > > Thanks, > Kevin > > --20cf307ca31898b5bc04a81eb2e2--