Skip to content
This repository was archived by the owner on Jun 27, 2024. It is now read-only.

Commit 870ed65

Browse files
Faria1212gitbook-bot
authored andcommitted
GITBOOK-817: LDAP setup update
1 parent 84e10fc commit 870ed65

File tree

2 files changed

+35
-31
lines changed

2 files changed

+35
-31
lines changed

SUMMARY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
* [LDAP User Search](use-rocket.chat/authentication/ldap/ldap-user-search.md)
250250
* [LDAP Data Sync Settings](use-rocket.chat/authentication/ldap/ldap-data-sync-settings.md)
251251
* [LDAP Premium Settings](use-rocket.chat/authentication/ldap/ldap-premium-settings.md)
252-
* [LDAP Setup](use-rocket.chat/authentication/ldap/ldap-setup.md)
252+
* [LDAP Setup Example](use-rocket.chat/authentication/ldap/ldap-setup.md)
253253
* [SAML](use-rocket.chat/authentication/saml/README.md)
254254
* [SAML Configuration](use-rocket.chat/authentication/saml/saml-configuration.md)
255255
* [Active Directory Federation Services](use-rocket.chat/authentication/saml/active-directory-federation-services.md)

use-rocket.chat/authentication/ldap/ldap-setup.md

+34-30
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# LDAP Setup
1+
# LDAP Setup Example
22

