janiussyafiq commented on code in PR #13794:
URL: https://github.com/apache/apisix/pull/13794#discussion_r3734080890


##########
docs/en/latest/plugins/ldap-auth-advanced.md:
##########
@@ -0,0 +1,283 @@
+---
+title: ldap-auth-advanced
+keywords:
+  - Apache APISIX
+  - API Gateway
+  - Plugin
+  - LDAP Authentication
+  - ldap-auth-advanced
+description: The ldap-auth-advanced Plugin authenticates users against an LDAP 
directory using search-then-bind, so users do not need to be enumerated in 
APISIX.
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+<head>
+  <link rel="canonical" href="https://docs.api7.ai/hub/ldap-auth-advanced"; />
+</head>
+
+## Description
+
+The `ldap-auth-advanced` Plugin adds LDAP authentication to a Route or a 
Service. Unlike [`ldap-auth`](./ldap-auth.md), which binds with a DN assembled 
from the Consumer configuration, this Plugin *searches* the directory for the 
user first, then binds as the entry it found. Users therefore do not need to be 
enumerated in APISIX.
+
+On each request the Plugin:
+
+1. Reads the credentials from the `Proxy-Authorization` header, falling back 
to `Authorization`.
+2. Searches `base_dn` for the entry whose `attribute` matches the supplied 
username, then binds as that entry with the supplied password.
+3. Attaches a matching [Consumer](../terminology/consumer.md), unless 
`consumer_required` is `false`.
+
+The credential header uses the scheme word given by `header_type`, which 
defaults to `ldap` rather than `basic`, so the default expects `Authorization: 
ldap <base64(username:password)>`. Set `header_type` to `basic` to accept 
ordinary [basic access 
authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) 
instead.
+
+The Plugin distinguishes two failure modes, so an outage is never reported as 
a rejected credential:
+
+| Status | Cause |
+|--------|-------|
+| `401` | Missing, malformed, or rejected credentials; a username matching 
more than one entry; or `consumer_required` is `true` and no Consumer matches. 
Returned with a `WWW-Authenticate` header. |
+| `500` | The directory is unreachable or the `bind_dn` credentials were 
rejected. |

Review Comment:
   fixed



##########
docs/en/latest/plugins/ldap-auth-advanced.md:
##########
@@ -0,0 +1,283 @@
+---
+title: ldap-auth-advanced
+keywords:
+  - Apache APISIX
+  - API Gateway
+  - Plugin
+  - LDAP Authentication
+  - ldap-auth-advanced
+description: The ldap-auth-advanced Plugin authenticates users against an LDAP 
directory using search-then-bind, so users do not need to be enumerated in 
APISIX.
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+<head>
+  <link rel="canonical" href="https://docs.api7.ai/hub/ldap-auth-advanced"; />
+</head>
+
+## Description
+
+The `ldap-auth-advanced` Plugin adds LDAP authentication to a Route or a 
Service. Unlike [`ldap-auth`](./ldap-auth.md), which binds with a DN assembled 
from the Consumer configuration, this Plugin *searches* the directory for the 
user first, then binds as the entry it found. Users therefore do not need to be 
enumerated in APISIX.

Review Comment:
   fixed



-- 
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