##// END OF EJS Templates
docs: added example ldap/ad configuration inside rhodecode-auth
marcink -
r1560:ee329948 default
parent child Browse files
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -1,22 +1,29 b''
1 .. _ldap-act-dir-ref:
1 .. _ldap-act-dir-ref:
2
2
3 Active Directory
3 Active Directory
4 ----------------
4 ----------------
5
5
6 |RCM| can use Microsoft Active Directory for user authentication. This is
6 |RCM| can use Microsoft Active Directory for user authentication. This is
7 done through an LDAP or LDAPS connection to Active Directory. Use the
7 done through an LDAP or LDAPS connection to Active Directory. Use the
8 following example LDAP configuration setting to set your Active Directory
8 following example LDAP configuration setting to set your Active Directory
9 authentication.
9 authentication.
10
10
11 .. code-block:: ini
11 .. code-block:: ini
12
12
13 # Set the Base DN
13 # Set the Base DN
14 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
14 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
15 # Set the Active Directory SAM-Account-Name
15 # Set the Active Directory SAM-Account-Name
16 Login Attribute = sAMAccountName
16 Login Attribute = sAMAccountName
17 # Set the Active Directory user name
17 # Set the Active Directory user name
18 First Name Attribute = usernameame
18 First Name Attribute = usernameame
19 # Set the Active Directory user surname
19 # Set the Active Directory user surname
20 Last Name Attribute = user_surname
20 Last Name Attribute = user_surname
21 # Set the Active Directory user email
21 # Set the Active Directory user email
22 E-mail Attribute = userEmail No newline at end of file
22 E-mail Attribute = userEmail
23
24
25 Below is example setup that can be used with Active Directory and ldap groups.
26
27 .. image:: ../images/ldap-groups-example.png
28 :alt: LDAP/AD setup example
29 :scale: 50 % No newline at end of file
@@ -1,107 +1,113 b''
1 .. _ldap-gloss-ref:
1 .. _ldap-gloss-ref:
2
2
3 |LDAP| Glossary
3 |LDAP| Glossary
4 ---------------
4 ---------------
5
5
6 This topic aims to give you a concise overview of the different settings and
6 This topic aims to give you a concise overview of the different settings and
7 requirements that enabling |LDAP| on |RCE| requires.
7 requirements that enabling |LDAP| on |RCE| requires.
8
8
9 Required settings
9 Required settings
10 ^^^^^^^^^^^^^^^^^
10 ^^^^^^^^^^^^^^^^^
11
11
12 The following LDAP attributes are required when enabling |LDAP| on |RCE|.
12 The following LDAP attributes are required when enabling |LDAP| on |RCE|.
13
13
14 * **Hostname** or **IP Address**: Use a comma separated list for failover
14 * **Hostname** or **IP Address**: Use a comma separated list for failover
15 support.
15 support.
16 * **First Name**
16 * **First Name**
17 * **Surname**
17 * **Surname**
18 * **Email**
18 * **Email**
19 * **Port**: Port `389` for unencrypted LDAP or port `636` for SSL-encrypted
19 * **Port**: Port `389` for unencrypted LDAP or port `636` for SSL-encrypted
20 LDAP (LDAPS).
20 LDAP (LDAPS).
21 * **Base DN (Distinguished Name)**: The Distinguished Name (DN)
21 * **Base DN (Distinguished Name)**: The Distinguished Name (DN)
22 is how searches for users will be performed, and these searches can be
22 is how searches for users will be performed, and these searches can be
23 controlled by using an LDAP Filter or LDAP Search Scope. A DN is a sequence of
23 controlled by using an LDAP Filter or LDAP Search Scope. A DN is a sequence of
24 relative distinguished names (RDN) connected by commas. For example,
24 relative distinguished names (RDN) connected by commas. For example,
25
25
26 .. code-block:: vim
26 .. code-block:: vim
27
27
28 DN: cn='Monty Python',ou='people',dc='example',dc='com'
28 DN: cn='Monty Python',ou='people',dc='example',dc='com'
29
29
30 * **Connection security level**: The following are the valid types:
30 * **Connection security level**: The following are the valid types:
31
31
32 * *No encryption*: This connection type uses a plain non-encrypted connection.
32 * *No encryption*: This connection type uses a plain non-encrypted connection.
33 * *LDAPS connection*: This connection type uses end-to-end SSL. To enable
33 * *LDAPS connection*: This connection type uses end-to-end SSL. To enable
34 an LDAPS connection you must set the following requirements:
34 an LDAPS connection you must set the following requirements:
35
35
36 * You must specify port `636`
36 * You must specify port `636`
37 * Certificate checks are required.
37 * Certificate checks are required.
38 * To enable ``START_TLS`` on LDAP connection, set the path to the SSL
38 * To enable ``START_TLS`` on LDAP connection, set the path to the SSL
39 certificate in the default LDAP configuration file. The default
39 certificate in the default LDAP configuration file. The default
40 `ldap.conf` file is located in `/etc/openldap/ldap.conf`.
40 `ldap.conf` file is located in `/etc/openldap/ldap.conf`.
41
41
42 .. code-block:: vim
42 .. code-block:: vim
43
43
44 TLS_CACERT /etc/ssl/certs/ca.crt
44 TLS_CACERT /etc/ssl/certs/ca.crt
45
45
46 * The LDAP username or account used to connect to |RCE|. This will be added
46 * The LDAP username or account used to connect to |RCE|. This will be added
47 to the LDAP filter for locating the user object.
47 to the LDAP filter for locating the user object.
48 * For example, if an LDAP filter is specified as `LDAPFILTER`,
48 * For example, if an LDAP filter is specified as `LDAPFILTER`,
49 the login attribute is specified as `uid`, and the user connects as
49 the login attribute is specified as `uid`, and the user connects as
50 `jsmith`, then the LDAP Filter will be like the following example.
50 `jsmith`, then the LDAP Filter will be like the following example.
51
51
52 .. code-block:: vim
52 .. code-block:: vim
53
53
54 (&(LDAPFILTER)(uid=jsmith))
54 (&(LDAPFILTER)(uid=jsmith))
55
55
56 * The LDAP search scope must be set. This limits how far LDAP will search for
56 * The LDAP search scope must be set. This limits how far LDAP will search for
57 a matching object.
57 a matching object.
58
58
59 * ``BASE`` Only allows searching of the Base DN.
59 * ``BASE`` Only allows searching of the Base DN.
60 * ``ONELEVEL`` Searches all entries under the Base DN,
60 * ``ONELEVEL`` Searches all entries under the Base DN,
61 but not the Base DN itself.
61 but not the Base DN itself.
62 * ``SUBTREE`` Searches all entries below the Base DN, but not Base DN itself.
62 * ``SUBTREE`` Searches all entries below the Base DN, but not Base DN itself.
63
63
64 .. note::
64 .. note::
65
65
66 When using ``SUBTREE`` LDAP filtering it is useful to limit object location.
66 When using ``SUBTREE`` LDAP filtering it is useful to limit object location.
67
67
68 Optional settings
68 Optional settings
69 ^^^^^^^^^^^^^^^^^
69 ^^^^^^^^^^^^^^^^^
70
70
71 The following are optional when enabling LDAP on |RCM|
71 The following are optional when enabling LDAP on |RCM|
72
72
73 * An LDAP account is only required if the LDAP server does not allow
73 * An LDAP account is only required if the LDAP server does not allow
74 anonymous browsing of records.
74 anonymous browsing of records.
75 * An LDAP password is only required if the LDAP server does not allow
75 * An LDAP password is only required if the LDAP server does not allow
76 anonymous browsing of records
76 anonymous browsing of records
77 * Using an LDAP filter is optional. An LDAP filter defined by `RFC 2254`_. This
77 * Using an LDAP filter is optional. An LDAP filter defined by `RFC 2254`_. This
78 is more useful that the LDAP Search Scope if set to `SUBTREE`. The filter
78 is more useful that the LDAP Search Scope if set to `SUBTREE`. The filter
79 is useful for limiting which LDAP objects are identified as representing
79 is useful for limiting which LDAP objects are identified as representing
80 Users for authentication. The filter is augmented by Login Attribute
80 Users for authentication. The filter is augmented by Login Attribute
81 below. This can commonly be left blank.
81 below. This can commonly be left blank.
82 * Certificate Checks are only required if you need to use LDAPS.
82 * Certificate Checks are only required if you need to use LDAPS.
83 You can use the following levels of LDAP service with RhodeCode Enterprise:
83 You can use the following levels of LDAP service with RhodeCode Enterprise:
84
84
85 * **NEVER** : A serve certificate will never be requested or checked.
85 * **NEVER** : A serve certificate will never be requested or checked.
86 * **ALLOW** : A server certificate is requested. Failure to provide a
86 * **ALLOW** : A server certificate is requested. Failure to provide a
87 certificate or providing a bad certificate will not terminate the session.
87 certificate or providing a bad certificate will not terminate the session.
88 * **TRY** : A server certificate is requested. Failure to provide a
88 * **TRY** : A server certificate is requested. Failure to provide a
89 certificate does not halt the session; providing a bad certificate
89 certificate does not halt the session; providing a bad certificate
90 halts the session.
90 halts the session.
91 * **DEMAND** : A server certificate is requested and must be provided
91 * **DEMAND** : A server certificate is requested and must be provided
92 and authenticated for the session to proceed.
92 and authenticated for the session to proceed.
93 * **HARD** : The same as DEMAND.
93 * **HARD** : The same as DEMAND.
94
94
95 .. note::
95 .. note::
96
96
97 Only **DEMAND** or **HARD** offer full SSL security while the other
97 Only **DEMAND** or **HARD** offer full SSL security while the other
98 options are vulnerable to man-in-the-middle attacks.
98 options are vulnerable to man-in-the-middle attacks.
99
99
100 |RCE| uses ``OPENLDAP`` libraries. This allows **DEMAND** or
100 |RCE| uses ``OPENLDAP`` libraries. This allows **DEMAND** or
101 **HARD** LDAPS connections to use self-signed certificates or
101 **HARD** LDAPS connections to use self-signed certificates or
102 certificates that do not have traceable certificates of authority.
102 certificates that do not have traceable certificates of authority.
103 To enable this functionality install the SSL certificates in the
103 To enable this functionality install the SSL certificates in the
104 following directory: `/etc/openldap/cacerts`
104 following directory: `/etc/openldap/cacerts`
105
105
106
106
107 Below is example setup that can be used with Active Directory and ldap groups.
108
109 .. image:: ../images/ldap-groups-example.png
110 :alt: LDAP/AD setup example
111 :scale: 50 %
112
107 .. _RFC 2254: http://www.rfc-base.org/rfc-2254.html No newline at end of file
113 .. _RFC 2254: http://www.rfc-base.org/rfc-2254.html
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
General Comments 0
You need to be logged in to leave comments. Login now