Nowdays LDAP is used everywhere for Authentication or crucial information management purpose. In this Article I have tried to explain basics of LDAP and also OpenLDAP basic configuration. Please let me know your queries and comments on it. Thanks. |
LDAP & OpenLDAP
LDAP - Lightweight Directory Access Protocol.
OpenLDAP - Server which operates on LDAP for eg. Microsoft AD
Directory Structure -
Five Major Characteristics of Directory Service -
Difference between Databases and Directory Services
Many people ask that can we use Database instead of Directory Service
SN Databases Directory Services
1. Information has more writes and reads More reads only, very less writes
2. Transactions, rollbacks, Transactions, rollbacks, write locks write locks are more important are less important
3. More Overheads Less Overheads
What is LDAP ?
LDAP vs X.500:
Main difference in LDAP and X.500 is LDAP uses TCP stack and X.500 uses OSI stack. Thats the reason LDAP is lightweight.
Uses of LDAP:
Directory Information Tree:
LDAP stores information in Directory Structure. Pictorial view of Directory Structure is called Directory Information Tree. See Below Figure:
dn: dc=example,dc=com
|
|
--------------------------------------------------------
| |
| |
dn: ou=groups,dc=example,dc=com dn:ou=people,dc=example,dc=com
|
|
dn: cn=neelesh,ou=people,dc=example,dc=com
Directory Structure:
OpenLDAP:
Please note that in our example we have used OpenLDAP as a LDAP server.
Please visit www.openldap.org for more details.
Features of OpenLDAP:
Components of OpenLDAP:
slapd.conf
I have divided slapd.conf into 4 Parts
1. Schema Inclusion
2. Backend DB & Directory Specific
3. Access Control
4. Other
Schemas
1. Schemas are used to define Attributes
2. It adds extendibility of LDAP
3. We can customize or add schemas
4. Generally Schema files are stored under /etc/ldap/schema
Schema Files Description
core.schema OpenLDAP core (required)
cosine.schema Cosine and Internet X.500 (useful)
inetorgperson.schema InetOrgPerson (useful)
misc.schema Assorted (experimental)
nis.schema Network Information Services (FYI)
openldap.schema OpenLDAP Project (experimental)
Libraries or modules
- Generally libraries are stored under /usr/lib/ldap
- It adds functionality and makes OpenLDAP modular
Backend DB
- OpenLDAP uses mainly following 2 embedded databases to store information
- BDB Berkely DB Transactional Backend
- HDB Hierarchical variant of BDB
- DB is stored under /var/lib/ldap
LDIF
- LDAP interchange format
- Collection of entries separated by new line
- Mapping attribute names to values
- It is used to import or export information from LDAP directory
LDAPclient
- LDAP client is used to connect to LDAP server
- You can add, edit, delete Directory entries
Important Terminologies
- Distinguished Name (DN) & Relative Distinguished Name (RDN)
DN is like the absolute path between root of File System and file
RDN is like Filename
Eg.
Entry ---- > dn: cn=admin,dc=example,dc=com
In above entry
DN is cn=admin,dc=example,dc=com
RDN is cn=admin
1. Attributes
- Attributes are used to store the values
- Attributes can be one or more values
- Attributes are defined in Schema Files
- In LDIF files, Declare Attribute by following way:
objectClass: organizationalUnit
In above example objectClass is Attribute and organizationalUnit is value.
2. objectClass Attributes
- Compulsory attribute with atleast one value
- It acts as a template for the data to be stored
|
About Me
- Kalyan Kumar Pasupuleti
- Kalyan Kumar Pasupuleti B-Tech(Information Technology). • AWS Certified Solutions Architect - Associate • RedHat Certified Engineer(RHCE) • Directory Services and Authentication Certificate of Expertise(LDAP) • Red Hat SELinux Policy Administration Certificate of Expertise(SELinux) • Network Services Security Certificate of Expertise (Network Services) • RedHat Certified Virtualization Administrator(RHCVA) • Red Hat Certified Security Specialist (RHCSS) Working as Cloud DevOps engineer
Tuesday, April 19, 2011
LDAP Basics
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment