The Wayback Machine - https://web.archive.org/web/20241108204301/https://www.geeksforgeeks.org/lightweight-directory-access-protocol-ldap/
Open In App

Lightweight Directory Access Protocol (LDAP)

Last Updated : 21 Jun, 2019
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Lightweight Directory Access Protocol (LDAP) is an internet protocol works on TCP/IP, used to access information from directories. LDAP protocol is basically used to access an active directory.

Features of LDAP:

  1. Functional model of LDAP is simpler due to this it omits duplicate, rarely used and esoteric feature.
  2. It is easier to understand and implement.
  3. It uses strings to represent data

Directories:
Directories are set of object with similar attributes, organised in a logical and hierarchical manner. For example, Telephonic Directories. It is a distributed database application used to manage attributes in a directory.

LDAP defines operations for accessing and modifying directory entries such as:

  • Searching for user specified criteria
  • Adding an entry
  • Deleting an entry
  • Modifying an entry
  • Modifying the distinguished name or relative distinguished name of an entry
  • Comparing an entry

LDAP Models:
LDAP can be explained by using four models upon which it based:

  1. Information Model:
    This model describes structure of information stored in an LDAP Directory.In this basic information is stored in directory is called an entity. Entries here represents object of interest in real world such as people, server, organization, etc. Entries contain collection of attributes that contain information about object.Every attribute has a type and one or more values. Here types of attribute is associated with syntax and syntax specifies what kind of values can be stored

  2. Naming Model:
    This model describes how information in an LDAP Directory is organized and identified. In this entries are organized in a Tree-Like structure called Directory Information Tree (DIT). Entries are arranged within DIT based on their distinguished name DN. DN is a unique name that unambiguously identifies a single entry.

  3. Functional Model:
    LDAP defines operations for accessing and modifying directory entries . In this we discuss about LDAP operations in a programming language independent manner LDAP operations can be divided into following categories:

    • Query
    • Update 
    • Authentication 
  4. Security Model:
    This model describes how information in LDAP directory can be protected from unauthorized access. It is based on BIND operation. There are several bind operation can be performed.

LDAP Client and Server Interaction:
It is quite similar to any other client-server interaction. In this client performs protocol functions against server.The interaction takes place as follows:-

  1. A protocol request is send to server by client.
  2. Server perform operations on directory such as search, update, delete, etc.
  3. The response is sent back to the client.

Microsoft, Open LDAP, Sun, etc can easily be made an LDAP server. if the user don’t want to install directory service but want to use LDAP instruction for available LDAP server then user can use four11, bigfoot etc. Making an LDAP client is quite simple as there are SDK’s in many programming languages such as C, C++, Perl, Java, etc.

User has to perform certain task to be LDAP client:

(i) Go get SDK for your language
(ii) Use function of SDK to connect to LDAP 
(iii) Operate on LDAP 

LDAP functions / operations:

  • (a) For Authentication:
    It includes bind, unbind and abandon operations used to connect and disconnect to and from an LDAP server, establish access rights and protect information. In authentication, client session is established and ended using the functions

    -> BIND/UNBIND
    -> Abandon 
  • (b) For Query:
    It includes search and compare operations used to retrieve information from a directory. In query, server performs action using function

    -> Search
    -> Compare Entry 
  • (c) For Update:
    It includes add, delete, modify and modify RDN operations used to update stored information in a directory. In update, we can make changes in directories by using function

    -> Add an entry
    -> Delete an entry
    -> Modify an entry 
  • Client establishes session with server (BIND) using Hostname/IP/and Port Number. For security purposes, user set USER-ID and Password based authentication.
  • Server perform operations such as read, update, search, etc.
  • Client end session using UNBIND or Abandon function.

Advantages of LDAP:

  • Data present in LDAP is available to many clients and libraries.
  • LDAP support many types of application.
  • LDAP is very general and has basic security.

Disadvantages in LDAP:
It does not handle well relational database.



Similar Reads

