SLAPD-NDB(5)
π SLAPD-NDB π
okay bestie, so this is a File Formats Manual page for slapd-ndb, which is the MySQL NDB backend to slapd. Yes it's a mouthful. Yes it's iconic. Let's get into it π«Ά
β¨ NAME β¨
slapd-ndb β the MySQL NDB backend to slapd. periodt.
πΈ SYNOPSIS πΈ
/etc/ldap/slapd.conf
that's it. that's the whole synopsis. she's lowkey minimal like that π
π¦ DESCRIPTION π¦
The ndb backend to slapd(8) uses the MySQL Cluster package to store data, and it does it through the NDB API. It's giving fault tolerance with extreme scalability, plus a lil bit of SQL compatibility on the side. no cap.
This backend is designed to store LDAP information using tables that are also visible from SQL. So like, it uses a higher level SQL API to create these tables, but then switches to the low level NDB API for storing and retrieving the data inside them. The NDB Cluster engine lets data be partitioned across multiple data nodes, and this backend lets multiple slapd instances run against a given database concurrently. main character energy fr fr.
The general approach: use distinct tables for each LDAP object class. Entries that are made of multiple object classes will have their data spread across multiple tables. The data tables use a 64 bit entryID as their primary key. The DIT hierarchy is maintained in a separate table, which maps DNs to entryIDs. cute and organized, we love a structured queen π
β οΈ BESTIE LISTEN: this backend is experimental. While it's intended to be a general-purpose backend, it is currently missing a number of common LDAP features. Check the TODO file in the source directory for the details. she's a work in progress and we respect the journey π
π CONFIGURATION π
These slapd.conf options apply to the ndb backend database. That means they must follow a "database ndb" line, and they have to come before any subsequent "backend" or "database" lines. Order matters bestie, don't test her.
Other database options are described in the slapd.conf(5) manual page.
π DATA SOURCE CONFIGURATION π
dbhost <hostname>β the name or IP address of the host running the MySQL server. Default is"localhost". On Unix systems, the connection to a local server is made using a Unix Domain socket, and its path is specified with thedbsocketdirective. so like, local vibes only πdbuser <username>β the MySQL login ID to use when connecting to the MySQL server. Whoever you pick here must have sufficient privileges to manipulate the SQL tables in the target database. give her the keys or she can't drive πdbpasswd <password>β the password for thedbuser. that's it. that's the whole thing. shhh π€«dbname <database name>β the name of the MySQL database to use.dbport <port>β the port number to use for the TCP connection to the MySQL server.dbsocket <path>β the socket to be used for connecting to a local MySQL server.dbflag <integer>β client flags for the MySQL session. See the MySQL documentation for details. iykyk πdbconnect <connectstring>β the name or IP address of the host running the cluster manager. Default is"localhost".dbconnections <integer>β the number of cluster connections to establish. Using up to4may improve performance under heavier load. The default is1. so if things are getting spicy, you can dial it up to4π₯
π§ SCHEMA CONFIGURATION π§
attrlen <attribute> <length>β specify the column length to use for a particular attribute. LDAP attributes are stored in individual columns of the SQL tables, and the maximum column lengths for each column must be specified when creating these tables. If a length constraint was specified in the attribute's LDAP schema definition, that value will be used by default. If the schema didn't specify a constraint, the default is128bytes. Currently the maximum is1024. don't go over, she will not allow it πindex <attr[,attr...]>β specify a list of attributes for which indexing should be maintained. Currently there is no support for substring indexing; a single index structure provides presence, equality, and inequality indexing for the specified attributes. three in one, a multitasking icon πattrset <set> <attrs>β specify a list of attributes to be treated as an attribute set. This directive creates a table named set which will contain all of the listed attributes.
Ordinarily an attribute resides in a table named by an object class that uses the attribute. However, attributes are only allowed to appear in a single table. For attributes that are derived from an inherited object class definition, the attribute will only be stored in the superior class's table. Attribute sets should be defined for any attributes that are used in multiple unrelated object classes, i.e., classes that are not connected by a simple inheritance chain. basically: if they're not related by blood, give them their own space π‘
π ACCESS CONTROL π
The ndb backend honors most access control semantics as indicated in slapd.access(5). most. not all. read the room bestie π«Ά
π FILES π
/etc/ldap/slapd.confβ default slapd configuration file
π SEE ALSO π
slapd.conf(5), slapd-config(5), slapd(8), slapadd(8), slapcat(8), slapindex(8), slapmodify(8), MySQL Cluster documentation.
go read those too, they're all bangers fr fr π
π AUTHOR π
Howard Chu, with assistance from Johan Andersson et al @ MySQL. legends, honestly. we stan π
and that's the whole page bestie!! this was OpenLDAP 2.5.20+dfsg-0ubuntu0.2... dated 2025/05/22, and yes the version string is long enough to be its own main character. stay scalable, stay fault tolerant, and don't forget to define your attribute sets πβ¨
π¦ where this page comes from
- ubuntu jammy: slapd 2.5.20+dfsg-0ubuntu0.22.04.1
- Copyright 2008-2024 The OpenLDAP Foundation All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms