Crates.io | rldap |
lib.rs | rldap |
version | 0.1.0 |
source | src |
created_at | 2023-03-04 03:04:13.723905 |
updated_at | 2023-03-04 03:04:13.723905 |
description | A wrapper over ldap3 crate to easy create connection and send requests to openldap server. |
homepage | https://github.com/fabiokleis/rldap |
repository | https://github.com/fabiokleis/rldap |
max_upload_size | |
id | 800305 |
size | 36,950 |
using ldap bindings for rust, connecting on ldap server with docker containers envinronment
cargo build --target x86_64-unknown-linux-musl --release
cargo run --target x86_64-unknown-linux-musl --release
rldap are the application image
rldap-osixia-ldap are the ldap image
docker image pull fishingboo/rldap:latest
docker image pull fishingboo/rldap-osixia-openldap:latest
LDAP_DOMAIN=jacaranda.local
LDAP_SERVER=rldap.jacaranda.local
LDAP_BASE_DN=dc=jacaranda,dc=local
LDAP_BIND_DN=cn=admin,dc=jacaranda,dc=local
LDAP_ADMIN_PASSWORD=Mypasswd@123
Use the shell script test.sh to test rldap by creating two containers. One openldap server and other the rldap container that makes the ldap request. All connections by default are using ldaps in 636 port.
the openldap container that I used its docker-openldap I extend for my case following the advanced-user-guide
you need the shell scripts to test, ensure that they have permission
chmod +x test.sh; chmod +x ldap_build/build.sh
use the Makefile to build, up, and test containers
make # run build_ldap, build, up and test
make build # cleanups dangling images and build rldap image
make build_ldap # cleanups dangling images and build rldap-ldap image
make up # after builds steps, up containers rldap-ldap rldap-test
make test # after container start, make rldap-test request to rldap-ldap container
make update # builds rldap to linux-musl in --release target, copy rldap bin and .env to running rldap-test container
make clean # cleanups dangling images, stop containers and remove