SLAPD-NDB(5)

πŸ“¦
version 2.5.20 Β· 5 versions
, in ubuntu jammy

πŸ’– 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 the dbsocket directive. 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 the dbuser. 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 to 4 may improve performance under heavier load. The default is 1. so if things are getting spicy, you can dial it up to 4 πŸ”₯

🧚 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 is 128 bytes. Currently the maximum is 1024. 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