[ 
https://issues.apache.org/jira/browse/DIRSERVER-1670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13555012#comment-13555012
 ] 

ikedam commented on DIRSERVER-1670:
-----------------------------------

I found this does not work still in 2.0.0-M9.

Why this does not work is:

# When the LDAP server sends a message  to the client, the message is processed 
with filters.
# org.apache.mina.filter.codec.ProtocolCodecFilter is in the filter chain, and 
it triggers two messages for one message passed from the upper layer: 1. 
Encoded message(that must be sent to the client), and 2. Empty message (that 
must not be sent to the client, for it is used for statistical purpose).
** This is in org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite .
** For more details, refer this article: 
http://mail-archives.apache.org/mod_mbox/mina-users/201009.mbox/%3C1619363085.5085691284239250748.JavaMail.root%40zimbra6-e1.priv.proxad.net%3E
# The first message is encoded with SASL layer, and sent to the client 
correctly.
# The second message, which is empty, is also encoded with SASL. This results 
that the message is converted to "00 00 00 00", and gets not empty.
# The second message "00 00 00 00" is sent to the client, for it's not empty. 
This message is invalid, and the LDAP client found it an error. This is 
"ldap_result: Can't contact LDAP server (-1)" in ldapsearch.
** You can see this by launching ldapsearch with "-d 255" option.


This problem is can be fixed in the following way.
* The class to modify: org.apache.directory.server.ldap.handlers.bind.SaslFilter
* The method to modify: filterWrite
* The way to modify: Check the message is empty ( that is, test bufferLength == 
0), and if so, don't wrap it with SASL module.
                
> DIGEST-MD5 authentication mechanism must support encryption
> -----------------------------------------------------------
>
>                 Key: DIRSERVER-1670
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1670
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.7
>         Environment: all
>            Reporter: Hendy Irawan
>
> While DIGEST-MD5 should work, encryption doesn't work currently.
> A workaround is to disable data security at the client side:
>     ldapsearch -O "maxssf=0" ... 
> However, this doesn't work for all clients. (e.g. Thunderbird)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to