You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Stefan Zoerner <st...@labeo.de> on 2011/07/15 17:53:12 UTC

Re: ApacheDS Interceptor

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
>


Re: ApacheDS Interceptor

Posted by Kevin Hamilton <kh...@umem.org>.
Thanks for all of your help thus far. I have a few questions still though.

I read online that I could use a jar uf command line function to
replace .class files in .jar files. This has not worked for me. I was
hoping someone could tell me if I was doing something wrong. Thanks in
advance.

- Kevin

On Fri, Jul 15, 2011 at 8:10 PM, Kiran Ayyagari <ka...@apache.org> wrote:
> Yup
>
> On 16-Jul-2011 12:20 AM, "Kevin Hamilton" <kh...@umem.org> wrote:
>
> Thanks so much to all of you for helping. I got it installed and have
> it hashing SSHA-512 and it seems to be working well (binding as well).
> I will try next week to  make a custom hashing algorithm.
>
> I assume to accomplish this, I would need only to make a
> CustomPasswordHashingInterceptor.java and add it in the config.ldif
> file. Then add stuff to PasswordUtil.java and edit
> SimpleAuthenticator.java.
>
> Does this sound like the right track?
>
> Thanks again,
> Kevin
>
>
> On Fri, Jul 15, 2011 at 1:22 PM, Emmanuel Lecharny <el...@gmail.com>
> wrote:
>> On 7/15/11 7:19 P...
>

Re: ApacheDS Interceptor

Posted by Kiran Ayyagari <ka...@apache.org>.
Yup

On 16-Jul-2011 12:20 AM, "Kevin Hamilton" <kh...@umem.org> wrote:

Thanks so much to all of you for helping. I got it installed and have
it hashing SSHA-512 and it seems to be working well (binding as well).
I will try next week to  make a custom hashing algorithm.

I assume to accomplish this, I would need only to make a
CustomPasswordHashingInterceptor.java and add it in the config.ldif
file. Then add stuff to PasswordUtil.java and edit
SimpleAuthenticator.java.

Does this sound like the right track?

Thanks again,
Kevin


On Fri, Jul 15, 2011 at 1:22 PM, Emmanuel Lecharny <el...@gmail.com>
wrote:
> On 7/15/11 7:19 P...

Re: ApacheDS Interceptor

Posted by Kevin Hamilton <kh...@umem.org>.
Thanks so much to all of you for helping. I got it installed and have
it hashing SSHA-512 and it seems to be working well (binding as well).
I will try next week to  make a custom hashing algorithm.

I assume to accomplish this, I would need only to make a
CustomPasswordHashingInterceptor.java and add it in the config.ldif
file. Then add stuff to PasswordUtil.java and edit
SimpleAuthenticator.java.

Does this sound like the right track?

Thanks again,
Kevin

On Fri, Jul 15, 2011 at 1:22 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
> On 7/15/11 7:19 PM, Kevin Hamilton wrote:
>>
>> Hi Kiran,
>>
>> I downloaded ApacheDS v1.5.7 and am using Apache Directory Studio as
>> my client for now. I am not sure what you mean by version ,2.0-M1. If
>> that is an updated version, could you direct to a place a could get
>> it? Thanks so much for your response.
>
> http://directory.apache.org/apacheds/2.0/downloads.html
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>

Re: ApacheDS Interceptor

Posted by Emmanuel Lecharny <el...@gmail.com>.
On 7/15/11 7:19 PM, Kevin Hamilton wrote:
> Hi Kiran,
>
> I downloaded ApacheDS v1.5.7 and am using Apache Directory Studio as
> my client for now. I am not sure what you mean by version ,2.0-M1. If
> that is an updated version, could you direct to a place a could get
> it? Thanks so much for your response.

http://directory.apache.org/apacheds/2.0/downloads.html


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: ApacheDS Interceptor

Posted by Kevin Hamilton <kh...@umem.org>.
Hi Kiran,

I downloaded ApacheDS v1.5.7 and am using Apache Directory Studio as
my client for now. I am not sure what you mean by version ,2.0-M1. If
that is an updated version, could you direct to a place a could get
it? Thanks so much for your response.

Thanks,
Kevin

On Fri, Jul 15, 2011 at 1:08 PM, Kiran Ayyagari <ka...@apache.org> wrote:
> 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" <st...@labeo.de> 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
>>
>>
>

Re: ApacheDS Interceptor

Posted by Kiran Ayyagari <ka...@apache.org>.
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" <st...@labeo.de> 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
>
>