TL;DR
- 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.
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#
- SCIM explained: how accounts get created and removed in each app.
- SAML and OpenID Connect compared: how an app learns who signed in.
- Roles, attributes or relationships: what groups and roles decide once the person is known.
Sources#
This post as Markdown · RSS · JSON feed
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