Active Directory
Active Directory is Microsoft's on-premises directory service. The Active Directory connector reads one domain controller over LDAP and syncs accounts, groups, organizational units and group membership into Owlie. It can also create, update, disable, enable and delete accounts, set and change their passwords, and add or remove group members. The connector runs only on a private-network gateway inside your network.
Capabilities
| Capability | Supported | Details |
|---|---|---|
| Sync | Yes | Accounts, groups and organizational units, plus group membership. |
| Incremental sync | Yes | Accounts only, following the domain controller's uSNChanged counter. Groups and organizational units are read in full. |
| 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 | Yes | Unlock an account, require a password change, move an account to another organizational unit, and two PowerShell helpers. |
Authentication
The connector has one authentication method, Bind DN and password. Owlie binds to the directory as a service account that you create and delegate rights 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. Active Directory accepts a password write only over an encrypted connection.
Get credentials from Active Directory
- Create a service account for Owlie in Active Directory, such as
svc-owlie, and note its distinguished name, for exampleCN=svc-owlie,OU=Service Accounts,DC=corp,DC=example,DC=com. - Delegate the rights for the features you use on the organizational units Owlie works in. In Active Directory Users and Computers, the Delegation of Control Wizard on an organizational unit grants them. Microsoft describes the wizard in Delegation of control in Active Directory Domain Services.
- On the gateway, store the service account's password as a gateway secret, for example
AD_BIND_PASSWORD, and let theactive-directoryconnector resolve it. See gateway secrets.
| Feature | Rights the service account needs |
|---|---|
| Sync and connection test | Read access to the account, group and organizational unit search bases. |
| Account provisioning | Create and delete user objects in the account search base, write the account attributes you map, and write userAccountControl. |
| Passwords | Reset passwords and write pwdLastSet. The delegation task Reset user passwords and force password change at next logon grants both. |
Group membership writes (member_of) | Write member on the groups Owlie manages. |
| Unlock and require a password change | Write lockoutTime and pwdLastSet. |
| Move to organizational unit | Move accounts between the organizational units involved. |
Without the right to write pwdLastSet, a password change fails as a whole and the password stays
as it was.
Connect Active Directory in Owlie
Active Directory 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 | One domain controller's URL, starting with ldaps:// or ldap://, for example ldaps://dc1.corp.example.com:636. |
| Base DN | Yes | The domain's base DN, for example DC=corp,DC=example,DC=com. |
| CA certificate (PEM) | No | Your own certificate authority, when the domain controller'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 | The organizational units whose accounts this installation syncs, as whole DNs, for example OU=Staff,DC=corp,DC=example,DC=com. |
| Group search bases | Yes | The organizational units whose groups this installation syncs, as whole DNs. |
| Organizational unit search bases | Yes | Where Owlie reads organizational units. Empty, the default, reads the whole base DN. |
| Home directory root | No | The UNC share that Set home directory may place home directories under, for example \\fs1\home. Empty, the default, refuses that operation. |
| New account DN | No | Where a new account is created, with {attribute} placeholders, for example CN={cn},OU=Staff,DC=corp,DC=example,DC=com. Empty creates it under the first account search base. |
| Account filter | Yes | The LDAP filter for accounts. The default, (&(objectCategory=person)(!(isCriticalSystemObject=TRUE))), reads people and leaves out built-in accounts such as krbtgt and Guest. |
| Group filter | Yes | The LDAP filter for groups. The default, (!(isCriticalSystemObject=TRUE)), leaves out Active Directory's built-in groups. |
| Account object classes | Yes | The object classes of a new account. The default is user. |
| Group object classes | Yes | The object classes of a group. The default is group. |
| Nested groups | Yes | Off by default. See Grant kinds. |
| Page size | Yes | How many entries Owlie reads per request, from 1 to 1000. The default is 500. |
| Bind DN | Yes | The service account's distinguished name. |
| Bind password | Yes | The name of the gateway secret that holds the service account's 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. See
TLS to directories and databases.
Point Directory URL at one domain controller, not at a load-balanced name. Incremental sync
follows uSNChanged, which each domain controller counts separately. If the URL moves to another
controller, or the controller is restored, the next incremental run starts again from zero and
reads every account once.
Keep the account search bases wide enough to cover wherever New account DN and Move to organizational unit place accounts. An account outside them is no longer synced.
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 as the service account
and reads the first account search base, which checks the bind, TLS and that the base exists.
Entities
| Entity | In Active Directory | Identifier | Key attributes | Sync | Create | Update | Delete | Grants (as target) |
|---|---|---|---|---|---|---|---|---|
| Account | A user object. This is the account entity. | objectGUID, or dn | sAMAccountName, userPrincipalName, mail, displayName, department, title, employeeID, manager, objectSid | Yes | Yes | Yes | Yes | No |
| Group | A security or distribution group. | objectGUID, or dn | cn, sAMAccountName, description, groupType, mail, objectSid | Yes | No | No | No | member_of |
| Organizational unit | An organizational unit under the organizational unit search bases. | objectGUID, or dn | ou, description, whenChanged | Yes | No | No | No | No |
objectGUID reads as a GUID string, such as c6f53b2a-8d1e-4f5b-9c1a-0d2e3f4a5b6c. It never
changes, even when an account is renamed or moved. objectSid reads in the S-1-5-21-… form.
Owlie reads the account's disabled flag on every sync and shows a disabled Active Directory account
as disabled. By default, Sync matches an account to an identity by employeeID against the
identity's employee ID, then by mail against its email. Change the matching rules on the account's Sync job. See account matching.
Grant kinds
| Grant kind | In Active Directory | Principal → target | Writable | Qualifiers | Passes access through |
|---|---|---|---|---|---|
member_of | A member of a group. | Account → Group, and Group → Group | Yes | None | Yes: a member holds what the group is a member of. |
With Nested groups off, the default, a group's members are the accounts in its member
attribute that fall inside the account search bases and filter. A group inside the group is not
reported.
With Nested groups on, Owlie syncs each group's direct members: its accounts and the groups inside it. Owlie then resolves membership through the nested groups. For an account in Backend, with Backend inside Engineering, Owlie shows Engineering as inherited through Backend, not as a direct Grant.
Only groups inside the group search bases and filter are synced. A nested group outside them is not reported, and the access its members hold through it is missing from Owlie. The default group filter leaves out built-in groups, so with Domain Admins inside a group named SQL-Admins, a domain administrator's membership of SQL-Admins does not appear. Widen the group search bases or filter to include every group that nests others.
Membership through an account's primary group, usually Domain Users, is not reported in either
mode. Active Directory keeps it out of member and memberOf.
Provisioning behaviour and limits
| Operation | What happens in Active Directory |
|---|---|
| Provision | Adds the account disabled, sets its password, then enables it. If the password or the enable step fails, for example because the domain's policy refuses the password, Owlie deletes the new entry and the operation fails with the directory's error. |
| Update attributes | Writes the mapped attributes. |
| Password change | Sets the new password and clears "User must change password at next logon" in the same write. |
| Disable | Sets the account's disabled flag in userAccountControl. Every other flag stays as it is. |
| Enable | Clears the disabled flag. |
| Revoke | Removes the account's managed group memberships, then disables the account by default. To delete the account instead, change the revoke state in the provisioning profile. Deleting removes the entry from the directory. |
The default provisioning profile gives a new account a userPrincipalName built from the identity's
email: the part before @ in lowercase, cut to 20 characters, then the email's domain. When that
name is taken, Owlie appends a number, starting at 2. sAMAccountName and cn take the part of the
result before @, mail takes the whole result, and givenName, sn and displayName come from
the identity's names. Every new account gets a random 24-character password. Change any of these in
the resource's provisioning profile.
A password change can be held to the domain's password history and minimum age. The resource's Check password history setting chooses which changes are checked. See password link. The check needs a domain controller running Windows Server 2012 R2 or later.
The custom operations run from an account in Owlie:
| Operation | What it does |
|---|---|
| Unlock account | Clears the lockout Active Directory applies after too many failed sign-ins. |
| Require a password change at next sign-in | Makes the account change its password at the next sign-in. |
| Move to organizational unit | Moves the account under the organizational unit you name in Target container DN. The account keeps its name and its objectGUID. |
| Create Exchange mailbox | Enables an Exchange mailbox for the account, optionally with a Primary SMTP address and a Mailbox database. |
| Set home directory | Sets the account's home directory, a UNC path under Home directory root, and optionally its Home drive letter, such as H:. |
Create Exchange mailbox and Set home directory run PowerShell on the gateway's server. They
run only where the gateway operator sets allowPowershell for the active-directory connector,
and they run as the gateway's own operating-system account. Read
PowerShell on a gateway before turning it on.
Create Exchange mailbox needs the Exchange management tools and the ActiveDirectory PowerShell
module on that server. Set home directory needs the ActiveDirectory module. Both refuse a
protected account, such as a domain administrator, and an account outside the installation's
account search bases.
Limits:
- The connector reads one domain. It doesn't create, change or delete groups or organizational units.
- Adding a member a group already has succeeds without a change, and so does removing a member the group no longer has.
- If Owlie can't delete a partly created account after a failed password or enable step, the operation fails for manual review and names the account's DN.
Troubleshooting
The install form says "This connector requires a Connector Gateway". Active Directory runs only on a gateway. Set up a 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://dc1.corp.example.com: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.
Provisioning fails with "Account … was partly created (setting its password or enabling it failed) and could not be removed: it needs manual review." The directory refused the password or the enable step, and the service account could not delete the new entry. Remove the account in Active Directory, then check the service account's delete right and the domain's password policy.
A password change fails and the password is unchanged. Check that the service account can write
pwdLastSet as well as reset passwords.
A group's members are missing. Check that the members are inside the account search bases and match the account filter. For members that are groups, also check that Nested groups is on and the nested group is inside the group search bases and filter.
Changelog
The Active Directory connector is at version 1. Owlie shows each connector's changelog with the connector in the catalog.