jp-gouin commented on a change in pull request #3894:
URL: https://github.com/apache/apisix/pull/3894#discussion_r720840414



##########
File path: docs/en/latest/plugins/ldap-auth.md
##########
@@ -0,0 +1,151 @@
+---
+title: ldap-auth
+---
+
+<!--
+#
+# 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 regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Summary
+
+- [**Name**](#name)
+- [**Attributes**](#attributes)
+- [**How To Enable**](#how-to-enable)
+- [**Test Plugin**](#test-plugin)
+- [**Disable Plugin**](#disable-plugin)
+
+## Name
+
+`ldap-auth` is an authentication plugin that can works with `consumer`. Add 
Ldap Authentication to a `service` or `route`.
+
+The `consumer` then authenticate against the Ldap server using Basic 
authentication.
+
+For more information on Basic authentication, refer to 
[Wiki](https://en.wikipedia.org/wiki/Basic_access_authentication) for more 
information.
+
+This authentication plugin use [lualdap](https://lualdap.github.io/lualdap/) 
plugin to connect against the ldap server
+
+## Attributes
+
+| Name     | Type   | Requirement | Default | Valid | Description              
                                                                                
                                                        |
+| -------- | ------ | ----------- | ------- | ----- | 
----------------------------------------------------------------------------------------------------------------------------------------------------------------
 |
+| base_dn | string | required    |         |       | the base dn of the `ldap` 
server (example : `ou=users,dc=example,dc=org`)   |
+| ldap_uri | string | required    |         |       | the uri of the ldap 
server  |
+| use_tls | boolean | optional    |    `true`     |       | Boolean flag 
indicating if Transport Layer Security (TLS) should be used. |
+| uid | string | optional    |     `cn`      |     | the `uid` attribute |
+
+## How To Enable
+
+### 1. set a consumer and config the value of the `ldap-auth` option
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "username": "foo",
+    "plugins": {
+        "ldap-auth": {
+            "user_dn": "cn=user01,ou=users,dc=example,dc=org"
+        }
+    }
+}'
+```
+
+you can visit Dashboard `http://127.0.0.1:9080/apisix/dashboard/` and add a 
Consumer through the web console.

Review comment:
       Ok will remove , actually it’s a copy paste from 
https://github.com/apache/apisix/blob/34df010cfc1083b653d0cb85c6d724716855277a/docs/en/latest/plugins/basic-auth.md#L64
 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to