Skip to content

Commit 989466e

Browse files
authored
Merge pull request #431 from quadespresso/ldapsearch-revision
update LDAP overview
2 parents 7acafef + 501ed6f commit 989466e

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

docs/guides/ldap/overview.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: LDAP Documentation
33
description: Integrate your App with a mock LDAP server
44
---
5+
56
# Mocking LDAP server
67

78
Mokapi simplifies the process of creating a basic read-only LDAP server mock, enabling you to efficiently test and debug your LDAP interactions. Whether your goal is to validate query accuracy or simulate specific LDAP entry scenarios, Mokapi provides a flexible and developer-friendly solution.
@@ -27,32 +28,32 @@ Below is an example of the simplest configuration, which does not include any cu
2728
This basic setup is ideal for testing and development purposes, where the focus is on simulating server behavior rather than interacting with actual LDAP entries. You can later extend this configuration by adding LDAP entries and more advanced server settings as needed.
2829

2930
```yaml tab=ldap.yaml
30-
ldap: 1.0 # file configuration version not LDAP protocol version
31+
ldap: 1.0 # file configuration version not LDAP protocol version
3132
host: :389
3233
```
3334
3435
To start Mokapi with a specific configuration file, you can use the --provider-file-filename option in the command line. This tells Mokapi to load the specified configuration file when it starts.
3536
3637
```bash
37-
mokapi --provider-file-filename ldap.yaml
38+
mokapi --providers-file-filename ldap.yaml
3839
```
3940

4041
## Setup a Simple LDAP Entry Structure
4142

42-
Mokapi allows you to configure your LDAP mock server using LDIF files. It supports a wide range of LDIF operations,
43-
such as adding new entries, modifying attributes, and even deleting attributes. This flexibility makes it
43+
Mokapi allows you to configure your LDAP mock server using LDIF files. It supports a wide range of LDIF operations,
44+
such as adding new entries, modifying attributes, and even deleting attributes. This flexibility makes it
4445
easy to simulate real-world LDAP scenarios and test different interactions with your server.
4546

46-
In your configuration file, you can reference multiple LDIF files. Mokapi will continuously monitor these files and
47-
automatically update the LDAP server whenever a change is detected. This dynamic reloading of LDIF files helps streamline
47+
In your configuration file, you can reference multiple LDIF files. Mokapi will continuously monitor these files and
48+
automatically update the LDAP server whenever a change is detected. This dynamic reloading of LDIF files helps streamline
4849
the testing and development process, ensuring that your mock server always reflects the latest configurations.
4950

5051
In the following example, we define an LDAP entry `dc=example,dc=com` and assign it the `top` object class.
5152
This entry is added to the `namingContexts` in the Root DSE. Additionally, we include a user entry for `cn=alice,dc=example,dc=com?`.
5253
This LDIF file can be referenced in the LDAP configuration file using a relative path.
5354

54-
``` box=tip
55-
You can also reference an LDIF file using an HTTP or GIT URL, allowing you to source configuration data from remote
55+
```box=tip
56+
You can also reference an LDIF file using an HTTP or GIT URL, allowing you to source configuration data from remote
5657
locations or version-controlled repositories for better integration and versioning.
5758
```
5859

@@ -72,7 +73,7 @@ cn: alice
7273
In the LDAP configuration, you would reference this LDIF file as follows:
7374

7475
```yaml tab=ldap.yaml
75-
ldap: 1.0 # file configuration version not LDAP protocol version
76+
ldap: 1.0 # file configuration version not LDAP protocol version
7677
host: :389
7778
files:
7879
- ./example.ldif
@@ -83,7 +84,7 @@ This setup provides a foundational LDAP structure, which you can build upon by a
8384
To query the example LDAP setup, you can use the ldapsearch command, which is a common tool for querying LDAP directories from the command line.
8485
8586
```bash
86-
ldapsearch -x -h localhost -p 389 -b "dc=example,dc=com" "(objectClass=*)"
87+
ldapsearch -x -H ldap://localhost:389 -b "dc=example,dc=com" "(objectClass=*)"
8788
# extended LDIF
8889
#
8990
# LDAPv3
@@ -97,7 +98,7 @@ dn:
9798
namingContext: dc=example,dc=com
9899
supportedLDAPVersion: 3
99100
vendorName: Mokapi
100-
vendorVersion: v0.11.2
101+
vendorVersion: 0.11.4
101102

102103
# example.com
103104
dn: dc=example,dc=com
@@ -141,4 +142,4 @@ text: Success
141142

142143
# numResponses: 2
143144
# numEntries: 1
144-
```
145+
```

0 commit comments

Comments
 (0)