Coder Social home page Coder Social logo

open-ldap-rest-api's Introduction

Open LDAP REST API

This project was developed as part of my thesis in Harokopio University of Athens which aimed to develop a REST API for managing an LDAP server. By combining Node.js and Express technologies, it facilitates efficient and secure communication with the LDAP server, leveraging the ldapjs library.

Abstract

This REST API offers a secure and efficient means to manage, communicate with, and search data within an LDAP server. The primary objective was to provide a tool that stands robust in terms of reliability and security.

Key features and technologies include:

  • Node.js and Express: Foundation technologies for the REST API.
  • ldapjs library: Enables LDAP functionality.
  • Authentication mechanism: Users provide credentials to access the LDAP server and in return receive an encrypted cookie that heightens data security.
  • Clean Code Techniques: Emphasis on code quality and system's architecture using domain handlers, error handlers, and structured communications through gateways and servers.
  • Testing: Comprehensive test suites in the domain to ensure system quality.
  • Docker and Docker-compose: Ensuring the system can operate in a containerized environment, streamlining installation and development processes.

API Endpoints

This project offers a collection of endpoints to interact with the LDAP server. Here are some of the notable ones:

  1. Authentication

    • Login: POST {{baseurl}}/auth/login
  2. General Operations

    • Get Entries: GET {{baseurl}}/{{organizational_units}}
    • Get Entry by CN: GET {{baseurl}}/{{organizational_units}}/cns/:cn
    • Create Entry: POST {{baseurl}}/{{organizational_units}}
    • Delete Entry: DELETE {{baseurl}}/{{organizational_units}}/cns/:cn
    • Update Entry: PUT {{baseurl}}/{{organizational_units}}/cns/:cn

Refer to the Postman collection for detailed request structures and more endpoints.

Getting Started

First you need to have access to an LDAP server. If you don't have you can create your own using Apache Directory Studio and creating an external connection using ngrok

After you create your LDAP you need to create a local .env files to specify the values that are displayed on the example.env file then run npm install and npm run dev to run the project

open-ldap-rest-api's People

Contributors

liapisn avatar

Stargazers

Giorgos Iliopoulos avatar

Watchers

 avatar

open-ldap-rest-api's Issues

Hardcoding ou=System in client base search

Hi - As LDAP services are often set up with a different search base vs. ",ou=system" which is currently hardcoded. Request is to change this to an environment variable e.g. LDAP_BASE="dc=example, dc=org". In addition, a null ou should also be supported in the API URL/Path. Currently a null ou in the URL/Path returns a server issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.