You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Sketch <sk...@yahoo.co.uk> on 2012/12/15 14:44:14 UTC

SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem

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<Interceptor> 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

Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem

Posted by Kiran Ayyagari <ka...@apache.org>.
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 <sk...@yahoo.co.uk>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<Interceptor> 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 <ka...@apache.org>
> *To:* users@directory.apache.org; Sketch <sk...@yahoo.co.uk>
> *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 <sk...@yahoo.co.uk>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 <ka...@apache.org>
> To: users@directory.apache.org; Sketch <sk...@yahoo.co.uk>
> 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 <sketchguard-apache@yahoo.co.uk
> >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<Interceptor> 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

Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem

Posted by Sketch <sk...@yahoo.co.uk>.
I originally tried it that way but I was getting a Null when trying to get the list prior to calling directoryService.startup().

List<Interceptor> 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 <ka...@apache.org>
To: users@directory.apache.org; Sketch <sk...@yahoo.co.uk> 
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 <sk...@yahoo.co.uk> 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 <ka...@apache.org>
>To: users@directory.apache.org; Sketch <sk...@yahoo.co.uk>
>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 <sk...@yahoo.co.uk>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<Interceptor> 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

Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem

Posted by Kiran Ayyagari <ka...@apache.org>.
Fixed at rev. 1423412. Please verify and let us know

Thank you for the report.

On Tue, Dec 18, 2012 at 3:28 PM, Sketch <sk...@yahoo.co.uk>wrote:

> Jira - https://issues.apache.org/jira/browse/DIRSERVER-1783
>
>   ------------------------------
> *From:* Kiran Ayyagari <ka...@apache.org>
> *To:* users@directory.apache.org; Sketch <sk...@yahoo.co.uk>
> *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 <sketchguard-apache@yahoo.co.uk
> >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 <ka...@apache.org>
> > To: users@directory.apache.org; Sketch <sk...@yahoo.co.uk>
> > 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 <sketchguard-apache@yahoo.co.uk
> > >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<Interceptor> 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

Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem

Posted by Sketch <sk...@yahoo.co.uk>.
Jira - https://issues.apache.org/jira/browse/DIRSERVER-1783


________________________________
 From: Kiran Ayyagari <ka...@apache.org>
To: users@directory.apache.org; Sketch <sk...@yahoo.co.uk> 
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 <sk...@yahoo.co.uk>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 <ka...@apache.org>
> To: users@directory.apache.org; Sketch <sk...@yahoo.co.uk>
> 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 <sketchguard-apache@yahoo.co.uk
> >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<Interceptor> 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

Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem

Posted by Kiran Ayyagari <ka...@apache.org>.
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 <sk...@yahoo.co.uk>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 <ka...@apache.org>
> To: users@directory.apache.org; Sketch <sk...@yahoo.co.uk>
> 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 <sketchguard-apache@yahoo.co.uk
> >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<Interceptor> 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

Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem

Posted by Sketch <sk...@yahoo.co.uk>.
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 <ka...@apache.org>
To: users@directory.apache.org; Sketch <sk...@yahoo.co.uk>
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 <sk...@yahoo.co.uk>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<Interceptor> 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


Re: SshaPasswordHasingInterceptor (2.0.0-M8 embedded) Problem

Posted by Kiran Ayyagari <ka...@apache.org>.
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 <sk...@yahoo.co.uk>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<Interceptor> 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