You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2013/04/08 19:32:18 UTC

svn commit: r1465691 - in /directory/site/trunk/content/apacheds/advanced-ug: 4.1.2-sasl-authn.mdtext 4.1.2.2-sasl-cram-md5-authn.mdtext 4.1.2.3-sasl-digest-md5-authn.mdtext 4.1.2.4-sasl-gssapi-authn.mdtext images/sasl-digest-md5-config.png

Author: elecharny
Date: Mon Apr  8 17:32:18 2013
New Revision: 1465691

URL: http://svn.apache.org/r1465691
Log:
Added the DIGEST-MD5 docuentation page

Added:
    directory/site/trunk/content/apacheds/advanced-ug/images/sasl-digest-md5-config.png   (with props)
Modified:
    directory/site/trunk/content/apacheds/advanced-ug/4.1.2-sasl-authn.mdtext
    directory/site/trunk/content/apacheds/advanced-ug/4.1.2.2-sasl-cram-md5-authn.mdtext
    directory/site/trunk/content/apacheds/advanced-ug/4.1.2.3-sasl-digest-md5-authn.mdtext
    directory/site/trunk/content/apacheds/advanced-ug/4.1.2.4-sasl-gssapi-authn.mdtext

Modified: directory/site/trunk/content/apacheds/advanced-ug/4.1.2-sasl-authn.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/advanced-ug/4.1.2-sasl-authn.mdtext?rev=1465691&r1=1465690&r2=1465691&view=diff
==============================================================================
--- directory/site/trunk/content/apacheds/advanced-ug/4.1.2-sasl-authn.mdtext (original)
+++ directory/site/trunk/content/apacheds/advanced-ug/4.1.2-sasl-authn.mdtext Mon Apr  8 17:32:18 2013
@@ -67,6 +67,14 @@ Configuring this list can also be done u
 
 ![ApacheDS SASL mechanisms configuration](images/sasl-mechanisms-config.png)
 
