OpenLDAP
OpenLDAP is an open source LDAP directory server. The OpenLDAP connector syncs accounts
(inetOrgPerson entries), groups (groupOfNames entries) and group membership into Owlie. It can
also create, update, disable, enable and delete accounts, and add or remove group members. The
connector runs only on a private-network gateway inside
your network.
For a directory with another schema, build an LDAP connector.
Capabilities
| Capability | Supported | Details |
|---|---|---|
| Sync | Yes | Accounts and groups, plus group membership. |
| Incremental sync | No | Every run is a full sync. |
| Account provisioning | Yes | Accounts: create, update attributes, disable, enable and revoke. By default, revoking disables the account. |
| Grant writes | Yes | Group membership (member_of). |
| Notifications | No | |
| Custom operations | No |
Authentication
The connector has one authentication method, Bind DN and password. Owlie binds to the directory as an entry that you create and give access to. The bind password stays on the gateway: Owlie stores only the name of the gateway secret that holds it.
The connection always uses TLS. An ldaps:// URL connects over TLS, and an ldap:// URL upgrades
with StartTLS.
Get credentials from OpenLDAP
- Create an entry for Owlie to bind as, for example
cn=owlie,ou=services,dc=example,dc=org, and set its password. - Give that entry access in the directory's access control rules. The OpenLDAP access control guide describes them.
- On the gateway, store the password as a gateway secret, for example
OPENLDAP_BIND, and let theopenldapconnector resolve it. See private-network gateways.
| Feature | Access the bind entry needs |
|---|---|
| Sync and connection test | Read access to the account and group search bases, including entryUUID. |
| Account provisioning | Create and delete entries under the first account search base, and write the account attributes and userPassword. |
| Disable and enable | Write the disable attribute, which is pwdAccountLockedTime by default. |
| Group membership writes | Write member on the groups Owlie manages. |
Connect OpenLDAP in Owlie
OpenLDAP needs an active gateway before you can install it. The install form's Execution section says "This connector requires a Connector Gateway" and asks you to choose the Gateway.
| Field | Required | What to enter |
|---|---|---|
| Directory URL | Yes | The directory's URL, starting with ldaps:// or ldap://, for example ldaps://ldap.example.org:636. |
| Base DN | Yes | For example dc=example,dc=org. |
| CA certificate (PEM) | No | Your own certificate authority, when the directory's certificate doesn't chain to a public one. |
| Verify the directory's certificate | No | On by default. Turn off only for a directory with a self-signed certificate. |
| Account search bases | Yes | Where this installation's accounts live, as whole DNs, for example ou=people,dc=example,dc=org. |
| Group search bases | Yes | Where this installation's groups live, as whole DNs, for example ou=groups,dc=example,dc=org. |
| Account object classes | Yes | The default is inetOrgPerson. |
| Group object classes | Yes | The default is groupOfNames. |
| Disable attribute | Yes | The attribute that disables an account. The default is pwdAccountLockedTime, the password policy overlay's lock. |
| Disabled value | Yes | The value that marks an account disabled. The default, 000001010000Z, is the overlay's permanent lock. |
| Enabled value | No | The value that marks an account enabled. Empty, the default, removes the attribute instead, which is how the overlay's lock is lifted. |
| Bind DN | Yes | The DN Owlie binds as. |
| Bind password | Yes | The name of the gateway secret that holds the bind password, without the OWLIE_SECRET_ prefix. |
A custom certificate authority, or turning certificate verification off, also needs the gateway
operator's allowTlsOverrides setting for the connector.
The connector checks that the URL starts with ldap:// or ldaps://, that the base DN is set, and
that the account and group search bases are set. The connection test binds and reads the first
account search base, which checks the bind, TLS and that the base exists.
Entities
| Entity | In OpenLDAP | Identifier | Key attributes | Sync | Create | Update | Delete | Grants (as target) |
|---|---|---|---|---|---|---|---|---|
| Account | An inetOrgPerson entry. This is the account entity. | entryUUID, or dn | uid, mail, cn, givenName, sn, displayName, departmentNumber, ou | Yes | Yes | Yes | Yes | No |
| Group | A groupOfNames entry. | entryUUID, or dn | cn, description | Yes | No | No | No | member_of |
Owlie reads the disable attribute on every sync and shows an account that carries the disabled value
as disabled. By default, Sync matches an account to an identity by mail against the identity's
email. Change the matching rule on the account's Sync job. See
account matching.
Grant kinds
| Grant kind | In OpenLDAP | Principal → target | Writable | Qualifiers | Passes access through |
|---|---|---|---|---|---|
member_of | A DN in the group's member attribute. | Account → Group | Yes | None | Yes: a member holds what the group is a member of. |
A group's members are the member values that are accounts inside the account search bases. A group
inside the group, or an entry outside the account search bases, is not reported.
Provisioning behaviour and limits
| Operation | What happens in OpenLDAP |
|---|---|
| Provision | Creates the entry under the first account search base and sets its password. If setting the password fails, Owlie deletes the new entry. |
| Update attributes | Writes the mapped attributes on the entry. |
| Disable | Sets the disable attribute to the disabled value. With the defaults, that sets pwdAccountLockedTime to 000001010000Z. |
| Enable | Sets the enabled value, or removes the disable attribute when the enabled value is empty. |
| Revoke | Removes the account's managed group memberships, then disables the account by default. To delete the entry instead, change the revoke state in the provisioning profile. |
The default lock stops the account from binding only when the directory runs the password policy
overlay (ppolicy) with a default policy that has pwdLockout: TRUE. On a directory without the
overlay, set Disable attribute and its values to an attribute of your own, such as
employeeType with active and disabled. That records the state for Owlie and for anything else
that reads the attribute, but it does not by itself stop a bind.
The default provisioning profile gives a new account a uid from the part of the identity's email
before @, in lowercase. When that uid is taken, Owlie appends 1, 2 and so on. mail, cn,
givenName, sn and displayName come from the identity's email and names. Every new account gets
a random 24-character password. Change any of these in the resource's
provisioning profile.
Limits:
- The connector doesn't create, change or delete groups.
- Adding a member a group already has succeeds without a change, and so does removing a member the group no longer has.
Troubleshooting
The install form says "This connector requires a Connector Gateway". OpenLDAP runs only on a gateway. Set up a private-network gateway, then choose it in the Execution section.
Validation fails with "url must be an ldap:// or ldaps:// URL". Directory URL needs the
scheme, for example ldaps://ldap.example.org:636.
Validation fails with "the user search bases are not set" or "the group search bases are not set". Add at least one DN to Account search bases and Group search bases.
A disabled account can still bind. The directory isn't enforcing the lock. Check that the
password policy overlay is loaded and that its default policy has pwdLockout: TRUE.
Changelog
The OpenLDAP connector is at version 1. Owlie shows each connector's changelog with the connector in the catalog.