3-
After exploring the comprehensive LDAP settings in Rocket.Chat, it's beneficial to examine practical examples of these configurations. This requires an up and running LDAP server, which we'll guide you through how to setup (using Osixia OpenLDAP) in order to build a clearer understanding of how Rocket.Chat's LDAP settings can be applied in real-world scenarios.
3+
After exploring the comprehensive LDAP settings in Rocket.Chat, it's beneficial to examine practical examples of these configurations. This requires an up-and-running LDAP server, which we'll guide you through how to set up (using [Osixia OpenLDAP](https://github.com/osixia/docker-openldap)) in order to build a clearer understanding of how Rocket.Chat's LDAP settings can be applied in real-world scenarios.
44

5-
## Running a LDAP Server
5+
## Running an LDAP Server
66

7-
Rocket.Chat allows workspace owners to connect to OpenLDAP or Active Directory LDAP servers to authenticate or retrieve information. In this first step, we'll guide you through how to setup a LDAP server using Docker and OpenLDAP, which is an open source implementation of the LDAP protocol. For starters, navigate to your preferred directory and create a `docker-compose.yml` file with the following content:
7+
Rocket.Chat allows workspace owners to connect to OpenLDAP or Active Directory LDAP servers to authenticate or retrieve information. In this first step, we'll guide you through how to set up an LDAP server using Docker and OpenLDAP, which is an open-source implementation of the LDAP protocol. For starters, navigate to your preferred directory and create a `docker-compose.yml` file with the following content:
88

99
```yaml
1010
services:
@@ -27,51 +27,55 @@ services:
2727
2828
Then, use `docker compose up` to start the container. This will locally deploy an **Osixia OpenLDAP** server running on port 389 (or 636 if the default one is unavailable).
2929

30-
Also, for the next steps you'll need to download and install [Apache Directory Studio](https://directory.apache.org/studio/downloads.html) (ADS), but any LDAP data management tool (such as phpLDAPadmin) will do the job. After installing, open your LDAP management tool and create a new connection (in ADS, this can be achieved through the **Connections** section) using the following information:
30+
Also, for the next steps, you'll need to download and install [Apache Directory Studio](https://directory.apache.org/studio/downloads.html) (ADS), but any LDAP data management tool (such as phpLDAPadmin) will do the job. After installing, open your LDAP management tool and create a new connection (in ADS, this can be achieved through the **Connections** section) using the following information:
3131

32-
* **Host name:** `localhost`;
33-
* **Port:** 389;
34-
* **Authentication method:** Simple authentication;
35-
* **Admin user's Bind DN:** `cn=admin,dc=rcldap,dc=com,dc=br`;
36-
* **Bind password:** admin;
32+
* **Host name:** `localhost`
33+
* **Port:** `389`
34+
* **Authentication method:** `Simple authentication`
35+
* **Admin user's Bind DN:** `cn=admin,dc=rcldap,dc=com,dc=br`
36+
* **Bind password:** `admin`
3737

3838
Apache Directory Studio's authentication model should look as follows (click "Finish" to complete the connection's setup):
3939

4040
![ADS connection setup](../../../.gitbook/assets/ldap-apache-new-connection-auth.png)
4141

42-
After succesfully connecting to the LDAP server through ADS, a LDAP tree structure containing an admin and the standard domain (`dc=rcldap,dc=com,dc=br`) should be displayed:
42+
After successfully connecting to the LDAP server through ADS, an LDAP tree structure containing an admin and the standard domain (`dc=rcldap,dc=com,dc=br`) should be displayed:
4343

4444
![LDAP Server tree structure result before full setup](../../../.gitbook/assets/ldap-apache-start.png)
4545

4646
ADS is now ready to populate the LDAP server with groups and users that can connect to Rocket.Chat.
4747

48-
## Adding organizational units, users and groups
48+
## Add organizational units, users, and groups
4949

5050
For this example's use case, all users and organizational units will be added under the default domain already provided after setting up the LDAP server.
5151

5252
{% hint style="info" %}
53-
You can refer to [Oracle LDAP Security Fundamentals Docs](https://docs.oracle.com/cd/E79533\_01/VSMGU/ldap001.htm) for more info about Users, Groups and Organizational Units in LDAP servers.
53+
Refer to [Oracle LDAP Security Fundamentals Docs](https://docs.oracle.com/cd/E79533\_01/VSMGU/ldap001.htm) for details about Users, Groups, and Organizational Units in LDAP servers.
5454
{% endhint %}
5555

56-
After setting up all organizational units, groups and users as described in the next steps, your LDAP tree structure should look as follows:
56+
After setting up all organizational units, groups, and users as described in the next steps, your LDAP tree structure should look as follows:
5757

5858
![LDAP Server tree structure result after setup](../../../.gitbook/assets/ldap-result.png)
5959

6060
### Organizational units
6161

62-
In order to add new organizational units within the default domain, right-click on its element (`dc=rcldap,dc=com,dc=br`) in the tree structure, then choose **New > New Entry** and follow the steps provided below (for this example, we'll need two organizational units created with the `organizationalUnit` object class: **Users** and **Groups**).
62+
To add new organizational units within the default domain, right-click on its element (`dc=rcldap,dc=com,dc=br`) in the tree structure, then choose **New > New Entry** and follow the steps provided in the screenshot below.
63+
64+
Create two organizational units with the `organizationalUnit` object class: **Users** and **Groups**
6365

6466
![ADS steps for adding organizational units](../../../.gitbook/assets/ldap-ads-ou-steps.png)
6567

6668
### Users
6769

68-
For this example, users must be added under the Users organizational unit. This can be achieved with a right-click on the `ou=Users` element in the tree structure, then choose **New > New Entry** and follow the steps provided below (use the `inetOrgPerson` object class).
70+
For this example, users must be added under the **Users** organizational unit. Right-click on the `ou=Users` element in the tree structure, then choose **New > New Entry** and follow the steps provided below (use the `inetOrgPerson` object class).
6971

7072
![ADS steps for adding users](../../../.gitbook/assets/ldap-ads-users-steps.png)
7173

7274
### Groups
7375

74-
For this example, we'll only allow users that are members of a given LDAP group to log in to Rocket.Chat. In order to do that, add a new `RCUsers` group under the Groups organizational unit with a right-click on the `ou=Groups` element in the tree structure, then choose **New > New Entry** and follow the steps provided below (use the `groupOfNames` object class and browse to the user you just created in order to assign it to a `member` property of the group in the last step).
76+
For this example, we'll only allow users who are members of a given LDAP group to log in to Rocket.Chat. To do that, add a new `RCUsers` group under the **Groups** organizational unit with a right-click on the `ou=Groups` element in the tree structure, then select **New > New Entry** and follow the steps provided in the screenshot below.
77+
78+
Use the `groupOfNames` object class and browse to the user you just created in order to assign it to a `member` property of the group in the last step.
7579

7680
![ADS steps for adding groups](../../../.gitbook/assets/ldap-ads-groups-steps.png)
7781

@@ -81,31 +85,31 @@ More members can be added to the group later by adding new `member` attributes t
8185

8286
Access **Workspace > Settings > LDAP > Connection**, enable LDAP and configure the settings as follows:
8387

84-
* **Server Type:** `Other`;
85-
* **Host:** `localhost`;
86-
* **Port:** `389`.
88+
* **Server Type:** `Other`
89+
* **Host:** `localhost`
90+
* **Port:** `389`
8791

88-
Save the changes and press the **"Test Connection"** button in the upper right side of the screen. A "LDAP Connection Succesful" toast message should be displayed.
92+
Save the changes and press the **"Test Connection"** button on the upper-right side of the screen. An "LDAP Connection Succesful" toast message should be displayed.
8993

9094
## Authentication
9195

9296
Access **Workspace > Settings > LDAP > Connection > Authentication** and configure the settings as follows:
9397

94-
* **User DN:** `cn=admin,dc=rcldap,dc=com,dc=br`;
95-
* **Password:** `admin`.
98+
* **User DN:** `cn=admin,dc=rcldap,dc=com,dc=br`
99+
* **Password:** `admin`
96100

97101
## Search Filter
98102

99103
Access **Workspace > Settings > LDAP > User Search > Search Filter** and configure the settings as follows:
100104

101-
* **Base DN:** `dc=rcldap,dc=com,dc=br`;
102-
* **Filter:** `(objectclass=inetOrgPerson)`;
103-
* **Scope:** `sub`;
104-
* **Search Field:** `uid`;
105-
* **Search Page Size:** `250`;
106-
* **Search Size Limit:** `1000`.
105+
* **Base DN:** `dc=rcldap,dc=com,dc=br`
106+
* **Filter:** `(objectclass=inetOrgPerson)`
107+
* **Scope:** `sub`
108+
* **Search Field:** `uid`
109+
* **Search Page Size:** `250`
110+
* **Search Size Limit:** `1000`
107111

108-
After this step, you should be able to successfully search LDAP users in your workspace using the connection that has been setup. Try it with the "Test LDAP Search" button on the upper right side of the screen, specify an LDAP user's `uid` field and a successful toast message should be displayed.
112+
After this step, you should be able to successfully search LDAP users in your workspace using the connection that has been set up. Try it with the "Test LDAP Search" button on the upper right side of the screen. Specify an LDAP user's `uid` field, and a successful toast message should be displayed.
109113

110114
## Group Filter
111115

0 commit comments

Comments
 (0)