{"id":21253030,"url":"https://github.com/lazhari/ldap-node","last_synced_at":"2026-04-10T02:02:05.910Z","repository":{"id":42340559,"uuid":"194292513","full_name":"Lazhari/ldap-node","owner":"Lazhari","description":"Search users on OpenLDAP server using ldapjs and express.","archived":false,"fork":false,"pushed_at":"2022-12-10T20:59:38.000Z","size":654,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T21:09:33.203Z","etag":null,"topics":["docker","docker-compose","express","ldap","ldapjs","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lazhari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2019-06-28T15:04:45.000Z","updated_at":"2025-01-11T01:41:58.000Z","dependencies_parsed_at":"2023-01-26T08:15:21.919Z","dependency_job_id":null,"html_url":"https://github.com/Lazhari/ldap-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazhari%2Fldap-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazhari%2Fldap-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazhari%2Fldap-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lazhari%2Fldap-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lazhari","download_url":"https://codeload.github.com/Lazhari/ldap-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690130,"owners_count":20331727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","express","ldap","ldapjs","nodejs"],"created_at":"2024-11-21T03:49:41.596Z","updated_at":"2025-12-31T00:22:54.575Z","avatar_url":"https://github.com/Lazhari.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LDAP Node.js\n\n\u003e Search users on OpenLDAP server using ldapjs and express.\n\nWorking with LDAP on dev environment isn't an easy thing, and especially when it comes to configuring an OpenLDAP only for development. So this project contains a simple implementation for users search feature from LDAP, and a docker environment for development based only on docker-compose, so there's no docker file.\n\nThe docker-compose has two services:\n\n- dev: lunches the express application using nodemon by running the script `dev` into package.js.\n- ldap: starts the OpenLdap server, adds the groups and users from `./ldif/directory.ldif`.\n\nBoth services working on the same network `ldap` network. So the ldapjs client on `dev` has access to ldap through this config:\n\n```javascript\nconst client = ldap.createClient({\n  url: \"ldap://ldap:389\"\n});\n```\n\n## Starting the dev environment\n\nTo make thing more pleasant, I created a make file, so need to remember all docker commands to start your project. first of all, you necessitate to install the dependencies and start the dev server via docker-compose up, by typing:\n\n```bash\nmake install\nmake dev\n```\n\nHola! now you can request the user's search thought out the Rest API, via:\n\n```bash\ncurl -X GET http://localhost:3000/users\n```\n\nBesides that, the search endpoint accepts `search` param query as cn filter for users search\n\n```bash\ncurl -X GET http://localhost:3000/users\\?search\\=mo\n```\n\n## Bonus\n\n### Generate a user password\n\n```bash\ndocker exec ldap slappasswd -h {SSHA} -s admin\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazhari%2Fldap-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flazhari%2Fldap-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazhari%2Fldap-node/lists"}