+## Usage and security
+
+Most of teh existing **SASL** mechanisms are just either useless (**PLAIN**, **ANONYMOUS**) or too weak to be used in a secured environement (**DIGEST-MD5** or **CRAM-MD5**).
+
+A new **SASL** mechanism has been designed to replace the last two mechanisms : **SCRAM** ([RFC 5802](http://www.ietf.org/rfc/rfc5802.txt)).
+
+In any case, if you are using one of those mechanisms, be sure to activate **TLS**.
+
 
 ## Specifications
 

Modified: directory/site/trunk/content/apacheds/advanced-ug/4.1.2.2-sasl-cram-md5-authn.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/advanced-ug/4.1.2.2-sasl-cram-md5-authn.mdtext?rev=1465691&r1=1465690&r2=1465691&view=diff
==============================================================================
--- directory/site/trunk/content/apacheds/advanced-ug/4.1.2.2-sasl-cram-md5-authn.mdtext (original)
+++ directory/site/trunk/content/apacheds/advanced-ug/4.1.2.2-sasl-cram-md5-authn.mdtext Mon Apr  8 17:32:18 2013
@@ -28,6 +28,12 @@ The **CRAM-MD5** **SASL** mechanism is d
 
 We will have an exchange between the client, which will send an empty _Bind request_ (ie, the username and credentials won't be sent the first time), and the server will return a challenge.
 
+<DIV class="warn" markdown="1">
+It's not recommanded to use this mechanism.
+</DIV>
+
+## Usage
+
 The client first send a _BindRequest_ with no credentials:
 
     :::Text

Modified: directory/site/trunk/content/apacheds/advanced-ug/4.1.2.3-sasl-digest-md5-authn.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/advanced-ug/4.1.2.3-sasl-digest-md5-authn.mdtext?rev=1465691&r1=1465690&r2=1465691&view=diff
==============================================================================
--- directory/site/trunk/content/apacheds/advanced-ug/4.1.2.3-sasl-digest-md5-authn.mdtext (original)
+++ directory/site/trunk/content/apacheds/advanced-ug/4.1.2.3-sasl-digest-md5-authn.mdtext Mon Apr  8 17:32:18 2013
@@ -23,3 +23,92 @@ Notice: Licensed to the Apache Software 
     under the License.
 
 # 4.1.2.3 - SASL DIGEST-MD5 Authentication
+
+The **DIGEST-MD5** **SASL** mechanism is defined by [RFC 2829](http://www.ietf.org/rfc/rfc2829.txt), which has been moved to an _historic_ status by [RFC 6331](http://www.ietf.org/rfc/rfc6631.txt), due to its intrinsec weaknesses.
+
+<DIV class="warn" markdown="1">
+It's not recommanded to use this mechanism.
+</DIV>
+
+## Usage
+
+As for **CRAM-MD5** mechanism, there is an exchange between the server and the client. First, the client sends a _BindRequest_ with no credentials :
+
+    :::Text
+    MessageType : BIND_REQUEST
+    Message ID : 1
+        BindRequest
+            Version : '3'
+            Name : 'null'
+            Sasl credentials
+                Mechanism :'DIGEST-MD5'
+                Credentials : null
+
+The server respons with a _BindResponses_ containing a challenge :
+
+    :::Text
+    MessageType : BIND_RESPONSE
+    Message ID : 2
+        BindResponse
+            Ldap Result
+                Result code : (SUCCESS) success
+                Matched Dn : ''
+                Diagnostic message : ''
+            Server sasl credentials : '0x72 0x73 0x70 0x61 0x75 0x74 0x68 0x3D 0x37 0x36 0x32 0x64 0x30 0x37 0x32 0x32 0x37 0x64 0x39 0x32 0x33 0x63 0x38 0x38 0x38 0x32 0x64 0x35 0x65 0x63 0x34 0x38 0x30 0x37 0x66 0x36 0x66 0x33 0x34 0x65 '
+
+
+The client then compute the credentials, which contains many informations, some of them being digested with the server's provided data :
+
+    :::Text
+    MessageType : BIND_REQUEST
+    Message ID : 2
+        BindRequest
+            Version : '3'
+            Name : 'null'
+            Sasl credentials
+                Mechanism :'DIGEST-MD5'
+                Credentials : (omitted-for-safety)
+
+Here, the credentials content is encoded a a byte[], representing those data :
+
+    :::Text
+    charset = utf-8
+    username = "hnelson"
+    realm = "example.com"
+    nonce = "XVss/yPp4ZToAItV2acf5jgCYU1ALDNoUzGSqJZA" 
+    nc = 00000001
+    cnonce = "rQRG4H27HqvdjDVh1OhtrtYD88daWWdvfAj9XGl2"
+    digest-uri = "ldap/localhost"
+    maxbuf = 65536 
+    response = ef 63 c3 b9 c3 76 7e e6 c8 4b eb e7 7b 6e d4 56, 
+    qop = auth
+
+One of the big difference with **CRAM-MD5** is that we send a _realm_ (**example.com** here), which must be configured on the server and on the client.
+
+The authentication requires 3 pieces of information on the client side :
+
+    * the userName
+    * the realm
+    * the user password
+
+## Server configuration
+
+There are a few parameters we need to configure on the server to allow this mechanism to work. First, we need to define the _searchBaseDn_, which describes where will the server look for entries having the **UID** attributeType. This is a part of the _ldapServer_ configuration :
+
+![ApacheDS SASL searchBaseDn Configuration](images/sasl-digest-md5-config.png)
+
+This parameter (_ads_searchBaseDn_ attributeType) can be found on the following entry :
+
+    :::Text
+    ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
+
+You also have to configure the **SaslRealms** which is also contained into the same entry (_ads_saslrealms_ attributeType)
+
+
+<DIV class="note" markdown="1">
+ApacheDS expect the given name to be stored in the **UID** Attribute. This is not configurable in this version of the server.
+</DIV>
+
+<DIV class="warn" markdown="1">
+The password must be stored in clear text on the server. This is a serious weakness...
+</DIV>

Modified: directory/site/trunk/content/apacheds/advanced-ug/4.1.2.4-sasl-gssapi-authn.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/advanced-ug/4.1.2.4-sasl-gssapi-authn.mdtext?rev=1465691&r1=1465690&r2=1465691&view=diff
==============================================================================
--- directory/site/trunk/content/apacheds/advanced-ug/4.1.2.4-sasl-gssapi-authn.mdtext (original)
+++ directory/site/trunk/content/apacheds/advanced-ug/4.1.2.4-sasl-gssapi-authn.mdtext Mon Apr  8 17:32:18 2013
@@ -1,12 +1,12 @@
 Title: 4.1.2.4 - SASL GSSAPI Authentication
 NavPrev: 4.1.2.3-sasl-digest-md5-authn.html
-NavPrevText: 4.1.2.3 - SASL DIGEST-MD5 Authentication
+NavPrevText: 4.1.2.4 - SASL GSSAPI Authentication
 NavPrev: 4.1.2.3-sasl-digest-md5-authn.html
 NavPrevText: 4.1.2.3 - SASL DIGEST-MD5 Authentication
 NavUp: 4.1.2-sasl-authn.html
 NavUpText: 4.1.2 - SASL Authentication
-NavNext: 4.1.2.3-sasl-cram-md5-authn.html
-NavNextText: 4.1.2.3 - SASL CRAM-MD5 Authentication
+NavNext: 4.1.2.5-sasl-external-authn.html
+NavNextText: 4.1.2.5 - SASL EXTERNAL Authentication
 Notice: Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information

Added: directory/site/trunk/content/apacheds/advanced-ug/images/sasl-digest-md5-config.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/advanced-ug/images/sasl-digest-md5-config.png?rev=1465691&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/apacheds/advanced-ug/images/sasl-digest-md5-config.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream