Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-1670

DIGEST-MD5 authentication mechanism must support encryption

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.7
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      all

      Description

      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)

        Issue Links

          Activity

          Hendy Irawan created issue -
          Hendy Irawan made changes -
          Field Original Value New Value
          Link This issue is related to DIRSERVER-863 [ DIRSERVER-863 ]
          Hide
          ikedam added a comment -

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

          Why this does not work is:

          1. When the LDAP server sends a message to the client, the message is processed with filters.
          2. 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).
          3. The first message is encoded with SASL layer, and sent to the client correctly.
          4. 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.
          5. 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.
          Show
          ikedam added a comment - 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.

            People

            • Assignee:
              Unassigned
              Reporter:
              Hendy Irawan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development