jp-gouin opened a new pull request #3894:
URL: https://github.com/apache/apisix/pull/3894
### What this PR does / why we need it:
This PR add a new authentication plugin that use a LDAP server to
authenticate the user
This add a new type of `consumer`
```
"ldap-auth": {
"userdn": "cn=user01,dc=example,dc=org"
}
```
This plugin can also automatically create a consumer upon request if
`auto_create_consumer = true`
This fixes : #3861 and #1128
**Test cases are not fully operational yet.**
### Help needed
Also need help to add the deployment of an Openldap server on Github Action.
FYI i used the
(bitnami/openldap:2)(https://hub.docker.com/r/bitnami/openldap/) docker image
```
openldap:
image: bitnami/openldap:2
ports:
- '389:1389'
- '636:1636'
environment:
- LDAP_ADMIN_USERNAME=admin
- LDAP_ADMIN_PASSWORD=adminpassword
- LDAP_USERS=user01,user02
- LDAP_PASSWORDS=password1,password2
```
### Next feature
Add a group variable in the consumer , this group would come from the
`memberOf (configurable)` attribute of the ldap user and add it in the consumer.
Then plugins such as `consumer_restriction` could be updated to take into
account groups -> (which can also be used on `basic-auth (and more)` plugin
where a `consumer` can also be part of a group)
### Pre-submission checklist:
* [X] Did you explain what problem does this PR solve? Or what new features
have been added?
* [-] Have you added corresponding test cases?
* [X] Have you modified the corresponding document?
* [X] Is this PR backward compatible? **If it is not backward compatible,
please discuss on the [mailing
list](https://github.com/apache/apisix/tree/master#community) first**
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]