OpenLDAP: LDAP directory को सुरक्षित रूप से कैसे चलाएँ?
slapd, directory entries, cn=config, TLS, ACL, replication और आम integration समस्याओं की जाँच समझें।
OpenLDAP LDAP directory सेवाएँ देने वाला open-source software suite है। इसका मुख्य server slapd users, groups, hosts और app settings जैसी directory entries संग्रहीत करता है और LDAPv3 client requests संभालता है। LDAP एक protocol है; OpenLDAP स्थापित करने से पूरा account management system या app permissions अपने-आप नहीं बनते।
यह परिचय 28 जनवरी 2026 को प्रकाशित OpenLDAP 2.6 Administrator’s Guide पर आधारित है, जिसे 19 नवंबर 2026 को जाँचा गया। Distribution package के अनुसार paths और defaults अलग हो सकते हैं; installed package के docs देखें।
Directory और सामान्य database
Directory attribute-आधारित entries की खोज और browsing, अधिक पढ़ने और साधारण updates के लिए उपयुक्त है। LDAP entry में attributes, unique Distinguished Name (DN), और आवश्यक/वैकल्पिक attributes व उनके प्रकार बताने वाला objectClass schema होता है। Backend entries रखता है; slapd अनुरोध को उस database में भेजता है जिसका suffix DN को कवर करता है। OpenLDAP 2.6 में MDB/LMDB local backend उपलब्ध है।
Directory साझा identity या configuration data के लिए उपयोगी हो सकती है। यदि app को जटिल multi-table transactions, rollback या कई records के लगातार updates चाहिए, तो relational database पर भी विचार करें।
slapd, cn=config और ACL
OpenLDAP 2.6 dynamic LDAP configuration database cn=config इस्तेमाल करता है। पुराना slapd.conf format अभी दस्तावेज़ित है, लेकिन 2.6 guide उसे भविष्य में हटाने हेतु deprecated कहती है। LDAP operations से config बदलें; live cn=config LDIF files सीधे edit न करें। Config tree तक पहुँच सीमित करें और restore योग्य backup रखें।
App permissions bind identity और server ACL पर निर्भर हैं; ACL का क्रम महत्वपूर्ण है। Guide चेतावनी देती है कि ACL तय न होने पर default frontend rule सभी को, anonymous users सहित, read access दे सकता है। Package defaults मानकर न चलें; प्रभावी global और database ACL जाँचें, खासकर password hashes और संवेदनशील attributes के लिए।
TLS और integration
LDAP simple bind अपने-आप password encrypt नहीं करता। StartTLS या LDAPS के जरिए verified TLS channel अपनाएँ और certificate chain तथा hostname जाँचें। Certificate error से बचने के लिए verification बंद न करें।
Integration plan: entries/schema/IDs/attributes तय करें; base DN और suffix मिलाएँ; service account को न्यूनतम access दें; TLS और bind method सेट करें; base, scope, filter और attributes test करें; size/time limits लगाएँ और संवेदनशील debug logs अनावश्यक रूप से न रखें। यह योजना है, सार्वभौमिक command recipe नहीं। Production से पहले installed package के test instance में जाँचें।
Replication और troubleshooting
syncrepl में configuration consumer पर होती है। Consumer provider से जुड़कर प्रारंभिक data लेता है, फिर updates पूछता या प्राप्त करता है। Read-only consumer read load बाँट सकता है। Multi-provider writes के लिए conflict, recovery और client routing की योजना जरूरी है। Replication backup नहीं है; directory data और cn=config दोनों का backup अलग रखें और restore test करें।
Connection failure: DNS, address, port, firewall, TLS certificate name देखें।
Bind failure: DN, password/SASL, TLS requirement, account state देखें।
Empty search: base DN, scope, filter, objectClass, suffix routing देखें।
Attribute hidden: लागू ACL और evaluation order देखें।
Replica stale: provider connection, credentials, search base/filter, status देखें।
ACL change के बाद access खो जाए: known backup से intended order लौटाएँ; unrestricted allow rule न जोड़ें।
स्रोत
[OpenLDAP 2.6 Administrator’s Guide](https://openldap.org/doc/admin26/)
[Introduction to OpenLDAP Directory Services](https://openldap.org/doc/admin26/intro.html)
[Configuring slapd](https://www.openldap.org/doc/admin26/slapdconf2.html)
[Access Control](https://www.openldap.org/doc/admin26/access-control.html)
[Replication](https://openldap.org/doc/admin26/replication.html)