Administer
LDAP and Active Directory
Point BastionOS at your directory. It creates and disables users, follows groups, and checks passwords against the directory at each sign-in. Part of every edition, fallback servers included.
Add a directory#
In Console → Identities → Directories, create a directory:
| Field | Example |
|---|---|
| Flavor | Active Directory or OpenLDAP: sets the default attributes and filters |
| Address | ldaps://dc1.corp.example.com:636, or ldap://…:389 with StartTLS |
| Fallback servers | up to four, one per line: ldaps://dc2.corp.example.com:636 |
| CA bundle | optional; the system's authorities otherwise. The host name is always checked |
| Bind DN and password | a read-only service account; the password goes to OpenBao |
| Base DNs and filters | where users and groups are read, for example OU=IT,DC=corp,DC=example,DC=com |
| Schedule | off, or every 15 to 1,440 minutes |
TLS is mandatory: there is no clear-text bind and no empty-password bind. Test the connection before saving.
Synchronize#
Preview (a dry run) shows what a run would do without changing anything: users to create, update or disable, groups to link, memberships to add or remove, conflicts. Synchronize now applies it. Each run is kept in the history, with its counts and conflicts.
What a run does:
- creates and links users by the directory's immutable identifier (
objectGUID,entryUUID), never by name or e-mail; - refreshes names and e-mails;
- disables users who left the scope or are disabled in the directory, and ends their sessions;
- follows nested groups and Active Directory's ranged members;
- creates BastionOS groups for directory groups when asked, or maps a directory group to an existing BastionOS group.
A user name already taken by a local user is a conflict: it is recorded, never linked.
Sign-in of directory users#
Directory users sign in to the console and through SSH with their directory password, checked by an LDAP bind at each sign-in. BastionOS stores no hash of it. They still enrol a second factor in BastionOS. When the directory cannot be reached, their sign-in fails: it never falls back to anything else.
Fallback servers#
A directory has one address and up to four fallback servers, for example the other domain controllers of the domain. Synchronization runs, connection tests and sign-ins all use them:
- servers are tried in order; the next one is tried only when the previous one cannot be reached or fails its TLS handshake;
- a refused bind is the directory's answer and is returned at once, so a wrong password does not multiply failed binds against the user's lockout;
- each server gets an equal share of what is left of the deadline (15 seconds for a sign-in), so a server that accepts the connection and stalls does not take all of it;
- every fallback uses the same TLS mode, CA bundle and bind account as the main address.
Groups to access#
Map directory groups to BastionOS groups, then name those groups in access policies and roles. Someone who joins the DBA group in Active Directory gets the DBAs' access at the next run, and loses it when they leave the group.