LDOups
Oups, we made another Rest API for LDAP.
We use Appsmith as Front.
Configuration
Parameter | Description |
---|---|
server |
Define host & port for LDOups API |
ldap.ro |
Read-only user used for Easy Login. When a user CN is given, a ldap search is done to find DN and allow LDAP authentication. |
ldap.url |
Url of ldap |
ldap.baseDN |
BaseDN of ldap |
ldap.usersObjectClassSearch |
User object used in your ldap schema |
ldap.userAttributes |
Attributes needed in your schema. If an attribute is required, it will trigger an API error if this attribute is missing during user updates (often used with user id). |
ldap.groupsObjectClassSearch |
user object used in your ldap schema |
ldap.groupAttributes |
Attributes needed in your schema. If an attribute is required, it will trigger an API error if this attribute is missing during group updates. |
Features
- CRUD User/Group
- Easy Login (use CN instead of DN)
- OpenAPI Static (
/openapi.yaml
) - Front example with Appsmith
- Dynamic OpenAPI Generation (depending on
ldap.userAttributes
andldap.groupAttributes
) - Use ZeroLog
- Generate GoDoc
- Unit Testing
Development
- Launch LDAP container :
docker run --detach --rm --name openldap \
-p 1389:1389 \
--env LDAP_ADMIN_USERNAME=admin \
--env LDAP_ADMIN_PASSWORD=admin \
bitnami/openldap:latest
-
Adapt
config.yaml
to adapt ldap url. -
Launch API
go get .
go run .
- Import some data
Run test.sh
to create users/groups in ldap from API.
- Launch Appsmith
Follow this guide
- Import in Appsmith
- Adapt LDOups API datasource in Appsmith
In Appsmith, adapt datasource to use the correct LDOups API host:port
Build
GOOS=linux GOARCH=amd64 go build -o ldoups-linux-amd64
GOOS=darwin GOARCH=amd64 go build -o ldoups-darwin-amd64