iamops.dev Search
Argo on X RSS feed
ENEnglish

Knowledge Explainer · 5 min Beginners

Anyone who has been told "the account lives in the directory" and never seen one.

Directory and LDAP explained: the lobby board behind your login

A directory is the lobby board of users, groups and devices. LDAP is the protocol apps use to ask it who someone is and what groups they belong to.

Sequence diagram: you enter a password at a VPN server, the server binds to the directory, the directory refuses a disabled account, and the connection is refused.
TL;DRA directory stores the people, groups and devices that company apps ask…
  • A directory stores the people, groups and devices that company apps ask about.
  • The protocol apps use to ask it is the Lightweight Directory Access Protocol, explained here.
  • A disabled account should fail at the directory, not inside one app only.

Before you start: OpenID Connect explained shows how an app asks a sign-in service about a person. In many companies the directory sits behind that service.

What a directory is#

A directory is a store built for reading. It keeps objects: people, groups, computers and printers. For each person it holds a name, a login name, group memberships and often a phone number. Microsoft’s documentation for Active Directory Domain Services describes the same idea: a store of objects on a network, with user accounts among them.

The closest everyday picture is the board in a company lobby. It lists who works on which floor and in which team. The receptionist reads it when a visitor asks. The board does not decide who gets in. The reception does.

Where LDAP fits#

The Lightweight Directory Access Protocol (LDAP) is the way to talk to a directory. RFC 4511 defines it as a protocol that gives access to directory services. An app can search the directory, read an entry, compare a value, and run a bind. A bind is the check that a user name and password are correct.

LDAP is a question language, not a database you write to by hand. The app asks, and the directory answers with what it holds.

Example: a VPN login#

Imagine a VPN server that takes a user name and password. It passes them to the directory in a bind. If the bind works, the server looks up the person’s groups and lets in only members of a group such as vpn-users.

Now take someone who left the company last month. Her account is disabled in the directory. The VPN asks the directory, the directory refuses, and she never gets in. The sequence below shows that path.

Sequence diagram: you enter a user name and password at a VPN server, the server binds to the directory, the directory refuses because the account is disabled, and the VPN refuses the connection.
The directory answers. The VPN decides what the answer allows.

Why it still matters for new apps#

Most new apps do not ask the directory directly. They sign people in with a protocol such as OpenID Connect or SAML, and the sign-in service in front may read the directory behind it. Another option copies accounts into each app with the SCIM protocol, so the app never asks the directory at all.

Either way, the directory is still the place where a person’s status is kept.

What to check#

Test a leaver. Disable one test account in the directory and see whether sign-in fails in every app that depends on it, and how quickly. Write down the answer.

Use an encrypted connection for every bind. A bind sends a password, and a plain connection shows that password to anyone on the path.

Limit which accounts may search the whole directory. A search that returns every user is a map for an attacker.

Where to go next#

Sources#

Discuss this on X or LinkedIn

Follow on X

New posts by email

One email a week with new posts and labs. Unsubscribe anytime.

Your address is stored with Kit, which sends the emails. Details

Related research and labs

Type to search every page. Use the arrow keys to move through the results.

    Open the full search page