Purpose
This guide explains how to configure the LDAP Response integration in Logsign USO. With this integration, an analyst or an Action Rule can search Active Directory users, disable or enable an account, unlock an account, force a password change and manage group membership directly from Logsign.
The integration works with Microsoft Active Directory. It finds users by sAMAccountName and changes the Active Directory attributes userAccountControl, lockoutTime, pwdLastSet and member. Other LDAP directories (for example OpenLDAP) do not have these attributes, so the methods that change accounts do not work on them.
The same LDAP device is also used for LDAP user login and identity enrichment. For those features, see LDAP Configuration & LDAP Users Login.
Prerequisites
- Every Logsign node must reach the domain controller on TCP 389 (LDAP) or TCP 636 (LDAPS).
- An Active Directory service account for the integration. Step 1 explains how to prepare it.
Step 1: Prepare the Service Account in Active Directory
How Logsign signs in to the directory
Logsign does not use a Bind DN. It signs in as <Username>@<domain>. Logsign builds the domain from the DC= parts of the BaseDN field.
Username field |
BaseDN field |
Logsign signs in as |
|---|---|---|
| svc-logsign | DC=corp,DC=example | svc-logsign@corp.example |
| svc-logsign | OU=Staff,DC=corp,DC=example | svc-logsign@corp.example |
| svc-logsign | corp.example | svc-logsign@corp.example |
- Enter only the
sAMAccountNameof the service account in the Username field. Do not enter a DN such asCN=svc-logsign,OU=Service,DC=corp,DC=example, and do not add@domain. - The BaseDN must contain the
DC=parts of the domain of the service account. You can also enter the domain name in dotted form (corp.example). Logsign converts it toDC=corp,DC=example. - Logsign searches users and groups only under the BaseDN. A user or group outside the BaseDN is not found.
Create the account
- In Active Directory Users and Computers, create a standard domain user, for example
svc-logsign. A Domain Admin account is not necessary. - Set a strong password. Make sure that the account does not need to change its password at next logon, because Logsign cannot complete that change.
- Follow your organization's password rotation policy for service accounts. When you change the password in Active Directory, also update it on the Logsign device.
Give the account the necessary permissions
Give the account only the permissions for the methods that you use. A standard domain user can already read user and group objects, so it can run the search methods and the connection test.
| Method | What Logsign changes in Active Directory | Permission on the target OU |
|---|---|---|
| list-users, search-users, Test | Nothing (read only) | Read (a standard domain user has it) |
| disable, enable |
userAccountControl on the user object |
Write userAccountControl on User objects |
| unlock-user | Sets lockoutTime to 0 on the user object |
Write lockoutTime on User objects |
| reset-password | Sets pwdLastSet to 0 on the user object |
Write pwdLastSet on User objects |
| add-user-to-group, remove-user-from-group | Adds or removes the user DN in the member attribute of the group |
Write member on Group objects |
To give these permissions:
- In Active Directory Users and Computers, right-click the OU that contains the target users or groups and select Delegate Control.
- Add the service account.
- For unlock-user and reset-password, you can select the common task "Reset user passwords and force password change at next logon".
- For the other permissions, select "Create a custom task to delegate", select User objects or Group objects, and select the attributes in the table above.
Menu names can differ between Windows Server versions; see the Microsoft documentation for your release.
Step 2: Configure the Integration in Logsign
- Go to Settings > Integrations > Responses.
- Search for LDAP and click Configure.
- Click +Device and fill in the fields below.
- Click Test. When the test succeeds, click Create.
| Field | Required | Description |
|---|---|---|
| Device Name | Yes | A name for this LDAP device. You select this name when you run a method. |
| Server | Yes | Host name or IP address of the domain controller, without a scheme. Correct: dc01.corp.example. Wrong: ldap://dc01.corp.example. |
| Port | Yes | 389 for LDAP, 636 for LDAPS. Always enter a value: the Response methods do not use a default port. |
| Use Ssl | Yes | Select to connect with LDAPS. The Port value must match this setting. |
| BaseDN | Yes | Where Logsign searches users and groups, for example DC=corp,DC=example. It must contain the DC= parts of the domain. See Step 1. |
| Username | Yes | The sAMAccountName of the service account, for example svc-logsign. |
| Password | Yes | The service account password. Logsign stores it encrypted. |
The form also shows Sync Interval and SSO fields. These fields are for LDAP user login and identity sync, not for the Response methods. See LDAP Configuration & LDAP Users Login.
Step 3: Use the Methods
The LDAP methods come predefined in Logsign. You do not create or configure them. After you create the device in Step 2, the methods are ready to use.
You run a method in one of these ways:
- Manually, from an incident.
- Automatically, from an Action Rule.
When you run a method, you select the LDAP device and enter the values below.
| Method | Parameters | What it does |
|---|---|---|
| list-users | None | Lists the user accounts under the BaseDN. |
| search-users | Class, Name | Finds the entries where the attribute in Class has the value in Name. Class is an attribute name, not an object class. Example: Class sAMAccountName, Name jane.doe. You can use * in Name, for example Class mail, Name *@corp.example. |
| disable | Username | Disables the user account. |
| enable | Username | Enables a disabled user account. |
| unlock-user | Username | Unlocks a locked-out account. It does not change the password. |
| reset-password | Username | Forces the user to change the password at next logon. It does not set a new password. See the note below. |
| add-user-to-group | Username, Group Name | Adds the user to the group. |
| remove-user-from-group | Username, Group Name | Removes the user from the group. |
-
Username is the
sAMAccountNameof the target user, for examplejane.doe. Exactly one user with this name must be under the BaseDN. -
Group Name is the common name (
cn) of the group, for exampleVPN-Users. Exactly one group with this name must be under the BaseDN. - reset-password returns an error when the user account has "User cannot change password" or "Password never expires" set. When the user already must change the password at next logon, the method makes no change.
Test the methods that change accounts on a test user in a non-production OU first.
Troubleshooting
| Symptom | Likely cause | What to check |
|---|---|---|
| Test fails | Logsign cannot reach the domain controller, the Port and Use Ssl values do not match, or the sign-in fails. | Firewall on 389 or 636, the Port and Use Ssl pair, and that Username is a sAMAccountName (not a DN) and BaseDN contains the DC= parts of the domain. |
| "user not found" | No user, or more than one user, has this sAMAccountName under the BaseDN. |
The Username value and the BaseDN. |
| "group not found" | No group, or more than one group, has this cn under the BaseDN. |
The Group Name value and the BaseDN. |
| "password can't be changed" | The account has "User cannot change password" or "Password never expires" set. | The account options of the user in Active Directory. |
| A method that changes an account returns an access error | The service account does not have the permission for this method. | The delegated permissions in Step 1. |