Difference between LDAP and RADIUS
1. Lightweight Directory Access Protocol (LDAP) : LDAP stands for Lightweight Directory Access Protocol. It is a protocol that's used for locating anyone to locate individuals, organizations, and other devices during a network regardless of being on public or corporate internet. It is used as Directories-as-a-Service and is the grounds for Microsof
5 min read
Difference between LDAP and OAuth 2
1. Lightweight Directory Access Protocol (LDAP) : LDAP stands for Lightweight Directory Access Protocol. It is a protocol that's used for locating anyone to locate individuals, organizations, and other devices during a network regardless of being on public or corporate internet. It is used as Directories-as-a-Service and is the grounds for Microsof
4 min read
Difference between LDAP and Kerberos
LDAP and Kerberos are two of the common protocols known in the realm of network security and authentication; although they are used for different purposes. Of most importance to anyone dealing with secure networks is the need to be able to distinguish between an LDAP and Kerberos since the two form an integral part of how access and identities are
6 min read
Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol used to provide redundancy in a network. Only one router is the active router while others will be in standby state i.e the standby router will be responsible for forwarding the traffic when the active router fails. Virtual Router Redundancy Protocol (VRRP) is an open standard proto
3 min read
Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) in Data Link Layer
Layer 2 or the Datalink layer provides physical addressing and access to media. It defines how data is to be formatted for transmission and how access to the network is to be controlled. It also provides error detection, ensuring data on higher layers is formatted correctly for transmission. Cisco Discovery Protocol (CDP) and Link Layer Discovery P
2 min read
Difference between Stop and Wait protocol and Sliding Window protocol
Both the Stop and Wait protocol and the Sliding Window protocol are the techniques to the solution of flow control handling. The main difference between the Stop-and-wait protocol and the Sliding window protocol is that in the Stop-and-Wait Protocol, the sender sends one frame and waits for acknowledgment from the receiver whereas in the sliding wi
5 min read
Difference between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)
When dealing with network routing, it's crucial to understand the various protocols that help direct traffic across complex networks. Two significant protocols in this space are the Border Gateway Protocol (BGP) and the Routing Information Protocol (RIP). Each serves different purposes and operates under different principles. This article explores
5 min read
Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
Data transfer is the most common task in network and system communications, and they involve transfer of files using two means i.e the File Transfer Protocol (FTP) and the Secure File Transfer Protocol (SFTP). FTP is a commonly applied protocol that enables files to be transferred through a network from one computer to another, but FTP is unsecure
5 min read
Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP), are designed to avoid network loops in Ethernet. It provide loop-free logical topology. They were both designed to provide network reliability and particularly avoid broadcast radiation, but the major differences are on the rate, functionality and versatility. In this article we
5 min read
Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
SLIP and PPP, which are the widely used serial connection techniques, help to connect the distant devices of the network. The fullform of SLIP is Session Layer Internetworking Protocol. SLIP being a primitive protocol put into use during the early connections to the Internet, when there was not much overhead. PPP is slightly more complex as the pro
6 min read
Link Access Protocol D-channel (LAPD)
LAPD or Link Access Protocol on D channel is basically Layer 2 protocol usually required on ISDN D channel. It is being derived from Link Access Protocol Balanced (LAPB) protocol. It was specially designed and developed to simply satisfy the signaling requirements of ISDN basic access. The main objective of LAPD is simply to provide a secure, error
3 min read
Internet Message Access Protocol (IMAP)
The Internet Message Access Protocol (IMAP) serves as a cornerstone of cutting-edge email communication, facilitating seamless get admission to email messages. As a necessary element of the e-mail infrastructure, IMAP revolutionizes the manner customers interact with their digital correspondence. Unlike its predecessor, the Post Office Protocol (PO
6 min read
Active Directory PenTesting
Active Directory is a service from Microsoft which are being used to manage the services run by the Windows Server, in order to provide permissions and access to network resources. Active Directory is used by over 90% of the Fortune Companies in order to manage the resources efficiently. Active Directory is just like a phone book where we treat inf
4 min read
Difference between Search Engine and Subject Directory
1. Search Engine:A search engine, as the name suggests, is defined as an application designed to carry out web searches and enables users to locate information on WWW. Search engines are machine-driven and are used to find resources such as web pages, Usenet forums, videos, etc., assigned to individual words.Examples: Yahoo search, ASN, Live search
3 min read
Preventing Directory Traversal Vulnerability
Directory Traversal is a vulnerability that allows attackers to access files that are present outside the root directory or outside the home directory of that web server. The root directory has some internal files which are not accessible by the user. This vulnerability can be found in web servers or web application code. This type of attack is als
2 min read
What is a Directory Traversal Attack?
Directory Traversal Attack is a kind of Brute-force attack which will give potential access to restricted files and directories. This attack can also tell the attacker about the directory structure of the web application. It is very important to make web applications secure by giving protection to web content & giving controlled access. Directo
6 min read
How We Can Import Data From Active Directory Domain Services?
The Active Directory Domain Services can be a great source of information that we would like to import into our new Windows Server 2016. There are two ways that we can go about this, either exporting data from Active Directory Domain Services and then importing the data into the new domain, or migrating the domain out of Active Directory Domain Ser
7 min read
MAC Protocol Used in Wireless Sensor Networks
Pre-requisites: Classification of MAC Protocols In Wireless Sensor Networks (WSNs), the Medium Access Control (MAC) protocol is a set of guidelines that dictate how each node should transmit data over the shared wireless medium. The primary objective of the MAC protocol is to minimize the occurrence of idle listening, over-hearing, and collisions o
6 min read
Hot Standby Router Protocol (HSRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol, which provides redundancy for a local subnet. In HSRP, two or more routers gives an illusion of a virtual router. HSRP allows you to configure two or more routers as standby routers and only a single router as an active router at a time. All the routers in a single HSRP group share
4 min read
What is DCCP (Datagram Congestion Control Protocol)?
Congestion in a network means deterioration of network or services which are caused due to overloading of network nodes, basically, this problem is primarily associated with large networks, in which a large amount of data and information is being transmitted. Congestion can be caused by several reasons: either the routers which are being used are n
6 min read
Introduction of Virtual Router Redundancy Protocol (VRRP) and its configuration
VRRP is an open standard protocol, which is used to provide redundancy in a network. It is a network layer protocol (protocol number-112). The number of routers (group members) in a group acts as a virtual logical router which will be the default gateway of all the local hosts. If one router goes down, one of the other group members can take place
4 min read
Dynamic Trunking Protocol (DTP)
Trunk ports are ports that are used to carry the traffic of more than one VLAN. The port which connects two different switches and the switches have more than one VLAN configured then that port should be made trunk. If all the VLANs are allowed then trunk ports will carry traffic of all the VLANs including native VLANs for which the traffic goes un
4 min read
VLAN Trunking Protocol (VTP)
To carry traffic of a VLAN, it must be first configured on the switch. Suppose, if the user wants to send a frame from source to destination and the shortest path between them contains 1000 switches. To process a frame of any VLAN, VLANs should be configured first so, have to configure the same VLANs on all the 1000 switches manually. It will not b
5 min read
Root Bridge Election in Spanning Tree Protocol
Redundant links are used to provide a backup path when one link goes down but a Redundant link can sometimes cause switching loops. The main purpose of Spanning Tree Protocol (STP) is to ensure that you do not create loops when you have redundant paths in your network. Spanning Tree Protocol (STP) - As IEEE STP is used to make a loop-free network b
4 min read
Features of Enhanced Interior Gateway Routing Protocol (EIGRP)
Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco-proprietary Hybrid routing protocol that contains features of distance-vector and link-state routing protocols. It is a network layer protocol that works on protocol number 88. Some of its features are: Rapid convergence - EIGRP uses a DUAL algorithm to support rapid convergence. If a ro
4 min read
Open Shortest Path First (OSPF) Protocol fundamentals
Open shortest path first (OSPF) is a link-state routing protocol that is used to find the best path between the source and the destination router using its own shortest path first (SPF) algorithm. A link-state routing protocol is a protocol that uses the concept of triggered updates, i.e., if there is a change observed in the learned routing table
5 min read
Types of Spanning Tree Protocol (STP)
Prerequisite - Spanning Tree Protocol Spanning Tree Protocol (STP) is used to make a loop free network by monitoring the network to track all the links and shut down the least redundant ones. Root bridge is a switch in a single VLAN or whole topology (according to the type of STP standard used) which is responsible for distributing BPDUs and block
3 min read
Routing Information Protocol (RIP)
Routing Information Protocol (RIP) is a dynamic routing protocol that uses hop count as a routing metric to find the best path between the source and the destination network. It is a distance-vector routing protocol that has an AD value of 120 and works on the Network layer of the OSI model. RIP uses port number 520. Hop Count Hop count is the numb
6 min read
What is Anonymous FTP (File Transfer Protocol)?
AFTP (Anonymous File Transfer Protocol) is a network protocol used for transmitting files using TCP-based networks. Anonymous file transfer protocol lets a user move files anonymously from one computer to another. Anonymous FTP operates at layer 7; anonymous FTP permits anonymous external computer users without any designated password or user ID to
3 min read
Gateway Load Balancing Protocol (GLBP)
Gateway Load Balancing Protocol (GLBP) is one of First Hop Redundancy Protocol (FHRP) which provides redundancy like other First Hop Redundancy Protocol, also provides load Balancing. It is a Cisco proprietary protocol which can perform both functions. It provides load Balancing over multiple routers using single virtual IP address and multiple vir
5 min read
Article Tags :
three90RightbarBannerImg